Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unroll parameterized features/tests by default - feature proposal #967

Closed
szpak opened this issue Jan 25, 2019 · 3 comments
Closed

Unroll parameterized features/tests by default - feature proposal #967

szpak opened this issue Jan 25, 2019 · 3 comments

Comments

@szpak
Copy link
Member

@szpak szpak commented Jan 25, 2019

Feature proposal - Unroll parameterized features/tests by default

Description

In most of the cases parameterized features/tests are more readable while unrolled. Even if the @Unroll annotation is placed at the specification/class level it's still boiler plate code to write. Following the common use cases it would be more natural to unroll all parameterized tests by default (with an option to disable it on per test or class basis).

Possible implementation

Starting with Spock 2.0 all parameterized tests would be unrolled by default. There would be still an ability to provide custom messages with the @Unroll("...") annotation. If desired the unrolling would be possible to disable for a test or the whole class with a dedicated annotation - @Roll).

Solutions for 1.x

There is the spock-global-unroll (global) extension which once added to classpath automatically unroll all parameterized tests in the whole projects. There is no need to add any extra code or annotation - all (parameter-less) @Unroll annotations can be removed.

It can be used as a preparation for Spock 2.0 with similar behavior available out-of-box.

Open topics

Feel free to leave comment in that issue.

@leonard84
Copy link
Member

@leonard84 leonard84 commented May 29, 2019

Unrolled tests will be the default for spock 2.0, I'm not sure if we will provide an @Rollup extension.

@ddimtirov
Copy link

@ddimtirov ddimtirov commented Aug 16, 2019

In some of our PBT tests we run thousands of simple tests per method. Without @Rollup this would overwhelm the reporting infrastructure.

In particular IDEA's test reporting window becomes unresponsive when the number of tests goes into tens of thousands. Other tools may have the same issue too.

@szpak
Copy link
Member Author

@szpak szpak commented Jun 25, 2020

It's implemented in Spock 2.0-M3 (#1101) with a possibility to disable globally or rolling up on demand. Closing.

@szpak szpak closed this Jun 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants