Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aggregated report index.html is not generated automatically #7

Open
Aanasta opened this issue Jun 18, 2019 · 31 comments
Open

Aggregated report index.html is not generated automatically #7

Aanasta opened this issue Jun 18, 2019 · 31 comments

Comments

@Aanasta
Copy link

Aanasta commented Jun 18, 2019

Hello,

I cannot get my index.html report generated in target/site/serenity after I run my Serenity tests using mvn clean verify or mvn clean both in case when some tests fail and when none fail. However it gets generated after running mvn serenity:aggregate.

Could you please help me find the solution to generate the report automatically?

Here's my pom.xml file, I mostly used the pom.xml provided in the serenity-junit-starter:

   <properties>
        <serenity.version>2.0.48</serenity.version>
        <serenity.maven.version>2.0.48</serenity.maven.version>
        <webdriver.driver>chrome</webdriver.driver>
    </properties>

    <dependencies>
        <dependency>
            <groupId>net.serenity-bdd</groupId>
            <artifactId>serenity-core</artifactId>
            <version>${serenity.version}</version>
        </dependency>
        <dependency>
            <groupId>net.serenity-bdd</groupId>
            <artifactId>serenity-junit</artifactId>
            <version>${serenity.version}</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.13-beta-1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-model</artifactId>
            <version>3.3.9</version>
        </dependency>
    </dependencies>

<build>
        <pluginManagement>
            <plugins>
               <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.8.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.22.0</version>
                    <configuration>
                        <testFailureIgnore>true</testFailureIgnore>
                    </configuration>
                </plugin>
                <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>2.22.0</version>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.surefire</groupId>
                        <artifactId>surefire-junit4</artifactId>
                        <version>2.22.0</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <includes>
                        <include>**/*Test.java</include>
                    </includes>
                    <testFailureIgnore>true</testFailureIgnore>
                </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>
        </pluginManagement>
    </build>


@wakaleo
Copy link
Member

wakaleo commented Jun 18, 2019

Try putting the serenity-maven-plugin section in the section, not in

@Aanasta
Copy link
Author

Aanasta commented Jun 20, 2019

Hi @wakaleo, thanks a lot for your comment. It seems like it wasn't completed at the most interesting point. Could you please have one more look and tell me what section should I try putting it in?

@sudhir-kunchakuri
Copy link

Even i am facing the same issue blank report is getting generated sometimes in my index.html ..
@wakaleo , Can you please let me know what changes should i need to do in my build.gradle or in someother file,
so that everytime i get successful report in index.html file

Below is mybuild.gradle file:
++++++++++++++++++++++++++++

buildscript {
repositories {
maven {
url "hided the url"
}
mavenLocal()
}
dependencies {
classpath("net.serenity-bdd:serenity-gradle-plugin:2.2.9")
}
}
apply plugin: 'java'
apply plugin: 'net.serenity-bdd.aggregator'

group 'hided the group details'
version '1.0-SNAPSHOT'

repositories {
mavenLocal()
maven {
url "hided the url.."
}
}
dependencies {
implementation 'net.serenity-bdd:serenity-core:2.2.5'
implementation 'net.serenity-bdd:serenity-junit:2.2.9'
implementation 'net.serenity-bdd:serenity-cucumber5:2.2.5'
implementation 'net.serenity-bdd:serenity-ensure:2.2.10'
implementation 'org.apache.commons:commons-lang3:3.11'
testImplementation 'net.serenity-bdd:serenity-screenplay-webdriver:2.2.5'
implementation 'org.projectlombok:lombok:1.18.12'
}

test.finalizedBy(aggregate)

test {
systemProperties(System.getProperties())
}

+++++++++++++++++++++++++

@s9g0
Copy link

s9g0 commented Jun 10, 2021

Hi.. were u able to figure out what's causing reports not be generated? Suddenly, am facing similar issue, even though I did not make any change to my pom.xml .. Appreciate your inputs

@sudhir-kunchakuri
Copy link

@s9g0
From the Menu, click on Run and then click on Debug option and then separate debug console screen will get display and from it i click on aggregate option and then click on debug -- this will re run the aggregate and generate the report..
this is temp. fix. even i am looking for permanent fix..

image
image

@wakaleo
Copy link
Member

wakaleo commented Jun 10, 2021

This seems like expected behaviour. The index file is generated by the aggregate task, not by the individual tests. This is intentional and normal behaviour.

@sudhir-kunchakuri
Copy link

@wakaleo , agree index file will be get generated by aggregate task..but why does sometimes index file is getting generated with blank report.. can u plz tell us what and where may be the issue in this case?

@wakaleo
Copy link
Member

wakaleo commented Jun 10, 2021

If the index.html file is blank, it's generally because no Serenity tests were executed or because there was an issue in the report generation - you will know which from the console output.

@sudhir-kunchakuri
Copy link

I can see my tests are getting pass from the console but when i see the index.html it is blank report.. so unable to know what is the issue in the report generation ?? how can we find it ??

@wakaleo
Copy link
Member

wakaleo commented Jun 10, 2021

If there are issues with the report generation, you will see the error messages when you run "mvn serenity:aggregate" or "mvn verify" from the command line. What do you mean by "blank report"?

@s9g0
Copy link

s9g0 commented Jun 10, 2021

Thanks guys for your suggestions.
I am using Eclipse on a Win 10 laptop. @sudhir-kunchakuri from screenshots is it IntelliJ?
But anyways, i did run just "mvn serenity:aggregate" as well, and i still get 0 test cases passed/failed.

Please note, i have the same configuration i.e. pom.xml, JDK version, code files etc,. in a different laptop, and it works fine there.
This most likely looks like some Java or Maven config, but not able to figure out. Appreciate your inputs

@victorgallegosGIT
Copy link

victorgallegosGIT commented Aug 25, 2021

Hello @wakaleo I have a similar problem, the issue that runs all fine. but the report comes out blank. This is how it comes out on the console
image
that's how it comes out on the console
image
image

I leave my Pom.xml just in case.


4.0.0
net.serenitybdd.starter
serenity-junit-starter
1.0.0-SNAPSHOT
jar

<name>Sample Serenity BDD project using JUnit</name>

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <serenity.version>2.3.2</serenity.version>
    <serenity.maven.version>2.3.2</serenity.maven.version>
    <serenity.cucumber.version>2.3.2</serenity.cucumber.version>
    <encoding>UTF-8</encoding>
    <tags></tags>
    <parallel.tests>4</parallel.tests>
    <webdriver.base.url></webdriver.base.url>
</properties>

<repositories>
    <repository>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
        <id>central</id>
        <name>bintray</name>
        <url>http://jcenter.bintray.com</url>
    </repository>
</repositories>
<pluginRepositories>
    <pluginRepository>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
        <id>central</id>
        <name>bintray-plugins</name>
        <url>http://jcenter.bintray.com</url>
    </pluginRepository>
</pluginRepositories>

<dependencies>
    <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-classic</artifactId>
        <version>1.0.13</version>
    </dependency>
    <dependency>
        <groupId>net.serenity-bdd</groupId>
        <artifactId>serenity-core</artifactId>
        <version>${serenity.version}</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>net.serenity-bdd</groupId>
        <artifactId>serenity-junit</artifactId>
        <version>${serenity.version}</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>net.serenity-bdd</groupId>
        <artifactId>serenity-screenplay</artifactId>
        <version>${serenity.version}</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>net.serenity-bdd</groupId>
        <artifactId>serenity-screenplay-webdriver</artifactId>
        <version>${serenity.version}</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>net.serenity-bdd</groupId>
        <artifactId>serenity-cucumber6</artifactId>
        <version>2.3.2</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.12</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.assertj</groupId>
        <artifactId>assertj-core</artifactId>
        <version>3.6.2</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.hamcrest</groupId>
        <artifactId>hamcrest-all</artifactId>
        <version>1.3</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>net.serenity-bdd</groupId>
        <artifactId>serenity-ensure</artifactId>
        <version>${serenity.version}</version>
        <scope>test</scope>
    </dependency>
</dependencies>
<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.22.2</version>
            <configuration>
                <skip>true</skip>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <version>2.22.2</version>
            <configuration>
                <includes>
                    <include>**/Runner.java</include>
                    <include>**/*Test.java</include>
                    <include>**/Test*.java</include>
                    <include>**/*TestSuite.java</include>
                    <include>**/When*.java</include>
                </includes>
                <systemPropertyVariables>
                    <webdriver.base.url>${webdriver.base.url}</webdriver.base.url>
                </systemPropertyVariables>
                <parallel>classes</parallel>
                <threadCount>${parallel.tests}</threadCount>
                <forkCount>${parallel.tests}</forkCount>
            </configuration>
            <executions>
                <execution>
                    <goals>
                        <goal>integration-test</goal>
                        <goal>verify</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
        <plugin>

            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.7.0</version>
            <configuration>
                <source>1.8</source>
                <target>1.8</target>
            </configuration>
        </plugin>
        <plugin>
            <groupId>net.serenity-bdd.maven.plugins</groupId>
            <artifactId>serenity-maven-plugin</artifactId>
            <version>${serenity.maven.version}</version>
            <configuration>
                <tags>${tags}</tags>
            </configuration>
            <executions>
                <execution>
                    <id>serenity-reports</id>
                    <phase>post-integration-test</phase>
                    <goals>
                        <goal>aggregate</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

