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

How to mark status "pending" for scenario in scenario outline #3411

Open
luanqauto opened this issue Feb 27, 2024 · 2 comments
Open

How to mark status "pending" for scenario in scenario outline #3411

luanqauto opened this issue Feb 27, 2024 · 2 comments
Labels

Comments

@luanqauto
Copy link

I have a scenario outline below
Scenario Outline:
Given I navigate to home page
When I do something
Then I should get the result
Examples:
| example |
| click |
| type |
| scroll |
Question: How can mark one of example is pending status ?
I tried to split Examples like this, but it's not work
Scenario Outline:
Given I navigate to home page
When I do something
Then I should get the result
Examples:
| example |
| click |
| type |
@Manual
Examples:
| example |
| scroll |

@wakaleo
Copy link
Member

wakaleo commented Feb 27, 2024

Cucumber/Gherkin does not support tags at the level of individual examples, so this isn't possible.

@luanqauto
Copy link
Author

thanks @wakaleo . I resolved my problem by snippet below

@Before
  public void isManualExample(Scenario scenario) {
    List<String> tags = (List<String>) scenario.getSourceTagNames();
    if(tags.toString().contains("manual")) {
      Serenity.pendingStep("Manual Scenario");
    }
  }

But why don't we check the "manual" tag in examples to generate the report. I see Serenity handled the "manual" tag in examples in class SerenityRepoter with functions "handleTestCaseStarted" and "handleExamples"

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

No branches or pull requests

2 participants