Alex Rivera | Logout

How can I repeat Spock test?

Asked 2012-06-06T07:39:50.357
13

As described here @Repeat annotation is not supported right now. How can I mark spock test as repeated n times?

Suppose I have spock test:

def "testing somthing"() {
    expect:
    assert myService.getResult(x) == y

    where:
    x | y
    5 | 7
    10 | 12
}

How can I mark it to repeat n times?

Edit
Report

1 Answer

1

You can use a where-block as shown in the answer above. There is currently no way to repeat a method that already has a where-block.

answered 2012-06-06T11:54:14.680

Your Answer