GET/projects/{ProjectId}/tests/{TestId}/automations

Applies to QAComplete 12.71 SaaS, last modified on January 18, 2021

Returns the list of automations assigned to a test.

Use the operation to get a list of all automations assigned to a QAComplete test.

To get information on individual automation, use the …/tests/{TestId}/automations/{Agent} (GET) operation.

Authentication

Basic authentication using a user’s login and password. See Authentication for details.

Security Rights

The authenticating user must belong to a security group that has the Read privilege for the Test Library.

Request Format

To get information on automations, send a GET request to the following URL:

http://{server}/rest-api/service/api/v2/projects/{ProjectId}/tests/{TestId}/automations?offset={offset}&limit={limit}&Filter={filter}

ProjectId  :  integer, required

The ID of the project to which the test belongs.

TestId  :  integer, required

The ID of the test.

offset  :  integer, default: 0

The number of automations to skip before counting the returned automations. The default value is 0, which is the offset of the first item. For details, see Paging Through Results Using Offset and Limit.

limit  :  integer, default: 25

The maximum number of automations to return in the response.

filter  :  string

The filter expression to apply to the returned list. See Search Filters.

A sample request:

GET http://yourserver.com/rest-api/service/api/v2/projects/11953/tests/2693/automations HTTP/1.1
Host: yourserver.com
Connection: keep-alive
Accept: application/json
Authorization: Basic am9obkBleGFtcGxlLmNvbTpwQHNzd29yZA==

A sample request made by using cURL:

curl -u john@example.com:p@ssword -H "Accept: application/json" http://yourserver.com/service/api/v2/projects/11953/tests/2693/automations

Response Format

If successful, the operation responds with HTTP status code 200 and returns a JSON object with information about the automations.

A sample response:

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1044


{
    "metadata": {
       "result_set": {
          "count": 5,
          "offset": 0,
          "limit": 25,
          "total": 5
       },
        "permissions": {
            "acl": 7
       }
    },
    "results": [
      {
        "agent": "TestComplete/TestExecute",
        "title": "TCProjectSuite\\Orders_Project\\Script\\Orders\\addRecord",
        "timeout": 60,
        "run_mode": 0,
        "params": {
          "entry_point": "Orders_Projects\\Script\\Orders\\addRecord",
          "custom_args": "/customArg1 /customArg2"
        }
      },
      {
        "agent": "JUnit (Selenium)",
        "title": "SeleniumTest.zip",
        "timeout": 30,
        "run_mode": 0,
        "params": {
          "start_class": "com.smartbear.selenium.SeleniumSimpleTest.Test1",
          "use_maven": true
        }
      },
      {
        "agent": "NUnit (Selenium)",
        "title": "Selenium.nunit",
        "timeout": 30,
        "run_mode": 0,
        "params": {
          "test_fixture": "WebTest.Main"
        }
      },
      {
        "agent": "ReadyAPI / SoapUI OS",
        "title": "ReadyAPI-Tutorials.zip",
        "timeout": 30,
        "run_mode": 0,
        "params": {
          "test_suite": "Sample TestSuite",
          "test_case": "Search TestCase",
          "report_type": "PDF"
        }
      },
      {
        "agent": "TestNG (Selenium)",
        "title": "TestNG-Test.zip",
        "timeout": 30,
        "run_mode": 0,
        "params": {
          "test_case": "com.smartbear.testng.seltest.AppTest",
          "use_mavem": true
        }
      }
    ]
  }

Error responses

If the operation fails, it returns the appropriate status code and (optionally) the error description in the response body.

If the project with the specified ProjectId does not exist or the authenticating user does not have rights to access the project, the operation returns the Access is denied error.

See Also

Automations Resources

Highlight search results