When you run a JUnit 4 ParameterizedTest with the Eclipse TestRunner, the graphical representation is rather dumb: for each test you have a node called [0]
, [1]
, etc.
Is it possible give the tests [0]
, [1]
, etc. explicit names? Implementing a toString
method for the tests does not seem to help.
(This is a follow-up question to JUnit test with dynamic number of tests.)
Best Answer
I think there's nothing built in in jUnit 4 to do this.
I've implemented a solution. I've built my own
Parameterized
class based on the existing one:To be used like:
This implies that I instantiate the test class earlier. I hope this won't cause any errors ... I guess I should test the tests :)