reportportal / agent-java-cucumber4

Cucumber JVM version [4.0.0; 5.0.0) adapter
Apache License 2.0
6 stars 9 forks source link

Launch doesn't finish correctly if scenario contains unimplemented steps #12

Closed marinataranchuk closed 4 years ago

marinataranchuk commented 5 years ago

If a cucumber scenario contains a step which is not implemented (i.e. doesn't have a glue method), so that the step obtains status 'STEP UNDEFINED', then it is not processed correctly in Report Portal:

io.reactivex.exceptions.OnErrorNotImplementedException: Report Portal returned error
Status code: 400
Status message: Bad Request
Error Message: Test item status is ambiguous. There is no status provided from request and there are no descendants to check statistics for test item id '5d31c6278a7f7106587c6e14'
Error Type: AMBIGUOUS_TEST_ITEM_STATUS

    at io.reactivex.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:704)
    at io.reactivex.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:701)
    at io.reactivex.internal.operators.maybe.MaybeCallbackObserver.onError(MaybeCallbackObserver.java:83)
    at io.reactivex.internal.operators.maybe.MaybeSubscribeOn$SubscribeOnMaybeObserver.onError(MaybeSubscribeOn.java:96)
    at io.reactivex.internal.operators.maybe.MaybeCache.onError(MaybeCache.java:103)
    at io.reactivex.internal.operators.maybe.MaybeFromCallable.subscribeActual(MaybeFromCallable.java:50)
    at io.reactivex.Maybe.subscribe(Maybe.java:3727)
    at io.reactivex.internal.operators.maybe.MaybeCache.subscribeActual(MaybeCache.java:77)
    at io.reactivex.Maybe.subscribe(Maybe.java:3727)
    at io.reactivex.internal.operators.maybe.MaybeSubscribeOn$SubscribeTask.run(MaybeSubscribeOn.java:54)
    at io.reactivex.Scheduler$DisposeTask.run(Scheduler.java:452)
    at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:61)
    at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:52)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
    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)
Caused by: com.epam.reportportal.exception.ReportPortalException: Report Portal returned error
Status code: 400
Status message: Bad Request
Error Message: Test item status is ambiguous. There is no status provided from request and there are no descendants to check statistics for test item id '5d31c6278a7f7106587c6e14'
Error Type: AMBIGUOUS_TEST_ITEM_STATUS

    at com.epam.reportportal.service.ReportPortalErrorHandler.handleError(ReportPortalErrorHandler.java:57)
    at com.epam.reportportal.restendpoint.http.DefaultErrorHandler.handle(DefaultErrorHandler.java:56)
    at com.epam.reportportal.restendpoint.http.HttpClientRestEndpoint$1.call(HttpClientRestEndpoint.java:486)
    at com.epam.reportportal.restendpoint.http.HttpClientRestEndpoint$1.call(HttpClientRestEndpoint.java:455)
    at io.reactivex.internal.operators.maybe.MaybeFromCallable.subscribeActual(MaybeFromCallable.java:46)
    ... 12 more

Versions used: Selenium: 3.141.59 Cucumber: 4.5.4 RP agent: com.epam.reportportal:agent-java-cucumber4:4.1.0 Plugin used: "com.epam.reportportal.cucumber.ScenarioReporter" (but same issue reproduced with StepReporter)

HardNorth commented 4 years ago

Fixed in the latest cucumber agent versions: Screen Shot 2020-09-15 at 8 31 35 PM Screen Shot 2020-09-15 at 8 30 46 PM