serenity-bdd / serenity-cucumber

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

Fix serenity report generation when run by multiple tags #114

Closed Ram-Raghu closed 6 years ago

Ram-Raghu commented 6 years ago

Before this change when cucumber features or scenarios are run based on logical ORs and ANDs of two or more tags, serenity fails to create tests report. This change would fix this issue and as a result when a user runs cucumber with tags as mentioned in this link (https://github.com/cucumber/cucumber/wiki/Tags) serenity report with tests on it would be generated.

The tests are added to the maven project in the path: serenity-cucumber\src\smoketests. The feature file name is serenity_report_when_using_tags_at_all_leve.feature and Junit test name is WhenUsingScenarioOutlineAndTagsAtAllLevels.java.

wakaleo commented 6 years ago

Thanks for this.

Ram-Raghu commented 6 years ago

Hi @wakaleo

Sorry I could not understand your comments quite well. Before I work on the suggested changes, I would like to clarify the below:

1) The code in examplesMatchFilter() is now quite complex, could you extract the logic - What I understand is that you want me to create a layer of abstraction by logically putting away the blocks of code from examplesMatchFilter() into new methods. or Its just unit tests covering the logic need to be developed and the application code can be left as is?

2) Regarding binary files - This is my reason to do a "git rm --cached " on them. When I cloned the forked repo into my local, these class files automatically moved to unstaged area of git. I tried to replace those class files in the worktree to the files in the index by doing "git checkout -- on them. But soon after they moved again automatically to the unstaged area (I did not compile code or run tests). I thought these class files need not be tracked in git anyway (please correct me if I am wrong), so I did "git rm --cached " and added the folder in the .gitignore file. If I work on having them back then I will end up with the same problem described here. Please advise.

Ram-Raghu commented 6 years ago

Hi @wakaleo

I have added the unit and integration tests and have refactored the examplesMatchFilter(). To ensure a cleaner commit history, I have created another pull request #115 containing these updates. I hope you are fine with the class files being untracked, if not please suggest what to do with the issue I am facing with the class files. Thanks, Ram.

Ram-Raghu commented 6 years ago

Closing this pull request as it is no longer required