Details
-
Suggestion
-
Resolution: Fixed
-
None
Description
Similarly to the Spock framework (CLOV-1256) I'd like to see runtime test names from the JUnit4 parameterized tests. Example:
import org.junit.*; import org.junit.runner.*; import org.junit.runners.*; import java.util.*; import static org.junit.Assert.*; import static org.junit.runners.Parameterized.*; @RunWith(Parameterized.class) public class FibonacciTest { @Parameters public static Collection<Object[]> data() { return Arrays.asList(new Object[][] { { 0, 0 }, { 1, 1 }, { 2, 1 }, { 3, 2 }, { 4, 3 }, { 5, 5 },{ 6, 8 } }); } private int fInput; private int fExpected; public FibonacciTest(int input, int expected) { fInput= input; fExpected= expected; } @Test public void test() { assertEquals(fExpected, Fibonacci.compute(fInput)); } } class Fibonacci { static int compute(int a) { return a; } }