@s9g0
Copy link

s9g0 commented Aug 26, 2021

For me this got resolved without doing much. I was playing around with running in debug mode and removed the eclipse run configurations and re-created them. Somewhere in those multiple trial and errors, it worked. Sorry, I do not have any detailed steps to suggest.

@kempegowdad
Copy link

Hello,
I am also facing an issue, I can see test result in console but when I open index.html its showing test execution is '0'.

Can you please help me why it's showing 'zero' result.

Thanks,
Divya

@s9g0
Copy link

s9g0 commented Jun 29, 2022

@kempegowdad - unfortunately there wasn't any specific solution that worked.. it was trial and error as others suggested where we run in debug mode couple of times and doing clean builds.. and surprisingly it started working..
so sorry, no particular steps..
one suggestion is to get latest version of maven failsafe and surefire plugins and try out

@wakaleo
Copy link
Member

wakaleo commented Jun 29, 2022

This is generally due to an error in the maven-failsafe-plugin configuration.

@kempegowdad
Copy link

kempegowdad commented Jun 30, 2022

@s9g0 @wakaleo Thank you for your response.

I was using maven-failsafe-pluging version 3.0.0-M5 and I changed to 3.0.0-M7, still facing same issue.

Can you please have look of my pom.xml and suggested me something if you find some solution.

Please find my pom.xml here

<properties>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <serenity.version>2.6.0</serenity.version>
    <serenity.cucumber.version>2.6.0</serenity.cucumber.version>
    <rest.assured.version>4.4.0</rest.assured.version>
    <junit.version>4.13.2</junit.version>
    <maven.compiler.plugin.version>3.8.1</maven.compiler.plugin.version>
    <maven.surefire.plugin.version>3.0.0-M7</maven.surefire.plugin.version>
    <maven.failsafe.plugin.version>3.0.0-M7</maven.failsafe.plugin.version>
    <tags>tags</tags>
</properties>

<repositories>
    <repository>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
        <id>central</id>
        <name>bintray</name>
        <url>https://jcenter.bintray.com</url>
    </repository>
</repositories>
<pluginRepositories>
    <pluginRepository>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
        <id>central</id>
        <name>bintray-plugins</name>
        <url>https://jcenter.bintray.com</url>
    </pluginRepository>
</pluginRepositories>

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>software.amazon.awssdk</groupId>
            <artifactId>bom</artifactId>
            <version>2.16.60</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

