There are two endpoints regarding importing tests:
Import Tests | /api/v1/import/test/bulk |
Check import job status | /api/v1/import/test/bulk/{jobId}/status |
The first endpoint is an asynchronous call to import tests. Whenever this endpoint is called, a job is queued to import the tests in the input and its id is returned. The second endpoint can be used to check the status of this job.
Apart from JIRA fields, in the test information in the input, the folowing fields can be used:
testtype (or xray_testtype): This field determines the test type of the corresponding test, this field can be filled with the option of any test field that is present in the project in which the test will be created. (this field is required)
steps (or xray_steps): It holds the steps information for a test with a test type of the Steps kind.
gherkin_def (or xray_gherkin_def): Gherkin definition for tests with a test type of the Gherkin kind.
unstructured_def (or xray_unstructured_def): Generic definition for tests with a test type of Unstructured kind.
If project information is ommited in a test, the project defined as a path parameter in the endpoint is used as the destination project, if no project is set as a path parameter, an error will occur importing the corresponding test.
Import Tests
When importing tests, you can use the following endpoint:
Check Import Job Status
When checking the status of an import test job, you can use the following endpoint: