XRAY: Export only failed cucumber tests from XRAY Test Execution

Praveen Dharman February 3, 2022

Is there an out of box feature available to export the failed test cases from an Xray TestExecution. This option seems to be available in XRAY Server via the user interface.

 

There is an API available to export all the test cases in XRAY Test Execution.

/rest/raven/1.0/export/test?keys="TESTEXEC-1"

ref: https://docs.getxray.app/display/XRAY/Exporting+Cucumber+Tests+-+REST

 

Is there an option available to pass the status as a parameter to the existing API's?

Server Jira v8.13.13

Please let me know if more details are needed.

 

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 14, 2022

Hi @Praveen Dharman 

It could be possible since that API allows you to use a filter. And you can create a filter using this JQL function testExecutionTests to return a list of Tests based on Test Execution and also on other arguments such as the Test Run Status.

Check all the Xray enhanced functions here: https://docs.getxray.app/display/XRAY/Enhanced+querying+with+JQL

Kind regards,
Rogerio Paiva [Xray Support Team]

Praveen Dharman March 1, 2022

Hi Rogerio,

Thank you for the answers!

We explored this option of using a filter to export only the failed test cases. It is possible to Export only the failed test cases.

One challenge is that the link/tag of the XRAY Test Execution is missing in the exported feature files.

Due to this reason,  it is NOT possible to import the results back to the same test execution.

One option is to export all the test cases from the test execution to file system. Use a 3rd party to delete the unnecessary(Passed/blocked) test cases.

Other option is to use a 3rd party to add a tag for the Test Execution Id.

Is there any straight forward/out of the box feature to export the failed test cases from Test Execution. This feature is especially needed to re-run the failed test cases.

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.
March 10, 2022

Hi @Praveen Dharman 

Using the above JQL function, you can use the second argument to filter also the TestRunStatus:

P2 - Test Run Status list separated by "|"(pipe) (Optional)

https://docs.getxray.app/display/XRAY/Enhanced+querying+with+JQL

So it should be possible to list the failed Tests for given Test Executions.

Please contact Xray Support (http://Xraysupport.getXray.app) if you need further help.

Thank you.

Kind regards,
Rogerio Paiva [Xray Support Team]

Praveen Dharman March 10, 2022

Hi @Rogério Paiva - Xray Xporter ,

Thanks for the feedback! We already used this option from your previous answer.

Many thanks for the support.

Have a nice day!

Suggest an answer

Log in or Sign up to answer