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

Serenity + Selenium Grid - Seperate Report Generation - Missing index.html file #392

Closed
selvavaithi opened this issue Apr 26, 2016 · 10 comments

Comments

@selvavaithi
Copy link

selvavaithi commented Apr 26, 2016

Hi,
I have used Serenity + Selenium grid for Parallel execution.

used the following code to provide serenity report in separate different folders.

For Node1
getSystemConfiguration().setIfUndefined(ThucydidesSystemProperty.THUCYDIDES_OUTPUT_DIRECTORY.getPropertyName(),
"/GridSerenityProcess/target/site/serenity/");

for node2
getSystemConfiguration().setIfUndefined(ThucydidesSystemProperty.THUCYDIDES_OUTPUT_DIRECTORY.getPropertyName(),
"/GridSerenityProcess/target/site/serenity1/");

Now the process run successfully but the reports on the mentioned folder missing the index.html file. In "/GridSerenityProcess/target/site/serenity/" and "/GridSerenityProcess/target/site/serenity1/" the step files are being generated but the index.html file is missing.

Im using Serenity - 1.1.31
Serenity-JBehave - 1.9.0
In Eclispe Mars 2
OS- Windows 8.1.

@YamStranger
Copy link
Member

Hello @selvavaithi
Did you run aggregation for your reports?

I mean, that index.html will be created only after aggregation of report. Also you can copy all files to one directory and create aggregation reports for all your tests, previously executed on different nodes (if they are different off-cause)

Thanks

@selvavaithi
Copy link
Author

selvavaithi commented Apr 27, 2016

Hi @YamStranger

I user mvn clean verify and following is my Maven Setup.


4.0.0

<groupId>com.test.serenitygrid</groupId>
<artifactId>GridSerenityProcess</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>

<name>GridSerenityProcess</name>
<url>http://maven.apache.org</url>


<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <serenity.version>1.1.31</serenity.version>
    <serenity.jbehave.version>1.9.0</serenity.jbehave.version>
    <serenity.maven.version>1.1.26</serenity.maven.version>
</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-jbehave</artifactId>
        <version>${serenity.jbehave.version}</version>
    </dependency>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.12</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>1.7.19</version>
    </dependency>

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

</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <version>2.19.1</version>
            <configuration>
                <includes>
                    <include>**/**TestSuite.java</include>
                </includes>
                <forkCount>2</forkCount>
                <reuseForks>true</reuseForks>
            </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.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>

@YamStranger
Copy link
Member

Hello @selvavaithi
Please try to run same build after updating maven plugin to latest version, it is 1.1.31

Thanks!

@selvavaithi
Copy link
Author

selvavaithi commented Apr 27, 2016

Hi @YamStranger
Sorry i forgot to remove 'serenity.maven.version' " <serenity.maven.version>1.1.26</serenity.maven.version>" actually i have used 'serenity.version' <serenity.version>1.1.31</serenity.version> for the serenity maven plugin

org.apache.maven.plugins maven-failsafe-plugin 2.19.1 **/**TestSuite.java 2 true integration-test verify
        <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>

Thank you

@wakaleo
Copy link
Member

wakaleo commented May 14, 2016

Hi @selvavaithi,

Are you seeing any errors in the console when you run the tests?

@selvavaithi
Copy link
Author

Hi @wakaleo
Now im seeing the index.html but when using the same .story file for two different nodes the report is shown for any one node only is it possible to show report for two nodes differently.

but when using different .story file for this two different nodes im getting the report perfectly.

@wakaleo
Copy link
Member

wakaleo commented May 18, 2016

Hi @selvavaithi, running the same .story file on different nodes isn't supported at the moment; if you have identified this as a need, we will mark it as an enhancement.

@selvavaithi
Copy link
Author

Hi @wakaleo
Yes, can you do that as an enhancement. Since there are certain instants where doing all the story in all the browser for cross browser testing in Parallel execution. Hence report generation is required for it.

Thanks in advance

@wakaleo wakaleo added enhancement and removed bug labels May 20, 2016
@nrajaqa
Copy link

nrajaqa commented Jul 11, 2018

Hi @wakaleo,

I think my issue fall under this enhancement. I am running my BDD scripts in Selenium Grid and seeing the report empty (index.html shows 0 run).

Getting error below.
[WARNING] ForkStarter IOException: For input string: "1;"
For input string: "34m"
For input string: "32m". See the dump file D:\bddframework\target\failsafe-reports\2018-07-11T10-27-35_216-jvmRun3.dumpstream
[INFO]
[INFO] Results:
[INFO]
[ERROR] Errors:
[ERROR] null
[ERROR] null
[ERROR] null
[ERROR] null
[INFO]
[ERROR] Tests run: 17, Failures: 0, Errors: 4, Skipped: 0
[INFO]
[INFO]
[INFO] --- serenity-maven-plugin:1.9.9:aggregate (serenity-reports) @ nsl ---
[INFO] current_project.base.dir: D:\bddframework
[INFO] Generating test results for 0 tests
[INFO] 103 requirements loaded after 10364 ms
[INFO] 103 related requirements found after 10365 ms
[INFO] Generating test outcome reports: false
[INFO] Starting generating reports: 10451 ms
[INFO] Configured report threads: 20
[INFO] Test results for 0 tests generated in 24606 ms
[INFO]
[INFO] --- maven-failsafe-plugin:2.21.0:verify (default) @ nsl ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 18:55 min
[INFO] Finished at: 2018-07-11T10:45:40-07:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.21.0:verify (default) on project nsl: There are test failures.
[ERROR]
[ERROR] Please refer to D:\NewellBDD\bddframework\target\failsafe-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream and [date]-jvmRun[N].dumpstream.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

Thanks,
Raja.

@immidisrikanth
Copy link

immidisrikanth commented Oct 1, 2018

Hi ,

I am using Serenity in my Automation project, While implementing Grid I initiated Remote driver but Inbuilt method of BDD getDriver() method is used in scripts. Remote Driver initiated in Hooks is getting overridden by getDriver() method in Pages.class (inbuilt method from serenity).

Due to this tests are not running on Node.

Hooks.java:

Remotedriver = new RemoteWebDriver(new URL("http://10.128.32.43:4444/wd/hub"), ieOptions);
In scripts :

getDriver().findElement(By.xpath("//input[contains(@data-bind,'closingReferenceId')]")).click();

Thanks for help

Thanks,
Srikanth

@wakaleo wakaleo closed this as completed Feb 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants