serenity-bdd / serenity-cucumber

Cucumber integration for the Serenity BDD Reporting library
Other
78 stars 74 forks source link

Serenity Report: Serenity fails to generate test report with test outcomes when root folder of the features file is provided. #120

Closed Ram-Raghu closed 6 years ago

Ram-Raghu commented 6 years ago

Description:

Serenity fails to generate test report with test outcomes when root folder of the features file is provided.

Steps to Reproduce:

1) Provide the root folder of features for the 'features' attribute in @CucumberOptions annotation in the Junit test (marked with @RunWith CucumberWithSerenity.class). 2) Run the test using maven or gradle. 3) The tests run are successfull. However, check the serenity report.

Expected: Serenity report with tests outcome should be generated.

Actual: Serenity report with tests outcome is not generated.

Environment:

1.8.20 1.8.5 1.6.9
wakaleo commented 6 years ago

A few quick comments:

Ram-Raghu commented 6 years ago

Hi @wakaleo

1) point taken 2) yes, I meant the same. The root folder in my case is src/test/resources as well. 3) Apologies for not being clear. When the tests are run by tags when only root folder of features is provided, this issue occurs.

The issue is not related to CucumberWithSerenityOptions. The issue occurs when cucumberoptions is populated with tags (either from maven or hardcoded in JUnit tests) and the JUnit tests provides only the root folder of the features.

Hope this is clear. Please let me know otherwise. I debugged the code and have proposed PR #121 . Please let me know if you have any comments or questions. Thank you.

wakaleo commented 6 years ago

Thanks, yes, the combination of tags and root was the triggering factor. Thanks for your fix!

Ram-Raghu commented 6 years ago

Thank you for your prompt response, review and merge.