Skip to content

Other Cucumber plugins are not executing if ReportPortal server is down #319

@fslevoaca-ionos

Description

@fslevoaca-ionos

Describe the bug
Other Cucumber plugins are not executing if ReportPortal server is down

Steps to Reproduce
Steps to reproduce the behavior:

  1. Configure ReportPortal plugin along with Cucumber JSON plugin
        <profile>
            <id>report-portal</id>
            <properties>
                <cucumber.plugin>
                    <!-- @formatter:off -->
                    json:target/cucumber-report/report.json,com.epam.reportportal.cucumber.ScenarioReporter
                    <!-- @formatter:on -->
                </cucumber.plugin>
            </properties>
            <dependencies>
                <dependency>
                    <groupId>com.epam.reportportal</groupId>
                    <artifactId>agent-java-cucumber7</artifactId>
                    <version>${report.portal.cucumber.agent.version}</version>
                    <scope>test</scope>
                </dependency>
            </dependencies>
  1. Shut down ReportPortal server.
  2. Run tests

Expected behavior
JSON Cucumber plugin should generate the report inside target/cucumber-report/report.json even if the ReportPortal server is down.

Actual behavior
target/cucumber-report/report.json is empty because the ReportPortal client fails to connect to server.

This is because both ReportPortal and JSON Cucumber plugins are using the same event bus, hence if Cucumber ReportPortal plugin has uncaught errors, Cucumber's event bus stops propagating that event to the remaining handlers.

Solution is to make Cucumber ReportPortal plugin com.epam.reportportal.cucumber.ScenarioReporter fault tolerant.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions