Home » Java » Running cucumber-java BDD tests in teamcity and reporting the results-Exceptionshub

Running cucumber-java BDD tests in teamcity and reporting the results-Exceptionshub

Posted by: admin February 25, 2020 Leave a comment

Questions:

I’m using cucumber-java version 5.1.3, testng 5.3 & integrated with Teamcity using maven build runner to run my feature files(BDD’s).
The tests are running successfully however in the build status the total tests counts include the total count of assertions in the steps.

For example if I have a BDD file with 1 scenario outline with 2 steps and 2 assertions each, then the Teamcity build status shows the pass count as 4 rather 1. I wanted to know total number of scenarios passed or failed reported in the status rather the steps count.

Any idea how I can achieve that. Currently I have to navigate to html report and look at the status of the scenario. However, I would like to see the total scenarios passed or failed in the build runner.

For the attached test result I would like see the status as Test failed: 1,passed:0.

enter image description here

enter image description here

How to&Answers: