Failed to update Overall Execution Status for Test Executions created in X Ray

Neha Chauhan May 16, 2019

Hi Guys,

I am consistently seeing an issue with Execution status update in X ray for test executions, created using rest api integrated with selenium framework.

My automation framework creates a test execution in X ray under a test plan (where all my tests resides) at the end of execution, and under the same execution ID created, all the customized test reports (as attachments) along-with the overall execution status (Passed and Failed count) is updated for that particular automation run.

In some instances, the 'Overall Execution Status' fails to update in the test execution created, even though the execution completes without any failures and all the test reports are uploaded successfully.

When I check my logs, I can see following issue, captured at the time of test execution creation in X Ray.

Test Plan updation failed. Error is Xray invaild token. please check for correct token to establish connection to Xray {"error":"Error creating evidence on Jira: java.sql.SQLException: PSQL_TOO_MANY_CONNECTIONS Exception already occurred in this workcontext, skipping next getConnection"}
response {"error":"Error creating evidence on Jira: java.sql.SQLException: PSQL_TOO_MANY_CONNECTIONS Exception already occurred in this workcontext, skipping next getConnection"}
INFO [main] (Report.java:585)- SHOPM-801 : test plan status updated successfully. {"error":"Error creating evidence on Jira: java.sql.SQLException: PSQL_TOO_MANY_CONNECTIONS Exception already occurred in this workcontext, skipping next getConnection"}
response {"error":"Error creating evidence on Jira: java.sql.SQLException: PSQL_TOO_MANY_CONNECTIONS Exception already occurred in this workcontext, skipping next getConnection"}

When this issue is encountered, I can see a new execution ID created under the test-plan, can see all the test reports attached but not the execution status (Tests# column also shows 0 count)

I never came across this issue when the tests under the test-plan were less in number, however now I am seeing this issue at least twice a week (rest all the times it works as expected). The current count of tests under the test-plan as of now is '52' and can increase further.

For all these '52' tests, one Automation Summary Test Report is updated in compressed format and then the same number of individual test reports are uploaded as well, as attachments.

For Xray integration with automation framework, I am using following information provided by an X Ray admin:

restUrlAuthhttps://xray.cloud.xpand-it.com/api/v1/authenticate
restUrlExecutionhttps://xray.cloud.xpand-it.com/api/v1/import/execution
client_idAdmin Token
client_secretAdmin Token

Could you guys please help me with a possible solution for this error, whether it's failing because of the number of attachments uploaded at the end of execution or is it really a token issue?

I am executing automation runs with X Ray integration on daily basis using the same token, and since this issue happens almost twice a week, I don't think there is anything wrong with the tokens used.

Request the support team to Please help on the same.

1 comment

Comment

Log in or Sign up to comment
José Domingues [Xray]
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
July 22, 2019

Hi Neha,

Thank you very much for using Xray Cloud. 

Here you can find some tips about Testing using Selenium and JUnit in Java. 

I suggest you to check this documentation and if you have more questions, please contact us using the Support Desk

 

Best regards, 

Xray Team

TAGS
AUG Leaders

Atlassian Community Events