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.

Please sign in to leave a comment.