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:
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 [email protected]: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
}
}
]
}
Metadata about the automation list.
Pagination information about the automation list. (See Paging Through Results Using Offset and Limit).
The number of returned automations.
The offset of the first automation requested.
The maximum number of automations requested.
The total number of automations.
The authenticating user’s rights to access automations.
Access rights:
- 0 - None
- 1 - Read
- 2 - Update
- 3 - Read and update
- 4 - Delete
- 5 - Read and delete
- 7 - Full access
An array of automations.
The agent (test runner) to run the test with.
Currently, REST API supports the following agents:
Agent | URL-encoded Name | Short Name |
---|---|---|
TestComplete/TestExecute | TestComplete%2FTestExecute |
testcomplete |
JUnit (Selenium) | JUnit%20%28Selenium%29 |
junit |
NUnit (Selenium) | NUnit%20%28Selenium%29 |
nunit |
TestNG (Selenium) | TestNG%20%28Selenium%29 |
testng |
ReadyAPI / SoapUI OS | ReadyAPI+%2F+SoapUI+OS |
readyapi |
The agent names are case-insensitive.
The title of automation.
The test timeout in seconds.
Indicates whether to run a test in a temporary folder or in-place (if possible).
The test parameters. Depends on the agent (test runner) that will run the automation.
The entry point for the TestComplete automation.
The test case class name for the JUnit automation.
Specifies whether the automation will be run by using Maven.
For NUnit automations, name of a test case, fixture or namespace to run.
For ReadyAPI automations, name of a test suite to run.
The name of a test case to run.
For ReadyAPI automations, the format of the test result report.
Custom command-line parameters to pass to the agent (test runner).
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.