Giter Site home page Giter Site logo

reportportal / agent-java-cucumber6 Goto Github PK

View Code? Open in Web Editor NEW
9.0 7.0 5.0 863 KB

Cucumber JVM version [6.0.0; ) adapter

License: Apache License 2.0

Java 97.39% Gherkin 2.61%
java agent cucumber-jvm reportportal cucumber cucumber-agent scenario-reporter

agent-java-cucumber6's Introduction

Join Slack chat! stackoverflow GitHub contributors Docker Pulls License Build with Love lambdaTest a27c44

Repositories structure

ReportPortal high level architecture

reportportal high level architecture

ReportPortal repositories structure

Report Portal organized into multiple repositories.

ReportPortal server side consists of the following services:

  • service-authorization Authorization Service. In charge of access tokens distribution
  • service-api API Service. Application Backend
  • service-ui UI Service. Application Frontend
  • service-index Index Service. Info and health checks per service.
  • service-analyzer Analyzer Service. Finds most relevant test fail problem.
  • gateway Traefik Gateway Service. Main entry point to application. Port used by gateway should be opened and accessible from outside network.
  • rabbitmq Load balancer for client requests. Bus for messages between servers.
  • minio Attachments storage.

Available plugins developed by ReportPortal team:

Client side adapters related repositories:

  • client-* - API integrations. Http clients, which process HTTP request sending.
  • agent-* - Frameworks integration. Custom reporters/listeners, which monitor test events and trigger event sending via client-*
  • logger-* - Logging integration. Logger appenders, which help to collect logs, bind it with test-case item via agent-* and send to server via client-*

Other repositories stored according to next rules

  • service-* - micro-services which are a part of Application
  • commons-* - common libraries, models, etc., used by micro-services

Installation steps

Simple setup with Docker

It's the best way for demo purposes and small teams. The database is already in the docker-compose.

  1. Install Docker (Engine, Compose)

  2. Download Example of docker-compose descriptor to any folder

  3. Deploy ReportPortal using docker compose plugin within the same folder

docker compose -p reportportal up

To start ReportPortal in daemon mode, add '-d' argument:

docker compose -p reportportal up -d
  1. Open in your browser IP address of deployed environment at port 8080
http://IP_ADDRESS:8080
  1. Use next login\pass for access:
  • default\1q2w3e
  • superadmin\erebus.

Please change admin password for security.

Mentioned compose file deploy all available Bug Tracking System integrations, which not always needed, but use resources.

Production-ready set and Custom deployment with Docker

For production usage, we recommend:

  • choose only required Bug Tracking System integration service. Exclude the rest

To customize deployment and make it production-ready please follow customization steps and details

Integration. How to get log data in

You should add Client Side code inside your test automation. It consists of:

  • client-* - API integrations. Http clients, which process HTTP request sending. E.g. for Java (client-java-*)
  • agent-* - Frameworks integration. Custom reporters/listeners, which monitor test events and trigger event sending via client-*
  • logger-* - Logging integration. Logger appenders, which helps to collect logs, bind it with test-case via agent-* and send to server via client-*

Integration steps and documentation

Contribution

There are many different ways to contribute to Report Portal's development, just find the one that best fits with your skills. Examples of contributions we would love to receive include:

  • Code patches
  • Documentation improvements
  • Translations
  • Bug reports
  • Patch reviews
  • UI enhancements

Big features are also welcome but if you want to see your contributions included in Report Portal codebase we strongly recommend you start by initiating a chat through our Team in Slack.

Contribution details

Documentation

Community / Support

License

Report Portal is Apache 2.0.

agent-java-cucumber6's People

Contributors

dzmitryhumianiuk avatar hardnorth avatar mauritssilvis avatar raikbitters avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

agent-java-cucumber6's Issues

Not able to retrieve current test case id dynamically

I have cucumber scenarios/tests running in parallel and as part of my use case, I want to update the description of the current running scenario via API call during step definition itself.

I am not able to figure out how i can fetch thread specific test case id to be consumed in API ENDPOINT ... /item/{itemId}/update to update description.

Please suggest way to achieve it.

Make @Attributes annotation available on Scenarion/Scenario Outline level

Is your feature request related to a problem? Please describe.
As For now @Attributes annotation is available for Steps. But custom attributes can not be set for the whole Scenario.

Describe the solution you'd like
It would be nice to have ability to pass custom attributes per each Scenario. It will give opportunity to create Component Health diagram view, based on features and Scenarios

Introduction (or change) of aspectj binding inside agent-java-cucumber6 breaks build of tests

