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

Filtering by tags prevents Spock specs from being executed. #2563

Closed
jakub-bochenski opened this issue Mar 5, 2021 · 1 comment
Closed

Comments

@jakub-bochenski
Copy link

jakub-bochenski commented Mar 5, 2021

Neither Spock 1.x nor Spock 2.x support tags, so they should not be affected by a tag filter. Yet it seems they are

Steps to reproduce

Update: I was able to spot this in the debugger (somehow the debug output is not printed even when I run gradle with -d)
Screenshot_20210305_175214

I think this clearly shows there is a bug. Tags should not affect other engines than Jupiter.

--

Add some Spock 1.x Specs and have a gradle test task configured as follows:

    test {
            useJUnitPlatform {
                includeTags("SomeTag")
                includeEngines("junit-vintage")
            }
    }

Observe specs are not being executed.
If you comment out the line with "includeTags" the specs are executed.

I've checked in the debugger that a RunnerTestDescriptor with a Sputnik runner is being discovered (the Specs are not being skipped/ignored by Spock).
Screenshot_20210305_165810

The same happens with Spock 2.x

    test {
            useJUnitPlatform {
                includeTags("SomeTag")
                excludeEngines("junit-vintage")
            }
    }

Screenshot_20210305_174750

Context

  • Used versions (Jupiter/Vintage/Platform): 5.6.3 / 1.6.3
  • Build Tool/IDE: gradle 6.8.3
  • Spock 1.3-groovy-2.5, 2.0-M2-groovy-2.5
@jakub-bochenski jakub-bochenski changed the title Filtering by tags prevent's Spock specs from being executed. Filtering by tags prevents Spock specs from being executed. Mar 5, 2021
@marcphilipp
Copy link
Member

As explained in spockframework/spock#1288 (comment), this works as designed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants