Scenario successfully ran. But, no index.html file being generated under target/site/serenity folder.

882 views
Skip to first unread message

Prasad Nutalapati

unread,
Nov 27, 2020, 2:03:39 AM11/27/20
to Serenity BDD Users Group
I am able to run my POC scenario inside the feature file successfully, but there is no index.html file being generated under target/site/serenity folder. What setting I need to enter in serenity.properties or serenity.conf files ??

sandeep...@qantasloyalty.com

unread,
Nov 27, 2020, 9:46:03 AM11/27/20
to Serenity BDD Users Group
you need to add a serenity plugin in pom.xml to aggregate the reports.

To run the tests, use command: mvn clean verify
above command will automatically run all the tests in your suite, generates the reports, also will be aggregated, i.e., index.html will be produced.

<build>
<plugins>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.20</version>
<configuration>
<includes>
<include>**/your runner java class here.java</include>
</includes>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>net.serenity-bdd.maven.plugins</groupId>
<artifactId>serenity-maven-plugin</artifactId>
<version>${serenity.maven.version}</version>
<executions>
<execution>
<id>serenity-reports</id>
<phase>post-integration-test</phase>
<goals>
<goal>aggregate</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

Prasad Nutalapati

unread,
Nov 27, 2020, 3:10:52 PM11/27/20
to Serenity BDD Users Group
Hello  All;
I have not installed maven on my local mac due to admin rights issue, so can't run from terminal. How to run 'mvn clean test' from with in the IntelliJ idea, I forgot. So all I am doing is highlight the runner class and pick Run. It is running passing all the steps in the scenario, but the index.html did not get formed under target/site/serenity. I believe, it is supposed to be formed automatically by the Serenity framework.

From the IntelliJ IDEA web site, I read
In the Run Anything window, start typing a name of the goal you want to execute. The window also displays a list of recent Maven goal entries.
So, I ran **mvn clean verify**.
Then the maven build the whole application, ran it successfully and then finally it generated the index.html file and the content.
Good lord ! Why this is so complicated ? Why can't it produce the site, after running just the Runner file.

Prasad Nutalapati

unread,
Nov 27, 2020, 3:13:58 PM11/27/20
to Serenity BDD Users Group
BTW Sandeep;
The plug in is already there as I was using the latest starter project
```<groupId>net.serenity-bdd.maven.plugins</groupId>
<artifactId>serenity-maven-plugin</artifactId>
<version>${serenity.maven.version}</version>```

John Ferguson Smart

unread,
Nov 27, 2020, 3:54:19 PM11/27/20
to Serenity BDD Users Group
Producing the full report is a heavy operation. If it happened after each test it would be very inefficient, particularly for large test suites. 
Reply all
Reply to author
Forward
0 new messages