Describe the bug
When I try to update to version from 5.3.1 to 5.3.2 I get multiple compile errors in my gradle build.
Seems something was changed added that is incompatible with existing / explicit usage of AspectJ.

Steps to Reproduce
Steps to reproduce the behavior:
Use aspectj in your test code explicitly.

Expected behavior
The implementation of the agent should not disrupt other, unrelated code.
There should be no errors during build or runtime.

Actual behavior
Compile fails with multiple errors about missing classes although I just changed the version in my build.gradle file:

<...>/CryoAspect.java:5: error: package org.aspectj.lang does not exist
import org.aspectj.lang.ProceedingJoinPoint;
                       ^
<...>/CryoAspect.java:6: error: package org.aspectj.lang.annotation does not exist
import org.aspectj.lang.annotation.Around;
                                  ^
<...>/CryoAspect.java:7: error: package org.aspectj.lang.annotation does not exist
import org.aspectj.lang.annotation.Aspect;
                                  ^
<...>/CryoAspect.java:14: error: cannot find symbol
@Aspect
 ^
  symbol: class Aspect
<...>/CryoAspect.java:31: error: cannot find symbol
    public String processElement(ProceedingJoinPoint joinPoint) {
                                ^
  symbol:   class ProceedingJoinPoint
  location: class CryoAspect
<...>/CryoAspect.java:27: error: cannot find symbol
    @Around(value = "within(@xxx.DecryoValue *) && ("
     ^
  symbol:   class Around
  location: class CryoAspect

Dependency versions
client-java: 5.2.13
agent-java-cucumber6: 5.3.2

Additional context
Add any other context about the problem here.

Report Portal returned error CHILD_START_TIME_EARLIER_THAN_PARENT

Client version 5.0.11
Agent version 5.0.0-RC-1

Some scenarios are not present in RP launch but were run in GitLab job.
Logs contain error:

28-10-2020 07:35:57.204 [rp-io-8] ERROR c.e.r.utils.SubscriptionUtils.onError - Start test item completed with error
com.epam.reportportal.exception.ReportPortalException: Report Portal returned error
Status code: 406
Status message: Not Acceptable
Error Message: Start time of child ['Wed Oct 28 07:35:57 UTC 2020'] item should be same or later than start time ['2020-10-28T07:35:57.085'] of the parent item/launch '15122524'
Error Type: CHILD_START_TIME_EARLIER_THAN_PARENT
at com.epam.reportportal.service.ReportPortalErrorHandler.handleError(ReportPortalErrorHandler.java:85)
at com.epam.reportportal.service.ReportPortalErrorHandler.handle(ReportPortalErrorHandler.java:61)
at com.epam.reportportal.restendpoint.http.HttpClientRestEndpoint$1.subscribe(HttpClientRestEndpoint.java:526)
at io.reactivex.internal.operators.maybe.MaybeCreate.subscribeActual(MaybeCreate.java:45)
at io.reactivex.Maybe.subscribe(Maybe.java:4290)
at io.reactivex.internal.operators.maybe.MaybeSubscribeOn$SubscribeTask.run(MaybeSubscribeOn.java:54)
at io.reactivex.internal.schedulers.ScheduledDirectTask.call(ScheduledDirectTask.java:38)
at io.reactivex.internal.schedulers.ScheduledDirectTask.call(ScheduledDirectTask.java:26)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)

Reproduces randomly on different launches.

image
image

Scenario outlines with dynamic names not supported

Background

Cucumber-JVM 6 supports scenario outlines with names that include example parameters.

For example, with the feature

Feature: Test the login functionality

  Scenario Outline: The user '<user>' can log in
    Given the user '<user>' can log in

    Examples:
      | user  |
      | Alice |
      | Bob   |
      | Eve   |

and the (trivial) step implementation

@Given("^the user '([^']*)' can log in$")
public void theUserCanLogIn(String username) {
}

Cucumber will display the test names as

  • Scenario Outline: The user 'Alice' can log in
  • Scenario Outline: The user 'Bob' can log in
  • Scenario Outline: The user 'Eve' can log in

Expected result

When sending test results to the ReportPortal using the ReportPortal appender (com.epam.reportportal:logger-java-log4j:5.0.3) and the agent for Cucumber JVM 6 (com.epam.reportportal:agent-java-cucumber6:5.0.6), I expect the ReportPortal to also show these filled-in test names. That is, with the above setup, I expect tests to be reported as

ScenarioOutlineWithExamplesInTitle

Actual result

The ReportPortal will, however, display:

ScenarioOutlineWithoutExamplesInTitle

That is, the ReportPortal shows the name of the Cucumber scenario (which is fixed per scenario outline) for each of the three tests, rather than using the Cucumber test case title (which varies per test). Clearly, when the number of examples per scenario outline is large, not having parameters filled in makes finding specific tests in the ReportPortal really inconvenient.

Possible solution

As it turns out, it is rather easy to solve the above problem. All that has to be done (see #21) is to change the beforeScenario(RunningContext.FeatureContext, RunningContext.ScenarioContext) method in the AbstractReporter class so that it uses the Cucumber test case rather than the Cucumber scenario to build test names.

Dynamic Attributes/Parameters and Description update at test and suite level for cucumber

Dynamic Attributes/Parameters and Description update at test and suite level for cucumber
I am looking to alter (Add/Update) attributes for the executing scenario in the ReportPortal. i.e. add an attribute to the current test step. Also, Looking to alter attributes and description at suite level.
Attributes and their value will be dynamic based on execution.

Please suggest if we have any mechanism to achieve this need.

SSL certification with Report Portal (Tests are not going through because the site has SSL certification)

Hi Team,

After migrating the report portal to our company server and adding SSL certification on it (rp. endpoint changed to https), Now the tests are not going through and we are seeing the below error.

I am using java cucumber6 5.0.1

I tested with Nunit framework one and it works fine with SSL certification.

ERROR c.e.r.s.ReportPortal - main - Cannot build ReportPortal client
com.epam.reportportal.exception.InternalReportPortalClientException: Unable to load trust store
at com.epam.reportportal.service.ReportPortal$Builder.defaultClient(ReportPortal.java:533)
at com.epam.reportportal.service.ReportPortal$Builder.lambda$buildClient$1(ReportPortal.java:449)
at java.base/java.util.Optional.orElseGet(Optional.java:362)
at com.epam.reportportal.service.ReportPortal$Builder.buildClient(ReportPortal.java:449)
at com.epam.reportportal.service.ReportPortal$Builder.build(ReportPortal.java:416)
at com.epam.reportportal.cucumber.AbstractReporter.(AbstractReporter.java:132)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
at io.cucumber.core.plugin.PluginFactory.newInstance(PluginFactory.java:116)
at io.cucumber.core.plugin.PluginFactory.instantiate(PluginFactory.java:79)
at io.cucumber.core.plugin.PluginFactory.create(PluginFactory.java:63)
at io.cucumber.core.plugin.Plugins.createPlugins(Plugins.java:32)
at io.cucumber.core.plugin.Plugins.(Plugins.java:25)
at io.cucumber.junit.Cucumber.(Cucumber.java:162)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:104)
at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:86)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:70)
at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:37)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:70)
at org.junit.internal.requests.ClassRequest.createRunner(ClassRequest.java:28)
at org.junit.internal.requests.MemoizingRequest.getRunner(MemoizingRequest.java:19)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createUnfilteredTest(JUnit4TestLoader.java:90)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:76)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:49)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:526)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:770)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:464)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210)
16:53:22.538 ERROR c.e.r.s.ReportPortal - main - Cannot build ReportPortal client
com.epam.reportportal.exception.InternalReportPortalClientException: Cannot build ReportPortal client
at com.epam.reportportal.service.ReportPortal$Builder.buildClient(ReportPortal.java:456)
at com.epam.reportportal.service.ReportPortal$Builder.build(ReportPortal.java:416)
at com.epam.reportportal.cucumber.AbstractReporter.(AbstractReporter.java:132)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
at io.cucumber.core.plugin.PluginFactory.newInstance(PluginFactory.java:116)
at io.cucumber.core.plugin.PluginFactory.instantiate(PluginFactory.java:79)
at io.cucumber.core.plugin.PluginFactory.create(PluginFactory.java:63)
at io.cucumber.core.plugin.Plugins.createPlugins(Plugins.java:32)
at io.cucumber.core.plugin.Plugins.(Plugins.java:25)
at io.cucumber.junit.Cucumber.(Cucumber.java:162)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:104)
at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:86)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:70)
at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:37)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:70)
at org.junit.internal.requests.ClassRequest.createRunner(ClassRequest.java:28)
at org.junit.internal.requests.MemoizingRequest.getRunner(MemoizingRequest.java:19)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createUnfilteredTest(JUnit4TestLoader.java:90)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:76)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:49)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:526)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:770)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:464)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210)
Caused by: com.epam.reportportal.exception.InternalReportPortalClientException: Unable to load trust store
at com.epam.reportportal.service.ReportPortal$Builder.defaultClient(ReportPortal.java:533)
at com.epam.reportportal.service.ReportPortal$Builder.lambda$buildClient$1(ReportPortal.java:449)
at java.base/java.util.Optional.orElseGet(Optional.java:362)
at com.epam.reportportal.service.ReportPortal$Builder.buildClient(ReportPortal.java:449)

