Page tree

You are on the Xray Cloud documentation. If you are looking for Xray Server documentation, you can find it in this page

Skip to end of metadata
Go to start of metadata

Exporting Cucumber Tests

When exporting Cucumber feature files, the Export Cucumber Features rules are followed. The input for the export REST method is a String containing Jira issue keys separated by ";".

These keys must reference issues with the Xray issues types Test, Test Set, (Sub) Test Execution or Test Plan or any issue type mapped as being a coverable issue. 

A mix of these issue types is supported. In the same export call, you can include keys from each of the above issue types. The service will build a set of Test issues based on these keys. This set will include all direct Tests issues and all Test issues associated with either Test Sets, Test Executions or Test Plans and all the tests for the requirements that matched.

The reference to keys in Jira are necessary for importing back the execution results to the respective Test and Test Execution issues.


 GET /api/v1/export/cucumber

Returns the generated feature file(s) for the Tests matched by the input keys or/and by the input filter. 

Request

QUERY PARAMETERS

parameter
type
description
keysString

a String containing a list of issue keys separated by ";"

filterIntegeran Integer that represents the filter id

keys and filter query parameters are optional if the other one provided but they can both be provided at the same time.


Example Request

curl -H "Content-Type: application/json" -X GET -H "Authorization: Bearer $token"  "https://xray.cloud.xpand-it.com/api/v1/export/cucumber?keys=DEMO-6;DEMO-7"


curl -H "Content-Type: application/json" -X GET -H "Authorization: Bearer $token"  "https://xray.cloud.xpand-it.com/api/v1/export/cucumber?filter=134"


curl -H "Content-Type: application/json" -X GET -H "Authorization: Bearer $token"  "https://xray.cloud.xpand-it.com/api/v1/export/cucumber?keys=DEMO-6;DEMO-7&filter=134"

Responses

200 OK : application/octet-stream : Successful. A compressed zip file will be downloaded containing the generated feature files.

400 BAD_REQUEST : text/plain : No feature files where generated. Please check Jira log.

401 UNAUTHORIZED : text/plain : The Xray license is not valid.

500  INTERNAL SERVER ERROR : text/plain : An internal error occurred when generating the feature file(s).

  • No labels