3

I am trying to subclass BlockJUnit4ClassRunner, in order to be able to use this nice parameterizing framework: JUnitParams.

I can't use the built-in JUnit parameterizing runner, since I need to do some additional work in the runner.
Anyway, eclipse will run the tests, but when trying to double-click the JUnit display in order to jump to the test code, it prompts a "Test class not found in selected project" error.

Does anyone happen to know where in the Runner code can I set the connection between the JUnit plugin and the code?

Adam Michalik
  • 9,678
  • 13
  • 71
  • 102

1 Answers1

4

I'm the author of 'this nice parameterizing framework' ;-)

The problem (which is also in JUnitParams) is that eclipse uses the junit's Description class when jumping to a test method, but in order to show the tree with all parameters in the junit results view I need to cheat a bit and enter parameters as a method name and method name as a class name, hence the problem.

If you need this feature, change getDescription method in your runner so that it works like the original one (but you'll loose the nice view of which param set failed.)

oers
  • 18,436
  • 13
  • 66
  • 75