Attribute Annotation at Steps in "Step definition" code in cucumber framework doesn't work

Describe the bug
Given:- I need to add attributes at steps in my step definition file (Step definition in Given, Then format ) like cucumber.
When:- I add attributes Annotation provided by Report Portal like below
@Attributes(attributes = { @Attribute(key = "Key", value = "Value") })
My Step Starts ---@given("user is on login page")
Then:- Attributes are not added to my steps in the Report Portal.

Util class method (Method retrieveMethod (Field definitionMatchField, TestStep testStep))
is not returning the step definition, which is why the getAttributes(@nonnull TestStep testStep) return null.

---rq.setAttributes(getAttributes(testStep));

My repo: https://stash.cdk.com/projects/PEOEQA/repos/engqa.ui.junit.cucumber/browse
Example Repo provided by Report Portal:https://github.com/reportportal/agent-java-cucumber6

Expected behavior
Given I need to add attributes at steps in my step definition file (Step definition in Given, Then format ) like cucumber.
When I add attributes Annotation provided by Report Portal like below
@Attributes(attributes = { @Attribute(key = "Key", value = "Value") })
My Step Starts ---@given("user is on login page")
Then Attributes are added to my steps in the Report Portal.

Screenshots

Versions:

  • OS, Browser
  • Version of RP [find it under Login form, copy as is]
  • Current version:API Service: 5.3.3;Index Service: 5.0.10;Authorization Service: 5.3.3;Service UI: 5.3.3;

NoSuchMethodError: okhttp3.OkHttpClient$Builder.callTimeout when running test cases

Is cucumber-java :7.12.1 supported by agent-java-cucumber6? I see in the docs its supported till 7.0.0 of cucumber-java and junit.

I am using agent-java-cucumber6:5.2.0 along with cucumber-java 7.12.1.
When running cases with ScenarioReporter as plugin along with cucumber -java
I am facing issue of following error. Could you let me know whats the issue




Caused by: java.lang.NoSuchMethodError: okhttp3.OkHttpClient$Builder.callTimeout(Ljava/time/Duration;)Lokhttp3/OkHttpClient$Builder
       at com.epam.reportportal.service.ReportPortal$Builder.defaultClient(ReportPortal.java:542)

       at com.epam.reportportal.service.ReportPortal$Builder.lambda$buildClient$1(ReportPortal.java:430)

       at java.base/java.util.Optional.orElseGet(Optional.java:369)

       at com.epam.reportportal.service.ReportPortal$Builder.buildClient(ReportPortal.java:430)

       at com.epam.reportportal.service.ReportPortal$Builder.build(ReportPortal.java:407)

       at com.epam.reportportal.cucumber.AbstractReporter.buildReportPortal(AbstractReporter.java:193)

       at com.epam.reportportal.cucumber.AbstractReporter.<init>(AbstractReporter.java:90)

       at com.epam.reportportal.cucumber.ScenarioReporter.<init>(ScenarioReporter.java:49)

       at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

       at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)

       at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

       at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)

       at io.cucumber.core.plugin.PluginFactory.newInstance(PluginFactory.java:116)

       ... 65 more

Attributes annotations don't work with cucumber-java8 syntax

Client: 5.5.0
Agent: 5.0.2 (agent-java-cucumber6)

Description:
We use cucumber-java8 syntax in defining steps. Hence, the only way to placed the Report Portal's @Attributes annotation was like this:

@Attributes(multiValueAttributes = { @MultiValueAttribute(key = "myKey", values = { "valueOne", "valueTwo" }) }) Given("^user logs in", this::logInPlease);

I was expecting the assigned attributes to appear on Report Portal but they didn't. I tried to place the @Attributes annotation on the logInPlease() method that is called in the step but that didn't change anything.

I tried both, ScenarioReporter and StepReporter. Am I missing something of cucumber-java8 syntax is not supported by this agent?

No such method error CucumberException: java.lang.NoSuchMethodError: okhttp3.OkHttpClient$Builde

Hi team.
I am trying to use ScenarioReporter plugin in multi.module gradle project with previously with cucumber-java8 and as we migrated to cucumber-java. I have faced issues with AbstractMethoderror

Receiver class com.epam.reportportal.cucumber.AbstractReporter$$Lambda$443/0x0000000100379c40 does not define or inherit an implementation of the resolved method abstract receive(Ljava/lang/Object;)V of interface io.cucumber.plugin.event.EventHandler.

java.lang.AbstractMethodError: Receiver class com.epam.reportportal.cucumber.AbstractReporter$$Lambda$443/0x0000000100379c40 does not define or inherit an implementation of the resolved method abstract receive(Ljava/lang/Object;)V of interface io.cucumber.plugin.event.EventHandler.   at io.cucumber.core.eventbus.AbstractEventPublisher.send(AbstractEventPublisher.java:51)

                at io.cucumber.core.eventbus.AbstractEventBus.send(AbstractEventBus.java:12)

                at io.cucumber.core.runtime.SynchronizedEventBus.send(SynchronizedEventBus.java:47)

                at io.cucumber.core.runtime.CucumberExecutionContext.emitTestRunStarted(CucumberExecutionContext.java:88)

                at io.cucumber.core.runtime.CucumberExecutionContext.startTestRun(CucumberExecutionContext.java:58)

                at io.cucumber.core.runtime.CucumberExecutionContext.runFeatures(CucumberExecutionContext.java:145)

                at io.cucumber.junit.Cucumber$StartAndFinishTestRun.evaluate(Cucumber.java:226)

                at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)

                at org.junit.runners.ParentRunner.run(ParentRunner.java:413)

                at org.junit.runner.JUnitCore.run(JUnitCore.java:137)

                at org.junit.runner.JUnitCore.run(JUnitCore.java:115)

                at org.junit.vintage.engine.execution.RunnerExecutor.execute(RunnerExecutor.java:42)```



Followed by trying imported agent-java-cucumber6 . Post that i am facing NoSuchMethoderror

Specs i am using are 
io.cucumber : cucumber-java 7.12.1
agent-java-cucumber6 5.2.0

Not sure is this related to Plugin. But as far as error i see its missing method from the ReportPortal. Am i missing any configuration??

Can you provide any suggestions or comments on this issue 



```io.cucumber.core.exception.CucumberException: java.lang.NoSuchMethodError: okhttp3.OkHttpClient$Builder.callTimeout(Ljava/time/Duration;)Lokhttp3/OkHttpClient$Builder;

       at app//io.cucumber.core.plugin.PluginFactory.newInstance(PluginFactory.java:120)

       at app//io.cucumber.core.plugin.PluginFactory.instantiate(PluginFactory.java:79)

       at app//io.cucumber.core.plugin.PluginFactory.create(PluginFactory.java:63)

       at app//io.cucumber.core.plugin.Plugins.createPlugins(Plugins.java:32)

       at app//io.cucumber.core.plugin.Plugins.<init>(Plugins.java:25)

       at app//io.cucumber.junit.Cucumber.<init>(Cucumber.java:160)

       at [[email protected]/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native](mailto:[email protected]/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native) Method)

       at [[email protected]/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)](mailto:[email protected]/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62))

       at [[email protected]/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)](mailto:[email protected]/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45))

       at [[email protected]/java.lang.reflect.Constructor.newInstance(Constructor.java:490)](mailto:[email protected]/java.lang.reflect.Constructor.newInstance(Constructor.java:490))

       at app//org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:104)

       at app//org.junit.vintage.engine.discovery.DefensiveAllDefaultPossibilitiesBuilder$DefensiveAnnotatedBuilder.buildRunner(DefensiveAllDefaultPossibilitiesBuilder.java:114)

       at app//org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:86)

       at app//org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:70)

       at app//org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:37)

       at app//org.junit.vintage.engine.discovery.DefensiveAllDefaultPossibilitiesBuilder.runnerForClass(DefensiveAllDefaultPossibilitiesBuilder.java:57)

       at app//org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:70)

       at app//org.junit.vintage.engine.discovery.ClassSelectorResolver.resolveTestClass(ClassSelectorResolver.java:66)

       at app//org.junit.vintage.engine.discovery.ClassSelectorResolver.resolve(ClassSelectorResolver.java:47)

       at app//org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.lambda$resolve$2(EngineDiscoveryRequestResolution.java:134)

       at [[email protected]/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)](mailto:[email protected]/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195))

       at [[email protected]/java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1632)](mailto:[email protected]/java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1632))

       at [[email protected]/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:127)](mailto:[email protected]/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:127))

       at [[email protected]/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:502)](mailto:[email protected]/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:502))

       at [[email protected]/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:488)](mailto:[email protected]/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:488))

       at [[email protected]/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)](mailto:[email protected]/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474))

       at [[email protected]/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150)](mailto:[email protected]/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150))

       at [[email protected]/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)](mailto:[email protected]/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234))

       at [[email protected]/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:543)](mailto:[email protected]/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:543))

       at app//org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolve(EngineDiscoveryRequestResolution.java:185)

       at app//org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolve(EngineDiscoveryRequestResolution.java:125)

       at app//org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolveCompletely(EngineDiscoveryRequestResolution.java:91)

       at app//org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.run(EngineDiscoveryRequestResolution.java:82)

       at app//org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolver.resolve(EngineDiscoveryRequestResolver.java:113)

       at app//org.junit.vintage.engine.discovery.VintageDiscoverer.discover(VintageDiscoverer.java:42)

       at app//org.junit.vintage.engine.VintageTestEngine.discover(VintageTestEngine.java:64)

       at app//org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discoverEngineRoot(EngineDiscoveryOrchestrator.java:152)

       at app//org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discoverSafely(EngineDiscoveryOrchestrator.java:134)

       at app//org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discover(EngineDiscoveryOrchestrator.java:108)

       at app//org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discover(EngineDiscoveryOrchestrator.java:80)

       at app//org.junit.platform.launcher.core.DefaultLauncher.discover(DefaultLauncher.java:110)

       at app//org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)

       at app//org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)

       at app//org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53)

       at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.processAllTestClasses(JUnitPlatformTestClassProcessor.java:99)

       at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.access$000(JUnitPlatformTestClassProcessor.java:79)

       at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor.stop(JUnitPlatformTestClassProcessor.java:75)

       at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.stop(SuiteTestClassProcessor.java:62)

       at [[email protected]/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native](mailto:[email protected]/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native) Method)

       at [[email protected]/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)](mailto:[email protected]/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62))

       at [[email protected]/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)](mailto:[email protected]/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43))

       at [[email protected]/java.lang.reflect.Method.invoke(Method.java:566)](mailto:[email protected]/java.lang.reflect.Method.invoke(Method.java:566))

       at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)

       at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)

       at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33)

       at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94)

       at com.sun.proxy.$Proxy5.stop(Unknown Source)

       at org.gradle.api.internal.tasks.testing.worker.TestWorker$3.run(TestWorker.java:193)

       at org.gradle.api.internal.tasks.testing.worker.TestWorker.executeAndMaintainThreadName(TestWorker.java:129)

       at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:100)

       at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:60)

       at org.gradle.process.internal.worker.child.ActionExecutionWorker.execute(ActionExecutionWorker.java:56)

       at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:113)

       at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:65)

       at app//worker.org.gradle.process.internal.worker.GradleWorkerMain.run(GradleWorkerMain.java:69)

       at app//worker.org.gradle.process.internal.worker.GradleWorkerMain.main(GradleWorkerMain.java:74)

Caused by: java.lang.NoSuchMethodError: okhttp3.OkHttpClient$Builder.callTimeout(Ljava/time/Duration;)Lokhttp3/OkHttpClient$Builder;

       at com.epam.reportportal.service.ReportPortal$Builder.defaultClient(ReportPortal.java:542)

       at com.epam.reportportal.service.ReportPortal$Builder.lambda$buildClient$1(ReportPortal.java:430)

       at java.base/java.util.Optional.orElseGet(Optional.java:369)

       at com.epam.reportportal.service.ReportPortal$Builder.buildClient(ReportPortal.java:430)

       at com.epam.reportportal.service.ReportPortal$Builder.build(ReportPortal.java:407)

       at com.epam.reportportal.cucumber.AbstractReporter.buildReportPortal(AbstractReporter.java:193)

       at com.epam.reportportal.cucumber.AbstractReporter.<init>(AbstractReporter.java:90)

       at com.epam.reportportal.cucumber.ScenarioReporter.<init>(ScenarioReporter.java:49)

       at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

       at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)

       at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

       at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)

       at io.cucumber.core.plugin.PluginFactory.newInstance(PluginFactory.java:116)

       ... 65 more`

Remove StepReporter

After year of practice it is time to admit, that Scenario is a Test and Feature is a Suite in plain code terminology. So the StepReporter class provides a complete broken approach and encourage invalid use. We need to remove it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.