serenity-bdd / serenity-cucumber4-starter

49 stars 73 forks source link

[Question] New features are not displayed in Requirements, Capabilities and Features sections #5

Closed ismaelcabanas closed 5 years ago

ismaelcabanas commented 5 years ago

Hi Team,

I want to use Serenity Reporting with gradle in my company, and I am testing this tool. It is a great tool, but I have some problems.

I have cloned this Git repo and I have begun to play with it, and the first thing I have done is create a new feature, as the documentation recommend: I have created a new directory in src/main/resouces/features and I have created a new feature file.

When I execute gradle clean test -P=chrome from my console it works fine but the report is not I expected. In the overall section appears the new feature Captura de pantalla 2019-06-25 a las 18 00 32

But, in the Requiremens, Capabilities and Features tabs, they are not displayed Captura de pantalla 2019-06-25 a las 18 06 13 Captura de pantalla 2019-06-25 a las 18 06 54

Furthermore, if I delete the Search feature and come back to execute gradle clean test -P=chrome, the Search feature appears...

What am I doing wrong?

Thanks in advance!

wakaleo commented 5 years ago

If you are running on Windows there is a known issue when you put a feature file in the root directory (src/test/resources/features). Generally you should place your feature files in sub-directories organised by capability/epic etc.

ismaelcabanas commented 5 years ago

I am using MacOS and the structure of my features is like this

Captura de pantalla 2019-06-25 a las 23 26 56

But, when I execute the test gradle task, surprisingly, the report generated by Serenity is something like this

Captura de pantalla 2019-06-25 a las 23 15 59

I have displayed the report with several browsers, and the result is the same.

wakaleo commented 5 years ago

It looks like a Gradle-related issue of some kind. I reproduced it initially but running "gradle clean test aggregate" eventually worked. Not sure what it's due to.

ismaelcabanas commented 5 years ago

@wakaleo you are right. It must be a Gradle-related issue. I had this one in my build.gradle: acceptanceTest.finalizedBy(aggregate). And this task executed when I launched gradle clean check, but the reports were wrong.

I have commented this line and I have executed gradle clean check aggregate and now, the reports are generated correctly.

Thanks for your help!