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

[Core] Add property to skip execution of tagged scenarios #2952

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mpkorstanje
Copy link
Contributor

@mpkorstanje mpkorstanje commented Dec 6, 2024

🤔 What's changed?

Adds cucumber.execution.skip.tags. This will skip execution of all steps and hooks in any pickle that matches the tag expressions. This differs from cucumber.filter.tags which removes the matching pickle from execution altogether.

Note: Conceptually Cucumber and the JUnit Platform have different definitions for what it means to skip test. This makes things complicated.

  • When using cucumber.execution.skip.tags JUnit will consider the test to be aborted because from its perspective Cucumber started the execution and then skipped all steps, thus aborting the test.
  • When using cucumber.filter.tags JUnit will skip the test, never starting the execution and thus omitting it from any Cucumber reports.
  • When using JUnit tag filters, JUnit will remove the test, never starting the execution and thus omitting it from any Cucumber reports. Only in this case the Cucumber and JUnit report will agree.

⚡️ What's your motivation?

Quick proof of concept for: #2951.

🏷️ What kind of change is this?

  • ⚡ New feature (non-breaking change which adds new behaviour)

♻️ Anything particular you want feedback on?

📋 Checklist:

  • I agree to respect and uphold the Cucumber Community Code of Conduct
  • I've changed the behaviour of the code
    • I have added/updated tests to cover my changes.
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.
  • Users should know about my change
    • I have added an entry to the "Unreleased" section of the CHANGELOG, linking to this pull request.

Adds `cucumber.execution.skip.tags`. This will skip execution of all
steps and hooks in any pickle that matches the tag expressions.

This differs from `cucumber.filter.tags` which removes the matching
pickle from execution altogether.

Note: Conceptually Cucumber and the JUnit Platform have different
definitions for what it means to skip test. This makes things
complicated.

When using `cucumber.execution.skip.tags` JUnit will consider the
scenario to be aborted because from its perspective Cucumber started the
execution and then skipped all steps, thus aborting the scenario.

When using `cucumber.filter.tags` JUnit will skip the test, never
starting the execution and thus omitting it from any Cucumber reports.

When using JUnit tag filters, JUnit will remove the test, never
starting the execution and thus omitting it from any Cucumber reports.
Only in this case the Cucumber and JUnit report will agree on the end
result.
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

Successfully merging this pull request may close these issues.

1 participant