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 3.6.0, the API call informations aren't displayed in Serenity HTML report after running Cucumber scenarios with Serenity in parallel #3030

Closed
HaiDoan1987 opened this issue Jan 27, 2023 · 11 comments

Comments

@HaiDoan1987
Copy link

I'm following the https://serenity-bdd.github.io/docs/guide/cucumber document to set up the cucumber test run in parallel. After the test run

  1. The Serenity HTML report is generated successfully
  2. The test results for each scenario are correct however when I try to view the API call information ( such as endpoint, payload, and response), It doesn't display on the Serenity Html reports
  • The junit-platform.properties file
cucumber.execution.parallel.enabled=true
cucumber.execution.parallel.config.strategy=dynamic
cucumber.execution.parallel.config.fixed.parallelism=10
cucumber.plugin=io.cucumber.core.plugin.SerenityReporterParallel
  • CucumberTestSuite class
@Suite
@IncludeEngines("cucumber")
@SelectClasspathResource("/features")
public class CucumberTestSuite {}
  • POM file
        <serenity.version>3.6.0</serenity.version>

<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-junit5</artifactId>
            <version>${serenity.version}</version>
        </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>net.serenity-bdd</groupId>
            <artifactId>serenity-cucumber</artifactId>
            <version>${serenity.version}</version>
            <scope>test</scope>
   <dependency>
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-launcher</artifactId>
            <version>1.9.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-junit-platform-engine</artifactId>
            <version>7.11.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-suite</artifactId>
            <version>1.9.2</version>
            <scope>test</scope>
        </dependency>
        </dependency>
@wakaleo
Copy link
Member

wakaleo commented Feb 1, 2023

Fixed in 3.6.7

@wakaleo wakaleo closed this as completed Feb 1, 2023
@GianniGiglio
Copy link
Contributor

@cliviu Question since I was trying out the junit5 cucumber parallel execution. cucumber.execution.parallel.config.fixed.parallelism=10 is not taking into account because of this all scenario's are started in parallel. Even when I set the parallelism to 1 I see that for each scenario a worker thread is started simultaneously.

Could you confirm if you have the same issue?

1 similar comment
@GianniGiglio
Copy link
Contributor

@cliviu Question since I was trying out the junit5 cucumber parallel execution. cucumber.execution.parallel.config.fixed.parallelism=10 is not taking into account because of this all scenario's are started in parallel. Even when I set the parallelism to 1 I see that for each scenario a worker thread is started simultaneously.

Could you confirm if you have the same issue?

@cliviu
Copy link
Collaborator

cliviu commented Feb 2, 2023

hey @GianniGiglio , here are the docs . As long as cucumber.execution.parallel.enabled is set, the scenarios are executed in parallel.

@GianniGiglio
Copy link
Contributor

hey @GianniGiglio , here are the docs . As long as cucumber.execution.parallel.enabled is set, the scenarios are executed in parallel.

Thanks I know but image you have 20 scenario's and you've set cucumber.execution.parallel.config.fixed.parallelism=5 I see that all 20 scenario's are executed at the same time in parallel instead of just 5

@cliviu
Copy link
Collaborator

cliviu commented Feb 2, 2023

This may be a good question for the Cucumber team I guess. We are just dealing with whatever threads are coming :-).

@GianniGiglio
Copy link
Contributor

This may be a good question for the Cucumber team I guess. We are just dealing with whatever threads are coming :-).

Thanks i'll open a ticket for the cucumber team. I as just trying to confirm if you experienced the same issue. you can easlily see this when you use the timeline plugin

cucumber.plugin=io.cucumber.core.plugin.SerenityReporterParallel, pretty, json:target/cucumber.json, timeline:build/timeline/

The report clearly shows that all scenario's are executed at the same time instead of the number you configure.
Makes it pretty unusable in this state

@wakaleo
Copy link
Member

wakaleo commented Feb 2, 2023

As @cliviu said, this is more a question for the Cucumber folk (Serenity doesn't have any control over how you configure the JUnit 5/Cucumber parallel options), but is it a fixed number of threads in total, or a fixed number of threads per core?

@GianniGiglio
Copy link
Contributor

@wakaleo fixed number of threads based om my junit 5 experiance and parallelization. Agreed that this is a cucumber-jvm question or even something to ask the Junit team.

@GianniGiglio
Copy link
Contributor

@wakaleo FYI this is a know bug you need to set the .max-pool-size property. If not, you run into a JUnit bug where more threads will start when your test waits for Web Driver to start.

@cliviu
Copy link
Collaborator

cliviu commented Feb 2, 2023

@GianniGiglio Cool, thanks for the update

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

4 participants