<dependencies>

    <!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind -->
    <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
        <version>2.13.3</version>
    </dependency>

    <dependency>
        <groupId>com.aventstack</groupId>
        <artifactId>extentreports</artifactId>
        <version>5.0.9</version>
    </dependency>

    <dependency>
        <groupId>io.rest-assured</groupId>
        <artifactId>rest-assured</artifactId>
        <version>${rest.assured.version}</version>
        <scope>test</scope>
    </dependency>

    <dependency>
        <groupId>io.rest-assured</groupId>
        <artifactId>json-schema-validator</artifactId>
        <version>5.1.1</version>
    </dependency>

    <dependency>
        <groupId>org.json</groupId>
        <artifactId>json</artifactId>
        <version>20220320</version>
    </dependency>

    <dependency>
        <groupId>com.googlecode.json-simple</groupId>
        <artifactId>json-simple</artifactId>
        <version>1.1.1</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/com.amazonaws/aws-java-sdk-s3 -->
    <dependency>
        <groupId>com.amazonaws</groupId>
        <artifactId>aws-java-sdk-s3</artifactId>
        <version>1.12.239</version>
    </dependency>

    <dependency>
        <groupId>software.amazon.awssdk</groupId>
        <artifactId>s3</artifactId>
    </dependency>
    <dependency>
        <groupId>software.amazon.awssdk</groupId>
        <artifactId>kms</artifactId>
    </dependency>
    <dependency>
        <groupId>software.amazon.awssdk</groupId>
        <artifactId>s3control</artifactId>
    </dependency>

    <dependency>
        <groupId>com.amazonaws</groupId>
        <artifactId>aws-java-sdk-dynamodb</artifactId>
        <version>1.12.239</version>
    </dependency>

    <dependency>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok</artifactId>
        <version>1.18.24</version>
    </dependency>

    <dependency>
        <groupId>net.serenity-bdd</groupId>
        <artifactId>serenity-core</artifactId>
        <version>${serenity.version}</version>
        <scope>test</scope>
    </dependency>

    <dependency>
        <groupId>net.serenity-bdd</groupId>
        <artifactId>serenity-cucumber6</artifactId>
        <version>${serenity.cucumber.version}</version>
        <scope>test</scope>
    </dependency>

    <dependency>
        <groupId>net.serenity-bdd</groupId>
        <artifactId>serenity-screenplay-rest</artifactId>
        <version>${serenity.version}</version>
        <scope>test</scope>
    </dependency>

    <dependency>
        <groupId>net.serenity-bdd</groupId>
        <artifactId>serenity-rest-assured</artifactId>
        <version>${serenity.version}</version>
        <scope>test</scope>
    </dependency>

    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>${junit.version}</version>
        <scope>test</scope>
    </dependency>

    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-simple</artifactId>
        <version>1.6.1</version>
    </dependency>

</dependencies>
<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>${maven.surefire.plugin.version}</version>
            <configuration>
                <skip>true</skip>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <version>${maven.failsafe.plugin.version}</version>
            <configuration>
                <includes>
                    <include>**/TestRunner.java</include>
                </includes>
                <testFailureIgnore>true</testFailureIgnore>
            </configuration>
            <executions>
                <execution>
                    <goals>
                        <goal>integration-test</goal>
                        <goal>verify</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.8.1</version>
            <configuration>
                <source>${maven.compiler.source}</source>
                <target>${maven.compiler.source}</target>
            </configuration>
        </plugin>
        <plugin>
            <groupId>net.serenity-bdd.maven.plugins</groupId>
            <artifactId>serenity-maven-plugin</artifactId>
            <version>${serenity.version}</version>
            <dependencies>
                <dependency>
                    <groupId>net.serenity-bdd</groupId>
                    <artifactId>serenity-core</artifactId>
                    <version>${serenity.version}</version>
                </dependency>
            </dependencies>
            <executions>
                <execution>
                    <id>serenity-reports</id>
                    <phase>post-integration-test</phase>
                    <goals>
                        <goal>aggregate</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

@kempegowdad
Copy link

Also in Jenkins getting this error

