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

Adding status "Passed with warning" #324

Closed matlaria90 closed 9 months ago

matlaria90 commented 10 months ago

We noticed that could be very useful that the report will bring up also the alert related to the test cases that has been completed with success status but contains some warning inside the steps. The warning annotations are not blocked or critial for the test case scope but could be important to know that they exist and could be a little alert of future big issue.

Below I attached the cucumber.json file generated by our test automation suite. please attention that we changed manually the status of one step in order to replace the "passed" status to "passed with warning" and this action should be help you to find a way in order to create this new status on html report. If this improvement could make sense for you, we should create a little script that check the test case step "output" field and if the warning annotation is presence, we will replicate the status from "passed" to "passed with warning". Unfortunatly cucumber framework not allow to manage custom status before to generate the cucumber.json output file

exampleWarning.json

Additional points I am also thinking a solution in order to improve your "new CluecumberCore.Builder()" in order to create a general solution for everyone. The first idea could be to create a ".customStatuses(List)" method in which we could add the statuses that we would want to see in the html report. The problem here could be the managment of these status because if you see one of these new statuses inside the test case steps, how do you proceed in order to set the summary status of the test case ?

bischoffdev commented 9 months ago

I took a look at your sample JSON. What you are doing with the resulting JSON does not really adhere to the Cucumber standard. So unfortunately, we will have to reject this request. If you really need it in your setup, I would suggest forking this repo.