testOnly runs all test
See original GitHub issueI have two test classes in the src/it/scala/com/mycompany/myapp/
directory. Let’s say the classes are TestA
and TestB
. When I run sbt gatling-it:testOnly com.mycompany.myapp.TestB
, both tests are run. I’d expect only TestB
to be run in this example.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:7 (4 by maintainers)
Top Results From Across the Web
unit testing - sbt testOnly not working - Stack Overflow
Using testOnly within sbt I can write whatever I feel like and still always get the same response. Running all tests work fine....
Read more >test-only runs all tests in all projects if invoked directly ... - GitHub
If I run sbt test-only *SingleTestSuite from the command line with a multi module project, then sbt actually runs all the tests in...
Read more >sbt Reference Manual — Testing
The tasks for running tests are test and testOnly . The test task accepts no command line arguments and runs all tests: >...
Read more >Run specific tests with `sbt testOnly` - Serge Gebhardt (sgeb.io)
Here's how to do that with sbt and ScalaTest. Run specific test suites by passing them as arguments to testOnly : > sbt...
Read more >Sbt test does not actually run any tests - Play Framework
I've been running tests mostly in IDEs (both Eclipse and IntelliJ) and they both work fine. However, I've noticed that if I try...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’d say you’re not using sbt properly.
If you want to directly launch sbt and pass a full command as a parameter, you have to wrap it with double quotes:
sbt "gatling-it:testOnly com.mycompany.myapp.TestB"
.Or go in interactive mode:
I guess you’re right. That’s a nasty problem in SBT then. I’d say
testOnly
should throw an error when it doesn’t get an argument. But that’s not of your concern of course. 😉 Thanks for helping me out!