Created By  inflectra.simon Tuesday, May 29, 2018

An automated test case stores its test script as a standard document inside of the SpiraTest/Team/Plan application. To GET the current script using our REST API you need to make 2 calls: 1 to get the document ID and the other to retrieve the script itself.

First, we GET the test case in question using the following call:

GET: projects/{project_id}/test-cases/{test_case_id}

This returns a full object for the test case. If there is a an automated script attached, the "AutomationAttachmentId" field is returned (otherwise it is null).

With this id we can the GET the contents of the test script file with the following call:

GET: projects/{project_id}/documents/{document_id}/open

 

 

Article Info
  • Last Updated: 5/29/2018
  • Article ID: KB346
  • Views: 271