How to run a single test in SBT
Note to self. Maybe one day I will finally remember how to run a single test class in sbt. Currently, I must google that every time I need it.
When you want to run tests from a single test class using the command line (not from the sbt interactive mode), you probably write this:
1 sbt testOnly name.mikulskibartosz.TestClass
This is wrong! It runs all of the tests.
The correct way of running a single test class looks like this:
1 sbt "testOnly name.mikulskibartosz.TestClass"
Please remember about the quotation.
You may also like