Uploaded image for project: 'Clover'
  1. Clover
  2. CLOV-1408

As a developer I'd like to see JUnit Parameterized tests in the report

    XMLWordPrintable

Details

    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

    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;
         }  
      } 
      

      Attachments

        Activity

          People

            mparfianowicz Marek Parfianowicz
            mparfianowicz Marek Parfianowicz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: