trivago / cluecumber

Clear and concise reporting for the Cucumber BDD JSON format.
https://www.softwaretester.blog
Apache License 2.0
268 stars 89 forks source link

Test scenario is marked as 'Skipped' instead of 'Failed' when flag to 'failScenariosOnPendingOrUndefinedSteps' is enabled #347

Closed NicoIodice closed 1 month ago

NicoIodice commented 1 month ago

Describe the bug Test scenario is marked as Skipped instead of Failed when flag to failScenariosOnPendingOrUndefinedSteps is enabled

To Reproduce Steps to reproduce the behavior:

  1. Enable the flag on the pom configuration section
    <failScenariosOnPendingOrUndefinedSteps>true</failScenariosOnPendingOrUndefinedSteps>
  2. Execute a cucumber test scenario with and undefined step
  3. Generate the report
  4. Open the report generated on the previous step

Expected behavior Test scenario should be marked as Failed and should be displayed on that report section

Actual behavior Test scenario is marked as Skipped and is displaued on that report section

Attachments 2024-07-12_11h50_13

Maven logs:

[ERROR] Feature1.Feature1 - Test Scenario Name -- Time elapsed: 43.79 s <<< ERROR!
io.cucumber.junit.platform.engine.UndefinedStepException: 
The step 'Search for client "Test client"' is undefined.
You can implement this step using the snippet(s) below:

@Then("Search for client {string}")
public void search_for_client(String string) {
    // Write code here that turns the phrase above into concrete actions
    throw new io.cucumber.java.PendingException();
}

Additional context I remember this feature was working as expected on previous versions.

bischoffdev commented 1 month ago

Checking this, thanks for reporting

bischoffdev commented 1 month ago

I can reproduce this, fixing is in progress

bischoffdev commented 1 month ago

Released in 3.7.1

NicoIodice commented 1 month ago

Thank you. Just tested and is resolved :)

cluecumber_solved

bischoffdev commented 1 month ago

Perfect, thanks for your confirmation!