XRay Test Execution not keeping history

Gokul Sukumar February 7, 2021

Hi, I have test plan with a bunch of cucumber tests. When I execute the set, only the latest result are updated. The historical information is not updated and '# Test Executions' always remains 1.

 

Is there a way I can get the history of all test executions?

 

Screenshot 2021-02-08 at 08.24.49.png

1 answer

1 accepted

0 votes
Answer accepted
Rogério Paiva - Xray Xporter
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 9, 2021

Hi @Gokul Sukumar 

 

When importing Cucumber results, it either updates an existing Test Execution or creates a new Test Execution.

If you want to have a history of all executions, it is necessary to create new Test Executions.

When creating new Test Executions, it is necessary to link the new Test Execution with the Test Plan, and this can be done using the multipart endpoint (https://docs.getxray.app/display/XRAYCLOUD/Import+Execution+Results+-+REST#ImportExecutionResultsREST-CucumberJSONresultsMultipart).

With the multipart, you can specify the Test Plan of the Test Execution, as described in the documentation example.   

Please contact the Xray Support (http://xraysupport.xpand-it.com) if you need additional help.

Kind regards,
Rogério Paiva [Xray Support Team]

Gokul Sukumar February 10, 2021

Hi @Rogério Paiva - Xray Xporter this sounds good. Thank you very much for the solution. But I am afraid we might end up uploading our xray board by allowing it to create new test executions each time. 

 

Is there a way that I can remove some test execution results (not manually) as and when a new one is updated. Say something like I can have only the last 5 executions any time I check?

Rogério Paiva - Xray Xporter
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 10, 2021

Hi @Gokul Sukumar 

There is no automatic option to do that; however, you can build it using the Xray API.

For instance, you can use GraphQL request deleteTestExecution to delete the previous test execution when a new one is created.

Using a CI/CD tool, you can create a job to perform both requests (import new test execution, delete old test execution).

Gokul Sukumar February 10, 2021

@Rogério Paiva - Xray Xporter Perfect! Thank you so much for the guidance. Appreciate your time.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events