How to run only selected Unit Tests from a class programatically?
已回答
Say I'd like to run 2 test methods in a Test class which has 100 tests. I know that this is possible because the Rerun Failed Tests action does exactly this. I've found a class related to this functionality:
AbstractRerunFailedTestsAction
but I don't know how to use it.
请先登录再写评论。
Create "fake" run configuration from com.intellij.execution.junit.JUnitConfiguration and set tests to run accordingly programmatically, then execute as in com.intellij.execution.testframework.actions.AbstractRerunFailedTestsAction#execute.