reportportal / agent-java-cucumber

Cucumber JVM version [1.0.0; 2.0.0) adapter
Apache License 2.0
26 stars 16 forks source link

There is unexpected error with com.epam.reportportal.cucumber.StepReporter - It does not implement cucumber.api.Plugin #10

Closed Hunterok1 closed 4 years ago

Hunterok1 commented 6 years ago

Reproduces with agent-java-cucumber v.3.0.1 Gherkin version - 2.12.2

During cucumber run the error occurs: cucumber.runtime.CucumberException: Couldn't load plugin class: com.epam.reportportal.cucumber.StepReporter. It does not implement cucumber.api.Plugin

avarabyeu commented 6 years ago

@Hunterok1 which version of cucumberJVM do you use?

Hunterok1 commented 6 years ago

Cucumber version 2.3.1

avarabyeu commented 6 years ago

@Hunterok1 unfortunately, we do not support latest versions of cucumber. Our agent should be updated (or even re-implemented) for 2x cucumber generation

Rome3333 commented 6 years ago

Hi @avarabyeu, @DzmitryHumianiuk,

Any approximate estimates around cucumber 2x support? Is it already planned somehow? Cucumber 2 has been released half a year ago with some major changes which we are really need to have on our project and would be great to have support in report portal.

Thank you!

ruzeynalov commented 6 years ago

Guys, we need support for Cucumber version 2.x. I would really appreciate input from original developers of report portal agent. Thank you )

DzmitryHumianiuk commented 6 years ago

@ruzeynalov team focused on features development of core product.

We have no tangible plans for cucumber agent updates. But we gladly will help with review of PRs

ghost commented 6 years ago

I am also getting the same issue with the latest version.

Gherkin version - 2.12.2

io.cucumber cucumber-core 2.4.0
nstbushneva commented 5 years ago

We were considering using this tool in our project but unfortunately found this issue as a huge blocker. So +1 vote for this one.

DzmitryHumianiuk commented 5 years ago

@nstbushneva @Hunterok1 @rakeshmishra36 @ruzeynalov @Rome3333 https://github.com/reportportal/agent-java-cucumber2 https://github.com/reportportal/agent-java-cucumber3

indrabt commented 5 years ago

@DzmitryHumianiuk I still see empty repo for the link https://github.com/reportportal/agent-java-cucumber3 .Do we have any plan to add the feature soon ?+1 vote for this one

DzmitryHumianiuk commented 5 years ago

@indrabt somebody from contributors, proposed to send PR. we created the repo, but didn't receive it.

as i remember, there is no much of difference in cucumber3 and 4. and cucumber 3, is just few updates in version 2.

indrabt commented 5 years ago

@DzmitryHumianiuk Thanks for your response . Some of the features like data table in cucumber 3 was being used by our team here. unfortunately we can't downgrade to cucumber 2 because we will have to refactor all our code and at the same time we want to utilise report portal here .

DzmitryHumianiuk commented 5 years ago

@indrabt we opened position for SDET (Software Developer Engineer in Test). i assume he will be responsible for this staff to be up-to-date.

MithunDavid commented 5 years ago

I am still facing this issue while using scenario/step reports. We are using cucumber-java and cucumber-testng in our framework. I even tried with latest agent-java-cucumber-5.0.0-BETA-0. Can you please update the compatibility matrix for the latest versions.

DzmitryHumianiuk commented 5 years ago

@MithunDavid v5.x.x agent will work with ReportPortal v5 only.

for ReportPortal v4 use latest v4.x.x agent.

and could you give more details on issue?

evgenytkachenko commented 5 years ago

I have the same issue with RP v5 and agent v5. I tried different versions of cucumber/gherkin from the table "Compatibility matrix for cucumber agents" - does not work.

It works only with the ancient version of cucumber/gherkin - 1.2.5/2.12.2

Please, help

DzmitryHumianiuk commented 5 years ago

@HardNorth will take a look shortly. we do stabilization all java related agents and examples.

@evgenytkachenko try examples from here: https://github.com/reportportal/examples-java

evgenytkachenko commented 5 years ago

@DzmitryHumianiuk it helped I had to use

com.epam.reportportal agent-java-cucumber**4** 5.0.0-BETA-1

I used

com.epam.reportportal agent-java-cucumber 5.0.0-BETA-1
vinitmalhotra commented 3 years ago

Hi All, I am trying to run Report Portal with Cucumber 6 but getting below error. Can anyone please guide how to use it with Cucumber 6.

[ERROR] setUpClass(testRunner.RunCucumberTest) Time elapsed: 1.711 s <<< FAILURE! io.cucumber.core.exception.CucumberException: Couldn't load plugin class: com.epam.reportportal.cucumber.ScenarioReporter Caused by: java.lang.ClassNotFoundException: com.epam.reportportal.cucumber.ScenarioReporter

My POM.xml contains following

com.epam.reportportal client-java 5.1.0-RC-6 compile
<dependency>
  <groupId>com.epam.reportportal</groupId>
  <artifactId>commons-model</artifactId>
  <version>5.0.0</version>
  <scope>compile</scope>
</dependency>
io.cucumber
  <artifactId>cucumber-java</artifactId>
  <version>6.0.0</version>
  <scope>compile</scope>
HardNorth commented 3 years ago

@vinitmalhotra you need to use agent-java-cucumber6 version 5.1.0-RC-3

Mahesh81 commented 3 years ago

@HardNorth We are setting up serenity framework with following pom.xml dependency

com.github.invictum serenity-reportportal-integration 1.5.8
    <dependency>
        <groupId>com.epam.reportportal</groupId>
        <artifactId>agent-java-cucumber</artifactId>
        <version>5.1.0-RC-2</version>
    </dependency>

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

    <dependency>
        <groupId>net.serenity-bdd</groupId>
        <artifactId>serenity-cucumber5</artifactId>
        <version>2.2.5</version>
    </dependency>

Used the stepreporter plugin plugin = { "com.epam.reportportal.cucumber.StepReporter" }

we get the following error io.cucumber.core.exception.CucumberException: Couldn't load plugin class: com.epam.reportportal.cucumber.StepReporter. It does not implement io.cucumber.plugin.Plugin

Can you please help us if there is any version mismatch

HardNorth commented 3 years ago

@Mahesh81 You need to use agent-java-cucumber5 version 5.1.0-RC-2

dragos-panzaru-md commented 1 year ago

With the following pom.xml

        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-junit</artifactId>
            <version>7.2.3</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.serenity-bdd</groupId>
            <artifactId>serenity-cucumber</artifactId>
            <version>3.2.5</version>
        </dependency>
        <dependency>
            <groupId>com.epam.reportportal</groupId>
            <artifactId>agent-java-cucumber</artifactId>
            <version>5.1.3</version>
        </dependency>

I encounter the same issue:

java.lang.IllegalArgumentException: The plugin specification 'com.epam.reportportal.cucumber.StepReporter' has a problem:
Could not load plugin class 'com.epam.reportportal.cucumber.StepReporter'.

when using the step reporter

@CucumberOptions(
        plugin = {"com.epam.reportportal.cucumber.StepReporter"})
HardNorth commented 1 year ago

@dragos-panzaru-md please read documentation carefully: https://github.com/reportportal/agent-java-cucumber#compatibility-matrix-for-cucumber-agents

dragos-panzaru-md commented 1 year ago

@HardNorth Yes you were correct. After making the necessary adjustment in pom.xml (changed agent-java-cucumber to agent-java-cucumber6) now I don't get any error anymore on test execution, however I don't see any report in report portal after test execution. I have the reportportal.properties in the root project folder, with the following content copied from the user profile section in report portal:

rp.endpoint = <report.portal.address>
rp.uuid = <access.token>
rp.launch = <launch.name>
rp.project = <project.name>

and for test execution I run the following command

mvn clean install

As a side note, the test is executed properly and the serenity report is also generated correctly

HardNorth commented 1 year ago

@dragos-panzaru-md There might be many reasons for that, including incorrect server configuration. If it's on client side there should be some errors in you test logs at the very beginning. If it's on server side you need to inspect your server (service-api) logs.

dragos-panzaru-md commented 1 year ago

@HardNorth Thank you for the quick response. If I use serenity with junit5 and cucumber do I need to integrate also junit with report portal using agent-java-junit5, or is enough to integrate cucumber with report portal using agent-java-cucumber6? The reason for asking this is that, when I execute the following command:

mvn clean install

I don't see in the logs any reference to report portal.

HardNorth commented 1 year ago

@dragos-panzaru-md just agent-java-cucumber6 should be enough. But I can't see your system and configurations to say what's exactly wrong, you should investigate that yourself.