agent-java-cucumber icon indicating copy to clipboard operation
agent-java-cucumber copied to clipboard

'com.epam.reportportal.cucumber.ScenarioReporter' does not implement 'io.cucumber.plugin.Plugin'.

Open Rabindra184 opened this issue 4 years ago • 4 comments

*Describe the bug

I am getting the below error while integrating with Cucumber testng project.

java.lang.IllegalArgumentException: The plugin specification 'com.epam.reportportal.cucumber.ScenarioReporter' has a problem:

'com.epam.reportportal.cucumber.ScenarioReporter' does not implement 'io.cucumber.plugin.Plugin'.

Plugin specifications should have the format of PLUGIN[:[PATH|[URI [OPTIONS]]]

Valid values for PLUGIN are: html, json, junit, message, pretty, progress, rerun, summary, teamcity, testng, timeline, unused, usage

PLUGIN can also be a fully qualified class name, allowing registration of 3rd party plugins. The 3rd party plugin must implement io.cucumber.plugin.Plugin

Rabindra184 avatar Nov 16 '22 19:11 Rabindra184

I am using the below in my pom.xml file com.epam.reportportal agent-java-cucumber6 5.1.2

	<dependency>
		<groupId>com.epam.reportportal</groupId>
		<artifactId>logger-java-logback</artifactId>
		<version>5.1.3</version>
		<scope>test</scope>
	</dependency>

The below is the Runner file.

package com.learn.spring.springselenium;

import io.cucumber.testng.AbstractTestNGCucumberTests; import io.cucumber.testng.CucumberOptions; import org.testng.annotations.DataProvider;

@CucumberOptions(plugin = { "pretty", "html:report.html", "com.epam.reportportal.cucumber.ScenarioReporter" }, features = "classpath:features", tags = "not @ignore", glue = "com.learn.spring.springselenium.bdd")

public class CucumberRunner2 extends AbstractTestNGCucumberTests { @Override @DataProvider(parallel = false) public Object[][] scenarios() { return super.scenarios(); } }

Rabindra184 avatar Nov 16 '22 20:11 Rabindra184

I am using the below in my pom.xml file

com.epam.reportportal agent-java-cucumber6 5.1.2

Don't

Please make sure you are not including multiple versions of our agents, since ScenarioReporter do implement this interface through io.cucumber.plugin.ConcurrentEventListener since ver. 5. So most likely you have agent-java-cucumber4 or lower version of agents in your dependencies which is being picked up by your Runner instead of correct one.

HardNorth avatar Nov 17 '22 13:11 HardNorth

I have the same issue. Here's my dependencies in pom.xml:

    <dependencies>
        <dependency>
            <groupId>com.epam.jdi</groupId>
            <artifactId>jdi-dark-bdd</artifactId>
            <version>1.1.13</version>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.18.26</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>5.9.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.epam.reportportal</groupId>
            <artifactId>agent-java-cucumber</artifactId>
            <version>5.1.3</version>
        </dependency>
        <dependency>
            <groupId>com.epam.reportportal</groupId>
            <artifactId>logger-java-logback</artifactId>
            <version>5.1.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-junit</artifactId>
            <version>7.10.1</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

I can also provide the dependency tree information.

n524922 avatar Mar 22 '23 10:03 n524922

@n524922 Your agent artifactId is incorrect, you should use agent-java-cucumber6 if you want support of Cucumber 6/7.

HardNorth avatar Mar 22 '23 11:03 HardNorth