Updating TestNG invocationCount (repeat test multiple times) Follow
I'm trying to figure out if it's possible to change TestNG invocationCount (to repeat test multiple times).
As for JUnit we can set it in 'Run/Debug Configurations' Window and it refers to "REPEAT_COUNT" in JUnitConfiguration.
As for TestNG there is parameter in annotation and no such info in TestNGConfiguration.
@Test(invocationCount = 23)
Any hints would be appreciated.
Please sign in to leave a comment.
there is no such feature for testng and one needs to change code directly.
Sorry for the inconvenience
ok. thanks for your reply!
Well, is it possible to load project test class in a plugin and change its annotation?
Do you want to change the source code? If yes, then of cause it's possible to do with a plugin.
If you want to adjust class during runtime you rather attach a corresponding `-javaagent` or patch the execution part of the plugin similar to what junit does.
I want to do it in runtime. Could you specify classes (if it's not too much of a pain) where junit (or maybe another plugin) "patch the execution part" as you said, please?
`com.intellij.rt.junit.IdeaTestRunner.Repeater#startRunnerWithArgs` here I repeat the whole thing again