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

as a developer I'd like to have Spock @Unroll annotation being recognized by Clover

    • Icon: Suggestion Suggestion
    • Resolution: Fixed
    • 3.3.0
    • Groovy
    • None
    • 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.

      The

      @Unroll

      annotation causes that a test name will be unrolled for every combination of test data. It means that we can have multiple tests having different name, which in fact are related with exactly the same test method, but ran with different input arguments.

      Examples (from http://docs.spockframework.org/en/latest/data_driven_testing.html):

      // sequence index at the end
      @Unroll
      def "maximum of two numbers"() { ... }
      maximum of two numbers[0]   PASSED
      maximum of two numbers[1]   FAILED
      
      // variable substitution 
      @Unroll
      def "maximum of #a and #b is #c"() { ... }
      maximum of 3 and 5 is 5   PASSED
      maximum of 7 and 0 is 7   FAILED
      

      Problem for Clover: we don't know neither a number of tests nor their names during compilation. it would have to be deferred to runtime.

      => add some inner class for a test class which would monitoring the test name and somehow pass to the per-test coverage recorder?

            [CLOV-1388] as a developer I'd like to have Spock @Unroll annotation being recognized by Clover

            Katherine Yabut made changes -
            Workflow Original: JAC Suggestion Workflow [ 3342526 ] New: JAC Suggestion Workflow 3 [ 3585038 ]
            Status Original: RESOLVED [ 5 ] New: Closed [ 6 ]
            Monique Khairuliana (Inactive) made changes -
            Story Points Original: 20
            Workflow Original: New Clover Workflow - Restricted [ 1474019 ] New: JAC Suggestion Workflow [ 3342526 ]
            Issue Type Original: Story [ 16 ] New: Suggestion [ 10000 ]
            Status Original: Closed [ 6 ] New: Resolved [ 5 ]
            Owen made changes -
            Workflow Original: New Clover Workflow [ 897474 ] New: New Clover Workflow - Restricted [ 1474019 ]
            Piotr Swiecicki made changes -
            Workflow Original: Clover Workflow [ 896368 ] New: New Clover Workflow [ 897474 ]
            Piotr Swiecicki made changes -
            Workflow Original: reviewflow [ 579796 ] New: Clover Workflow [ 896368 ]
            Marek Parfianowicz made changes -
            Status Original: Resolved [ 5 ] New: Closed [ 6 ]
            Marek Parfianowicz made changes -
            Resolution New: Fixed [ 1 ]
            Status Original: To be reviewed [ 10026 ] New: Resolved [ 5 ]
            Marek Parfianowicz made changes -
            Sprint Original: Sprint 1 [ 932 ]
            Marek Parfianowicz made changes -
            Link New: This issue derived from CLOV-1256 [ CLOV-1256 ]
            Marek Parfianowicz made changes -
            Status Original: In Progress [ 3 ] New: To be reviewed [ 10026 ]

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

                Created:
                Updated:
                Resolved: