Closed gergelyfabian closed 11 months ago
I guess this can be done with:
--test_filter=com.my.TestClassTest#
Selecting one test would be:
'--test_filter=com.my.TestClassTest#my test case'
As you say, I think rules_scala already supports this when running from the command line, so I'm not sure there's any need for changes on the rule end.
If you're using Intellij, I think this used to work from the IDE as well, and I accidentally broke it when adding support for specifying test cases for Scalatest to the IJ Bazel plugin.
There's a PR over here to fix it, I think it's very close to done and just needs a little polish. It's been quiet for a while, but if you feel like it, the author probably wouldn't mind you picking it up.
@srdo , thanks for the update on IntelliJ. Indeed it doesn't allow me running a single test case, I can only do that from the command line.
I have a test target that was defined with
scala_junit_test
. Is there any way to specify a test that I'd like to select to be run like I'd do for scalatest: