So my typical workflow is
- I write a data driven test using TestNG in IntelliJ.
- I supply hundreds of data items
- Run the test and one or two of them fail
- I see the list of passed/failed tests in the "Run" pane.
I would like the ability to just right click that "instance" of the test and run that test alone (with breakpoints). Currently IntelliJ does not seem to have that feature. I would have to right click the test and when I run, it runs the whole set of tests with hundreds of data points.
Is this possible?
The feature has been added as of Intellij
142.1217
: https://youtrack.jetbrains.com/issue/IDEA-57906TestNG supports this at the
testng.xml
level, where you can specify which indices of your data provider should be used. It's called "invocation-numbers" and you can see what it looks like by running a test with a data provider, failing some of its invocation numbers and looking at thetestng-failed.xml
that gets generated.Back to your question: your IDE needs to support this feature in order to make it available in the UI, so I suggest you ask on the IDEA forums