failed to execute goal �[32mnet.serenity-bdd.maven.plugins:serenity-maven-plugin:2.6.0:aggregate�[m �[1m(serenity-reports)�[m on project �[36mfca-hydra-Harvester-Test-Automation�[m: �[1;31mExecution serenity-reports of goal net.serenity-bdd.maven.plugins:serenity-maven-plugin:2.6.0:aggregate failed: Plugin net.serenity-bdd.maven.plugins:serenity-maven-plugin:2.6.0 or one of its dependencies could not be resolved: Failed to collect dependencies at net.serenity-bdd.maven.plugins:serenity-maven-plugin:jar:2.6.0 -> net.serenity-bdd:serenity-core:jar:2.6.0 -> net.serenity-bdd:serenity-model:jar:2.6.0 -> org.reflections:reflections:jar:0.9.12 -> org.javassist:javassist:jar:3.21.0-GA�[m: Failed to read artifact descriptor for org.javassist:javassist:jar:3.21.0-GA: Could not transfer artifact org.javassist:javassist:pom:3.21.0-GA from/to central (https://jcenter.bintray.com/): Connection reset -> �[1m[Help 1]�[m

@s9g0
Copy link

s9g0 commented Jun 30, 2022

@kempegowdad - you are using quite an old version of serenity. Update to latest version and refer to the cucumber-starter template project for reference.. link below..
https://github.com/serenity-bdd/serenity-cucumber-starter/blob/master/pom.xml

With respect to Jenkins, I am not sure what it means, and am no expert on Jenkins side of things.. One hunch is to check if your jenkins server is able to access the maven repo. I believe Jcenter public version was being decommissioned. You may try other maven repos "https://repo.maven.apache.org/maven2" or even better remove that repository tag.

Hope this helps and good luck

@kempegowdad
Copy link

kempegowdad commented Jun 30, 2022

Thank you @s9g0 I referred cucumber-starter project which you shared but for that I am getting an exception io.cucumber.core.exception.cucumberexception: failed to instantiate class

Also, I am using rest assured along with it if I update serenity version to 3.2.5 and not using serenity-cucumber6 instead took cucumber-started project reference I am getting this error io.cucumber.core.exception.cucumberexception: failed to instantiate class

@s9g0
Copy link

s9g0 commented Jun 30, 2022

I am not sure how you're using Serenity.
For a specific need, I am experimenting with Serenity Cucumber + Serenity Rest and was able to do a basic test that is a combination of Browser action followed by an API interaction.

This is my pom.xml. And I use @RunWith(CucumberWithSerenity.class) on CucumberTestSuite.java.


4.0.0
net.serenitybdd.starter
cucumber-starter
1.0.0-SNAPSHOT
jar

<name>Sample Serenity BDD + RestAssured project using Cucumber</name>

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <serenity.version>3.2.1</serenity.version>
    <encoding>UTF-8</encoding>
    <tags></tags>
    <webdriver.base.url></webdriver.base.url>
</properties>
<dependencies>
    <dependency>
        <groupId>net.serenity-bdd</groupId>
        <artifactId>serenity-core</artifactId>
        <version>${serenity.version}</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>net.serenity-bdd</groupId>
        <artifactId>serenity-cucumber</artifactId>
        <version>${serenity.version}</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>net.serenity-bdd</groupId>
        <artifactId>serenity-rest-assured</artifactId>
        <version>${serenity.version}</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>net.serenity-bdd</groupId>
        <artifactId>serenity-screenplay</artifactId>
        <version>${serenity.version}</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>net.serenity-bdd</groupId>
        <artifactId>serenity-screenplay-rest</artifactId>
        <version>${serenity.version}</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>io.rest-assured</groupId>
        <artifactId>rest-assured</artifactId>
        <version>4.3.2</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>io.rest-assured</groupId>
        <artifactId>json-path</artifactId>
        <version>4.3.3</version>
    </dependency>
    <dependency>
        <groupId>io.rest-assured</groupId>
        <artifactId>xml-path</artifactId>
        <version>4.3.3</version>
    </dependency>
     <dependency>
        <groupId>net.serenity-bdd</groupId>
        <artifactId>serenity-screenplay-webdriver</artifactId>
        <version>${serenity.version}</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>net.serenity-bdd</groupId>
        <artifactId>serenity-ensure</artifactId>
        <version>${serenity.version}</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.junit.platform</groupId>
        <artifactId>junit-platform-launcher</artifactId>
        <version>1.8.1</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-engine</artifactId>
        <version>5.8.2</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.junit.vintage</groupId>
        <artifactId>junit-vintage-engine</artifactId>
        <version>5.8.2</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-classic</artifactId>
        <version>1.2.10</version>
    </dependency>
    <dependency>
        <groupId>org.assertj</groupId>
        <artifactId>assertj-core</artifactId>
        <version>3.6.2</version>
        <scope>test</scope>
    </dependency>
</dependencies>
<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>3.0.0-M5</version>
            <configuration>
                <skip>true</skip>
            </configuration>
        </plugin>
        <plugin>
            <artifactId>maven-failsafe-plugin</artifactId>
            <version>3.0.0-M5</version>
            <configuration>
                <includes>
                    <include>**/*Test.java</include>
                    <include>**/Test*.java</include>
                    <include>**/*TestSuite.java</include>
                    <include>**/When*.java</include>
                </includes>
                <systemPropertyVariables>
                    <webdriver.base.url>${webdriver.base.url}</webdriver.base.url>
                </systemPropertyVariables>
                <parallel>classes</parallel>
                <parallel>methods</parallel>
                <useUnlimitedThreads>true</useUnlimitedThreads>
            </configuration>
            <executions>
                <execution>
                    <goals>
                        <goal>integration-test</goal>
                        <goal>verify</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.8.1</version>
            <configuration>
                <source>1.8</source>
                <target>1.8</target>
            </configuration>
        </plugin>
        <plugin>
            <groupId>net.serenity-bdd.maven.plugins</groupId>
            <artifactId>serenity-maven-plugin</artifactId>
            <version>${serenity.version}</version>
            <configuration>
                <tags>${tags}</tags>
            </configuration>
            <executions>
                <execution>
                    <id>serenity-reports</id>
                    <phase>post-integration-test</phase>
                    <goals>
                        <goal>aggregate</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

@kempegowdad
Copy link

@s9g0 which serenity version are you using, my project is only backend no UI and also which java version are you using for this project (Sample Serenity BDD + RestAssured project using Cucumber)

@s9g0
Copy link

s9g0 commented Jun 30, 2022

@kempegowdad - its in the pom.xml. Mostly i use Java 1.8, but this works on jdk 17.0.1 as well

<serenity.version>3.2.1</serenity.version>

@kempegowdad
Copy link

@s9g0 Thank you, I can run my tests using <serenity.version>3.2.1</serenity.version> but still same issue index.html returns '0' scenarios.

@wakaleo
Copy link
Member

wakaleo commented Jul 1, 2022

What is the console output showing?

@kempegowdad
Copy link

In console test results are displaying as expected and giving the link to individual test results html page for each feature files. But these result files are not aggregating into index.html

@wakaleo
Copy link
Member

wakaleo commented Jul 1, 2022

Are oyu seeing this with the starter project?

@kempegowdad
Copy link

kempegowdad commented Jul 1, 2022

@wakaleo yes with starter project, but I have error (Plugin 'net.serenity-bdd.maven.plugins:serenity-maven-plugin:3.2.1' not found) for serenity maven plugin in pom.xml for serenity 3.2.1 version

<plugin>
                <groupId>net.serenity-bdd.maven.plugins</groupId>
                <artifactId>serenity-maven-plugin</artifactId>
                <version>${serenity.version}</version>
                <dependencies>
                    <dependency>
                        <groupId>net.serenity-bdd</groupId>
                        <artifactId>serenity-core</artifactId>
                        <version>${serenity.version}</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <id>serenity-reports</id>
                        <phase>post-integration-test</phase>
                        <goals>
                            <goal>aggregate</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

@bondanyudis
Copy link

Hello guys..
any update for this ? I am also facing an issue..
empty index.html

@muhammadfiqhifahmi
Copy link

Hello guys..
any update for this ? I am also facing an issue..
empty index.html, I am using gradle

@muhammadfiqhifahmi
Copy link

Hello guys..
any update for this ? I am also facing an issue..
empty index.html, I am using gradle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants