I am in the process of creating a custom JUnit test runner but I am having trouble integrating it with the IntelliJ JUnit plugin smoothly.
The custom runner is similar to the JUnit Parameterized runner in terms of creating several test runs for each test class.
I was able to execute the test class as a whole with my runner, and see the nice tree of test method executions that the IntelliJ JUnit plugin provides.
However, when I want to execute only a single test method with the runner by right-clicking on the method in the editor and clicking "Run", I get a message back saying:
java.lang.Exception: No tests found matching Method testMyStuff(org.somename.MyClassTest) from org.junit.internal.requests.ClassRequest@5627f221
Is this a bug in the JUnit plugin or do I need to take a different approach?
I have found two workarounds, but neither one is feasible:
1. Pretend my custom runner is really the JUnit Parameterized runner by renaming the custom runner class to "Parameterized", and putting it into the org.junit.runners package. (Yes, this is awful)
2. Extend the JUnit Parameterized class. (Not a good approach, as Parameterized is not designed to be extended.)
Thanks for any help,