In Eclipse, while using the Parameterized runner in a junit test class, each run is noted by a number (0, 1, etc.)
Is there a way to replace this number with a proper label?
PS: I am using a JUNIT
version 4.8 older than 4.11 so the @Parameters
does not take any argument
Test Case:
@RunWith(value = Parameterized.class)
public class TestClass {
@Parameters
public static Collection<Object[]> getLabels() {
List<Object[]> labels = new ArrayList<Object[]>();
labels.add(new Object[] {"Toto"});
labels.add(new Object[] {"Titi"});
return labels;
}
private final String label;
public TestClass(String label) {
this.label = label;
}
@Test
public void test1() {
assertTrue(true);
}
}
Result: