Question

I am running a basic Cucumber-Jvm test with two features called "Basic Math" and "Advanced Math" (in files basic_math.feature and advanced_math.feature respectively).

However, when the HTML report gets generated "Advanced Math" gets displayed before "Basic Math", whereas I would like "Basic Math" to appear before "Advanced Math". This is not trivial since if I can organise the output more logically, then the reports will be more accessible to our business analysts and QA department and the more traction I will be able to get.

I know I could try to do some sort of XSLT post processing with a Maven plugin, but I'm looking for someway to define it in code using annotations. Is there such a way? Cucumber.@Options.features actually defines the .feature file locations, and Cucumber.@Options.name is for rexexps that determine which features get run.

Was it helpful?

Solution

Here's what I have observed. Cucumber picks up feature files for execution in sorted order. If you can name your feature files so that basic_math is picked up first, say, rename feature files as 01basic_math.feature and 02advanced_math.feature, then the report will show basic_math tests first.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top