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

@WithTag, @WithTags, @Tag and @Tags do not work in Serenity Core 3.2.x - Gradle Junit 5 #2976

Open
tibioneh opened this issue Nov 22, 2022 · 4 comments

Comments

@tibioneh
Copy link

Cannot run tests by tags in a Serenity BDD - Junit 5 project.

The solution in this closed issue is not working for Gradle: #2801
Nor this: https://stackoverflow.com/questions/69541988/is-there-a-way-to-add-tags-to-tests-using-serenity-and-gradle
Nor this: https://groups.google.com/g/thucydides-users/c/M5EqYS9Bmck

I tried all possible variations, still all tests are being ran.

@ViktorMikhalkin
Copy link

Also, true for Maven. The possible workaround can be Tag annotation from Junit5.

@eotsevych
Copy link

Still reproduced in 3.6.7

@wakaleo
Copy link
Member

wakaleo commented Apr 1, 2023

These annotations aren't supported with JUnit 5, since JUnit 5 has it's own @tag annotation.

@eotsevych
Copy link

Indeed, now only junit5 @tag works

<plugin>
     <groupId>org.apache.maven.plugins</groupId>
     <artifactId>maven-surefire-plugin</artifactId>
     <version>3.0.0</version>
     <configuration>
         <groups>integration, feature-a</groups>
         <excludedGroups>slow</excludedGroups>
      </configuration>
</plugin>

with CLI:

mvn -Dgroups="integration, feature-a"
mvn -DexcludedGroups="slow"

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

4 participants