Ways to find the total number of scenarios when the test execution starts?
I am working on a custom report formatter for a cucumber test framework. I have 20+ feature files and contains different tags for each files. I am using Cucumber CLI and passing specific tags to execute the tests.
I need to implement a progress report which shows how many scenarios were executed vs how many scenarios are still remaining to be executed. The report will dynamically show the progress in terms % of test completion. I am able to count the total number of scenarios executed as it either passes/ fails using the @After hooks. However I am unable to find the total number of scenarios to be executed. I have tried to implement the ConcurrentEvent listener for TestRunStarted Event. But it does not provide any summary details. I believe Cucumber Runtime model may be able to provide this information, but could not get it to work. If you have solved similar problem, please post it here. Appreciate any help/ideas to solve this.
Solved! Go to Solution.
I appreciate the information and advice you have shared. I will try to figure it out for more.
I have found next solution: