reportportal / agent-java-cucumber4

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

Cucumber4: Error Type: AMBIGUOUS_TEST_ITEM_STATUS when running cucumber scenarios in parallel #28

Closed yasin24885shaikh closed 4 years ago

yasin24885shaikh commented 4 years ago

Hi,

I created sample public git repository to mimic this issue as below https://github.com/yasin24885shaikh/reportportalCucumber4.git

I am getting below error while running cucumber features in parallel

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 '5de7e301f264de00018ab6d6' Error Type: AMBIGUOUS_TEST_ITEM_STATUS

evjlobanova commented 4 years ago

@Yumfriez could you please help?

evjlobanova commented 4 years ago

@yasin24885shaikh which version rp and which agents do you use?

yasin24885shaikh commented 4 years ago

@yasin24885shaikh which version rp and which agents do you use? Here are my dependencies compile 'io.cucumber:cucumber-core:4.8.0' compile 'io.cucumber:cucumber-testng:4.8.0' compile 'io.cucumber:cucumber-java:4.8.0' compile 'com.epam.reportportal:agent-java-cucumber4:4.1.0' compile 'io.cucumber:cucumber-junit:4.8.0'

Reportportal build version: 4.3.0 I already placed reproducible flow at https://github.com/yasin24885shaikh/reportportalCucumber4.git

I also tested my code here Build: 5.0.1-SNAPSHOT-572 https://beta.demo.reportportal.io/ still same issue.

yasin24885shaikh commented 4 years ago

any update here.. I am able to make Scenario reporter work by doing some code. But seems Step reporter is a bit challenge

yasin24885shaikh commented 4 years ago

Finally made it working with API Approach

Steps.txt

amar-1314 commented 4 years ago

any update here.. I am able to make Scenario reporter work by doing some code. But seems Step reporter is a bit challenge

@yasin24885shaikh hi, im facing same issue while running tests in parallel with cucumber 4 agent. Would you mind letting me know how you got it working for ScenarioReporter?

yasin24885shaikh commented 4 years ago

@amar-1314 I used API (http://domain:port/ui/#api)approach where we can make use of ConcurrentEventListener to start and close launch, open and close root test and child test . Its very easy and self controlled. You can use of static concurrentHashmap to store keys for launch and item.

amar-1314 commented 4 years ago

@amar-1314 I used API (http://domain:port/ui/#api)approach where we can make use of ConcurrentEventListener to start and close launch, open and close root test and child test . Its very easy and self controlled. You can use of static concurrentHashmap to store keys for launch and item.

@yasin24885shaikh Got it working, thanks for the help.

gpapadakis commented 4 years ago

Are we expecting any fix for this any time soon?

amar-1314 commented 4 years ago

Are we expecting any fix for this any time soon?

@gpapadakis per reply I got from RP, cucumber4 agent doesn't support parallel execution. They recommend to try v5(now we got stable version and works with parallel execution), else you can try out solution by @yasin24885shaikh

evgenytkachenko commented 4 years ago

it should work fine RP 5 and appropriate agent version

HardNorth commented 4 years ago

Should be fine already