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?
- derived from
-
CLOV-1256 as a developer I'd like to instrument tests written in the Spock framework
- Closed
[CLOV-1388] as a developer I'd like to have Spock @Unroll annotation being recognized by Clover
Workflow | Original: JAC Suggestion Workflow [ 3342526 ] | New: JAC Suggestion Workflow 3 [ 3585038 ] |
Status | Original: RESOLVED [ 5 ] | New: Closed [ 6 ] |
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 ] |
Workflow | Original: New Clover Workflow [ 897474 ] | New: New Clover Workflow - Restricted [ 1474019 ] |
Workflow | Original: Clover Workflow [ 896368 ] | New: New Clover Workflow [ 897474 ] |
Workflow | Original: reviewflow [ 579796 ] | New: Clover Workflow [ 896368 ] |
Status | Original: Resolved [ 5 ] | New: Closed [ 6 ] |
Resolution | New: Fixed [ 1 ] | |
Status | Original: To be reviewed [ 10026 ] | New: Resolved [ 5 ] |
Sprint | Original: Sprint 1 [ 932 ] |
Status | Original: In Progress [ 3 ] | New: To be reviewed [ 10026 ] |