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

Report broken when excluding tag #1784

Closed
Schoaf opened this issue Aug 22, 2019 · 4 comments
Closed

Report broken when excluding tag #1784

Schoaf opened this issue Aug 22, 2019 · 4 comments

Comments

@Schoaf
Copy link

Schoaf commented Aug 22, 2019

We are running serenity tests using the maven plug-in.
We are using tags to cluster our tests (http://thucydides.info/docs/serenity-staging/#_filtering_test_executing_with_tags).
Now it is possible to run tests with specific tests as well es tests without specific tests like this:

  • with MY_TAG: -Dtags=MYTAG
  • with one of the tags: -Dtags="MYTAG1,MYTAG2"
  • without MY_TAG: -Dtags=~MYTAG

But when I am excluding a tag with the parameter "-D~MYTAG" the report is broken and shows nothing. As far as I can see the tests did run successfully and report files have been created but the index.html shows an empty report without any tests.
It looks like all test result pages are correctly generated (like f2b10e....html) but not aggregated to be included in the index.html

@wakaleo
Copy link
Member

wakaleo commented Aug 22, 2019

Are you using JUnit or Cucumber tags?

@Schoaf
Copy link
Author

Schoaf commented Aug 22, 2019

JUnit

@wakaleo
Copy link
Member

wakaleo commented Sep 11, 2019

I don't think this is currently supported.

@Schoaf
Copy link
Author

Schoaf commented Sep 11, 2019

You mean the negation?

JBehave seems to support a "skip" keyword. Maybe I can try this:
https://github.com/serenity-bdd/serenity-documentation/blob/master/src/asciidoc/tags.adoc

I think I got the idea from the first page that popped up when I searched for "serenity tags"
https://johnfergusonsmart.com/running-serenity-bdd-tests-with-tags/
but now that I read more carefully, the negation is only mentioned for Cucumber. Not for JUnit. Does that mean it is not supported for JUnit?

Thing is, it seems to work. Meaning it correctly skips the tests with the tag. Only the report is messed up, so maybe there is just a little bug there.

It would be a very interesting feature. Because all to often it is not really that I want to run a certain set of tests but I want to skip certain tests (e.g. long running, other environment...) because it would always include tests that habe not yet been tagges correctly. So you dont miss anything if you forget to tag.

@wakaleo wakaleo closed this as completed Feb 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants