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

Add support for GivenStories tag for BDD style tests #87

Open
prasad150 opened this issue Nov 6, 2019 · 9 comments
Open

Add support for GivenStories tag for BDD style tests #87

prasad150 opened this issue Nov 6, 2019 · 9 comments
Labels
Milestone

Comments

@prasad150
Copy link

Hi ..

I am using serenity runner with Jbehave BDD . when i try to integrate report portal serenity ,I am getting the below error.Please help me .

@prasad150
Copy link
Author

java.lang.NoSuchMethodError: net.thucydides.core.model.TestOutcome.getTestSource()Ljava/lang/String;
at com.github.invictum.reportportal.recorder.TestRecorder.forTest(TestRecorder.java:22)
11623 [pool-1-thread-1] ERROR net.serenitybdd.core.Serenity - TEST FAILED AT STEP Given a scenario with ?DifferentMonth?
at com.github.invictum.reportportal.ReportPortalListener.testFinished(ReportPortalListener.java:50)
at net.thucydides.core.steps.StepEventBus.testFinished(StepEventBus.java:227)
11623 [pool-1-thread-1] ERROR net.serenitybdd.core.Serenity -
at net.serenitybdd.jbehave.SerenityReporter.afterScenario(SerenityReporter.java:544)
at org.jbehave.core.reporters.DelegatingStoryReporter.afterScenario(DelegatingStoryReporter.java:43)
at org.jbehave.core.reporters.ConcurrentStoryReporter.afterScenario(ConcurrentStoryReporter.java:175)
at org.jbehave.core.embedder.StoryRunner.runCancellable(StoryRunner.java:347)
at org.jbehave.core.embedder.StoryRunner.run(StoryRunner.java:239)
at org.jbehave.core.embedder.StoryRunner.run(StoryRunner.java:182)
at org.jbehave.core.embedder.StoryManager$EnqueuedStory.call(StoryManager.java:266)
at org.jbehave.core.embedder.StoryManager$EnqueuedStory.call(StoryManager.java:233)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

@Invictum
Copy link
Owner

Invictum commented Nov 6, 2019

@prasad150

Looks like you are trying to use integration with incompatible version of Serenity (possible outdated). Can you specify Serenity version in your project?

@prasad150
Copy link
Author

prasad150 commented Nov 8, 2019 via email

@prasad150
Copy link
Author

more log details.
I have a story to verify all fruits .

Here is the example.
verify fruits given.story
Scenario:verify fruits given [story inside other storys]
GivenStories:
apple.story,
oranges.story,
banana.story
Then all fruits verified
And End the scenario

java.lang.NullPointerException
at com.github.invictum.reportportal.SuiteStorage.lambda$finalizeActive$2(SuiteStorage.java:52)
at java.util.concurrent.ConcurrentHashMap$ForEachKeyTask.compute(ConcurrentHashMap.java:4923)
at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:731)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinTask.doInvoke(ForkJoinTask.java:401)
at java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:734)
at java.util.concurrent.ConcurrentHashMap.forEachKey(ConcurrentHashMap.java:3824)
at com.github.invictum.reportportal.SuiteStorage.finalizeActive(SuiteStorage.java:50)
at com.github.invictum.reportportal.ReportPortalListener.testSuiteFinished(ReportPortalListener.java:38)
at net.thucydides.core.steps.StepEventBus.testSuiteFinished(StepEventBus.java:592)
at com.swacorp.qmo.SerenityCustomReportingRunner.shutdownTestSuite(SerenityCustomReportingRunner.java:249)
at com.swacorp.qmo.SerenityCustomReportingRunner.run(SerenityCustomReportingRunner.java:230)
at org.junit.runners.Suite.runChild(Suite.java:127)
at org.junit.runners.Suite.runChild(Suite.java:26)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)

Exception in thread "Thread-1" com.epam.reportportal.exception.ReportPortalException: Report Portal returned error
Status code: 406
Status message: Not Acceptable
Error Message: Finish launch is not allowed. Launch '5dc96f6869515b0001be3a84' has items '[5dc96f8e69515b0001be3ac1]' with 'IN_PROGRESS' status
Error Type: FINISH_LAUNCH_NOT_ALLOWED

at com.epam.reportportal.service.ReportPortalErrorHandler.handleError(ReportPortalErrorHandler.java:83)
at com.epam.reportportal.service.ReportPortalErrorHandler.handle(ReportPortalErrorHandler.java:59)
at com.epam.reportportal.restendpoint.http.HttpClientRestEndpoint$1.subscribe(HttpClientRestEndpoint.java:517)
at io.reactivex.internal.operators.maybe.MaybeCreate.subscribeActual(MaybeCreate.java:45)
at io.reactivex.Maybe.subscribe(Maybe.java:4096)
at io.reactivex.internal.operators.maybe.MaybeCache.subscribeActual(MaybeCache.java:77)
at io.reactivex.Maybe.subscribe(Maybe.java:4096)
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.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

@Invictum
Copy link
Owner

@prasad150
Thanks for clarification. I will look into this issue and let you know if I need somethings additional.

@Invictum
Copy link
Owner

Invictum commented Nov 25, 2019

@prasad150
Sorry for late response. Issue occurs because of GivenStories tag that isn't supported for now. I will schedule implementation, but not sure is will be ready in nearest future.

@Invictum Invictum added this to the Unknown milestone Nov 25, 2019
@Invictum Invictum changed the title at com.github.invictum.reportportal.recorder.TestRecorder.forTest(TestRecorder.java:22) Add support for GivenStories tag for BDD style tests Nov 25, 2019
@prasad150
Copy link
Author

prasad150 commented Nov 26, 2019 via email

@rbetha

This comment has been minimized.

@plokeshwar
Copy link

@Invictum unfortunately, I am also getting the same error. When the tests pass, there is no issue. But when one of the example test fails, the entire execution is stopped and the below error is thrown. Also, there is no GivenStories tag being used. Any help would be greatly appreciated.

Below are the versions and report portal dependency
<serenity.version>2.3.11</serenity.version>
<serenity.rest.version>2.3.11</serenity.rest.version>
<serenity.maven.version>2.4.1</serenity.maven.version>
<serenity.cucumber.version>2.3.2</serenity.cucumber.version>

        <artifactId>serenity-reportportal-integration</artifactId>
        <version>1.5.8</version>

11:54:29.827 [pool-2-thread-1] DEBUG n.s.core.photography.Darkroom - Closing darkroom
null
java.lang.NullPointerException
at com.github.invictum.reportportal.SuiteStorage.lambda$finalizeActive$2(SuiteStorage.java:57)
at
java.base/java.util.concurrent.ConcurrentHashMap$ForEachKeyTask.compute(ConcurrentHashMap.java:4992)
at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:746)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants