I'm using µtest in a Scala sbt project. I want to run various test classes with a custom made test runner, which consists of code like this
val results = AnotherClassWithTests.myTests.run()
println(results.leaves.count(_.value.isSuccess))
I want it to be executed when running sbt test, and the only way I've found is to extend utest.Testsuite and leave the tests method empty.
This way, sbt will find the class and run it, but the solution doesn't seem ideal. I can prevent sbt's runner to execute AnotherClassWithTests
by not having it extend utest.Testsuite, but still I'd get unneccessary output from the µtests default test runner along with my own ouput.
How can I hook my runner to sbt test
without that hack and run all my tests with it, skipping µtests default runner?
Can I access the list of µ-tests that are detected by sbt, too?