pytest-dev / pytest-bdd

BDD library for the py.test runner
https://pytest-bdd.readthedocs.io/en/latest/
MIT License
1.3k stars 219 forks source link

How to view the summary of test feature report for pytest-bdd?. #359

Open CuriousQA opened 4 years ago

CuriousQA commented 4 years ago

Can you please help/guide me to know how will the pytest-bdd report produce an output in summary(similar to or like in cucumber). The main info I am looking for is to show the scenarios, and count for passed/failed etc as highlighted in green in the below. image

However, this is what I see when I run the command "pytest " 3 passed, 18 deselected, 5 warnings in 4.41s

v-buriak commented 4 years ago

I can recommend you to look on pytest-html and screenshot and of course Junit .xml report can be generated by pytest for your CI test result parser.

CuriousQA commented 4 years ago

Thanks @v-buriak for the reply. I did check on pytest-html report. The report is pretty good itself. However, it doesn't give me details about the feature wise/scenarios that were passed/failed. So wondering if we have any report/ method to get that summary count.

Vic152 commented 4 years ago

Using tags I divided my runs into features. Each job is creating report for particular feature. This also allows me to run many features in parallel in different Docker containers.

CuriousQA commented 4 years ago

Thanks @Vic152 for the reply. I've around 35 feature files that are individually tagged by their feature names. It will be tedious to run those individually. Also I need the report to be consolidated in a single html file. If I run the jobs individually, I need to get summary of these individual runs to a single consolidated report. So I was checking for any decent options on displaying the summary for all the feature files in the report.

robsonpolicarpo commented 4 years ago

Hi @CuriousQA,

If you use some CI to run your tests you can check on the plugin https://plugins.jenkins.io/cucumber-reports/.

I'm looking for how to run the tests in parallel mode yet.

Regards

Ostapp commented 3 years ago

Can you please help/guide me to know how will the pytest-bdd report produce an output in summary(similar to or like in cucumber). The main info I am looking for is to show the scenarios, and count for passed/failed etc as highlighted in green in the below. image

However, this is what I see when I run the command "pytest " 3 passed, 18 deselected, 5 warnings in 4.41s

Did you find the solution?