All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
apiV2AutoTestsFlakyBulkPost | POST /api/v2/autoTests/flaky/bulk | Set "Flaky" status for multiple autotests |
apiV2AutoTestsIdPatch | PATCH /api/v2/autoTests/{id} | Patch auto test |
apiV2AutoTestsIdTestResultsSearchPost | POST /api/v2/autoTests/{id}/testResults/search | Get test results history for autotest |
apiV2AutoTestsIdWorkItemsChangedIdGet | GET /api/v2/autoTests/{id}/workItems/changed/id | Get identifiers of changed linked work items |
apiV2AutoTestsIdWorkItemsChangedWorkItemIdApprovePost | POST /api/v2/autoTests/{id}/workItems/changed/{workItemId}/approve | Approve changes to work items linked to autotest |
apiV2AutoTestsSearchPost | POST /api/v2/autoTests/search | Search for autotests |
createAutoTest | POST /api/v2/autoTests | Create autotest |
createMultiple | POST /api/v2/autoTests/bulk | Create multiple autotests |
deleteAutoTest | DELETE /api/v2/autoTests/{id} | Delete autotest |
deleteAutoTestLinkFromWorkItem | DELETE /api/v2/autoTests/{id}/workItems | Unlink autotest from work item |
getAllAutoTests | GET /api/v2/autoTests | |
getAutoTestAverageDuration | GET /api/v2/autoTests/{id}/averageDuration | Get average autotest duration |
getAutoTestById | GET /api/v2/autoTests/{id} | Get autotest by internal or global ID |
getAutoTestChronology | GET /api/v2/autoTests/{id}/chronology | Get autotest chronology |
getTestRuns | GET /api/v2/autoTests/{id}/testRuns | Get completed tests runs for autotests |
getWorkItemsLinkedToAutoTest | GET /api/v2/autoTests/{id}/workItems | Get work items linked to autotest |
linkAutoTestToWorkItem | POST /api/v2/autoTests/{id}/workItems | Link autotest with work items |
updateAutoTest | PUT /api/v2/autoTests | Update autotest |
updateMultiple | PUT /api/v2/autoTests/bulk | Update multiple autotests |
apiV2AutoTestsFlakyBulkPost(skip, take, orderBy, searchField, searchValue, flakyBulkModel)
Set "Flaky" status for multiple autotests
User permissions for project: - Read only - Execute - Write - Full control
// Import classes:
import ru.testit.client.invoker.ApiClient;
import ru.testit.client.invoker.ApiException;
import ru.testit.client.invoker.Configuration;
import ru.testit.client.invoker.auth.*;
import ru.testit.client.invoker.models.*;
import ru.testit.client.api.AutoTestsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");
// Configure API key authorization: Bearer or PrivateToken
ApiKeyAuth Bearer or PrivateToken = (ApiKeyAuth) defaultClient.getAuthentication("Bearer or PrivateToken");
Bearer or PrivateToken.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer or PrivateToken.setApiKeyPrefix("Token");
AutoTestsApi apiInstance = new AutoTestsApi(defaultClient);
Integer skip = 56; // Integer | Amount of items to be skipped (offset)
Integer take = 56; // Integer | Amount of items to be taken (limit)
String orderBy = "orderBy_example"; // String | SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC)
String searchField = "searchField_example"; // String | Property name for searching
String searchValue = "searchValue_example"; // String | Value for searching
FlakyBulkModel flakyBulkModel = new FlakyBulkModel(); // FlakyBulkModel |
try {
apiInstance.apiV2AutoTestsFlakyBulkPost(skip, take, orderBy, searchField, searchValue, flakyBulkModel);
} catch (ApiException e) {
System.err.println("Exception when calling AutoTestsApi#apiV2AutoTestsFlakyBulkPost");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
skip | Integer | Amount of items to be skipped (offset) | [optional] |
take | Integer | Amount of items to be taken (limit) | [optional] |
orderBy | String | SQL-like ORDER BY statement (column1 ASC | DESC , column2 ASC |
searchField | String | Property name for searching | [optional] |
searchValue | String | Value for searching | [optional] |
flakyBulkModel | FlakyBulkModel | [optional] |
null (empty response body)
[Bearer or PrivateToken](../README.md#Bearer or PrivateToken)
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | * Pagination-Skip - Skipped amount of items * Pagination-Take - Taken items * Pagination-Pages - Expected number of pages * Pagination-Total-Items - Total count of items |
400 | Bad Request | - |
401 | Unauthorized | - |
403 | Invalid user permissions | - |
404 | Not Found | - |
409 | Conflict | - |
422 | Autotests with provided identifiers do not belong to the same project | - |
apiV2AutoTestsIdPatch(id, operation)
Patch auto test
See <a href="https://www.rfc-editor.org/rfc/rfc6902\" target="_blank">RFC 6902: JavaScript Object Notation (JSON) Patch</a> for details
// Import classes:
import ru.testit.client.invoker.ApiClient;
import ru.testit.client.invoker.ApiException;
import ru.testit.client.invoker.Configuration;
import ru.testit.client.invoker.auth.*;
import ru.testit.client.invoker.models.*;
import ru.testit.client.api.AutoTestsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");
// Configure API key authorization: Bearer or PrivateToken
ApiKeyAuth Bearer or PrivateToken = (ApiKeyAuth) defaultClient.getAuthentication("Bearer or PrivateToken");
Bearer or PrivateToken.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer or PrivateToken.setApiKeyPrefix("Token");
AutoTestsApi apiInstance = new AutoTestsApi(defaultClient);
UUID id = UUID.randomUUID(); // UUID | Global Id of auto test
List<Operation> operation = Arrays.asList(); // List<Operation> |
try {
apiInstance.apiV2AutoTestsIdPatch(id, operation);
} catch (ApiException e) {
System.err.println("Exception when calling AutoTestsApi#apiV2AutoTestsIdPatch");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | UUID | Global Id of auto test | |
operation | List<Operation> | [optional] |
null (empty response body)
[Bearer or PrivateToken](../README.md#Bearer or PrivateToken)
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | No Content | - |
400 | Bad Request | - |
401 | Unauthorized | - |
403 | Update permission for auto tests is required | - |
404 | Not Found | - |
409 | Conflict | - |
422 | Unprocessable Entity | - |
List<AutotestResultHistoricalGetModel> apiV2AutoTestsIdTestResultsSearchPost(id, skip, take, orderBy, searchField, searchValue, autotestHistoricalResultSelectModel)
Get test results history for autotest
Use case User sets autotest internal (guid format) or global (integer format) identifier User sets getTestResultHistoryReportQuery (listed in the example) User runs method execution System search for test results using filters set by user in getTestResultHistoryReportQuery and id System returns the enumeration of test results
// Import classes:
import ru.testit.client.invoker.ApiClient;
import ru.testit.client.invoker.ApiException;
import ru.testit.client.invoker.Configuration;
import ru.testit.client.invoker.auth.*;
import ru.testit.client.invoker.models.*;
import ru.testit.client.api.AutoTestsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");
// Configure API key authorization: Bearer or PrivateToken
ApiKeyAuth Bearer or PrivateToken = (ApiKeyAuth) defaultClient.getAuthentication("Bearer or PrivateToken");
Bearer or PrivateToken.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer or PrivateToken.setApiKeyPrefix("Token");
AutoTestsApi apiInstance = new AutoTestsApi(defaultClient);
String id = "id_example"; // String | Autotest identifier
Integer skip = 56; // Integer | Amount of items to be skipped (offset)
Integer take = 56; // Integer | Amount of items to be taken (limit)
String orderBy = "orderBy_example"; // String | SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC)
String searchField = "searchField_example"; // String | Property name for searching
String searchValue = "searchValue_example"; // String | Value for searching
AutotestHistoricalResultSelectModel autotestHistoricalResultSelectModel = new AutotestHistoricalResultSelectModel(); // AutotestHistoricalResultSelectModel |
try {
List<AutotestResultHistoricalGetModel> result = apiInstance.apiV2AutoTestsIdTestResultsSearchPost(id, skip, take, orderBy, searchField, searchValue, autotestHistoricalResultSelectModel);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AutoTestsApi#apiV2AutoTestsIdTestResultsSearchPost");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | String | Autotest identifier | |
skip | Integer | Amount of items to be skipped (offset) | [optional] |
take | Integer | Amount of items to be taken (limit) | [optional] |
orderBy | String | SQL-like ORDER BY statement (column1 ASC | DESC , column2 ASC |
searchField | String | Property name for searching | [optional] |
searchValue | String | Value for searching | [optional] |
autotestHistoricalResultSelectModel | AutotestHistoricalResultSelectModel | [optional] |
List<AutotestResultHistoricalGetModel>
[Bearer or PrivateToken](../README.md#Bearer or PrivateToken)
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | * Pagination-Skip - Skipped amount of items * Pagination-Take - Taken items * Pagination-Pages - Expected number of pages * Pagination-Total-Items - Total count of items |
400 | Bad Request | - |
401 | Unauthorized | - |
403 | Read permission for autotests required | - |
404 | Autotest with provided ID was not found | - |
409 | Conflict | - |
422 | Unprocessable Entity | - |
List<UUID> apiV2AutoTestsIdWorkItemsChangedIdGet(id)
Get identifiers of changed linked work items
User permissions for project: - Read only - Execute - Write - Full control
// Import classes:
import ru.testit.client.invoker.ApiClient;
import ru.testit.client.invoker.ApiException;
import ru.testit.client.invoker.Configuration;
import ru.testit.client.invoker.auth.*;
import ru.testit.client.invoker.models.*;
import ru.testit.client.api.AutoTestsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");
// Configure API key authorization: Bearer or PrivateToken
ApiKeyAuth Bearer or PrivateToken = (ApiKeyAuth) defaultClient.getAuthentication("Bearer or PrivateToken");
Bearer or PrivateToken.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer or PrivateToken.setApiKeyPrefix("Token");
AutoTestsApi apiInstance = new AutoTestsApi(defaultClient);
UUID id = UUID.randomUUID(); // UUID |
try {
List<UUID> result = apiInstance.apiV2AutoTestsIdWorkItemsChangedIdGet(id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AutoTestsApi#apiV2AutoTestsIdWorkItemsChangedIdGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | UUID |
[Bearer or PrivateToken](../README.md#Bearer or PrivateToken)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
400 | Bad Request | - |
401 | Unauthorized | - |
403 | Invalid user permissions | - |
404 | Autotest with provided ID was not found | - |
409 | Conflict | - |
422 | Unprocessable Entity | - |
apiV2AutoTestsIdWorkItemsChangedWorkItemIdApprovePost(id, workItemId)
Approve changes to work items linked to autotest
User permissions for project: - Read only - Execute - Write - Full control
// Import classes:
import ru.testit.client.invoker.ApiClient;
import ru.testit.client.invoker.ApiException;
import ru.testit.client.invoker.Configuration;
import ru.testit.client.invoker.auth.*;
import ru.testit.client.invoker.models.*;
import ru.testit.client.api.AutoTestsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");
// Configure API key authorization: Bearer or PrivateToken
ApiKeyAuth Bearer or PrivateToken = (ApiKeyAuth) defaultClient.getAuthentication("Bearer or PrivateToken");
Bearer or PrivateToken.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer or PrivateToken.setApiKeyPrefix("Token");
AutoTestsApi apiInstance = new AutoTestsApi(defaultClient);
UUID id = UUID.randomUUID(); // UUID |
UUID workItemId = UUID.randomUUID(); // UUID |
try {
apiInstance.apiV2AutoTestsIdWorkItemsChangedWorkItemIdApprovePost(id, workItemId);
} catch (ApiException e) {
System.err.println("Exception when calling AutoTestsApi#apiV2AutoTestsIdWorkItemsChangedWorkItemIdApprovePost");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | UUID | ||
workItemId | UUID |
null (empty response body)
[Bearer or PrivateToken](../README.md#Bearer or PrivateToken)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
400 | Bad Request | - |
401 | Unauthorized | - |
403 | Invalid user permissions | - |
404 | Autotest with provided ID was not found | - |
409 | Conflict | - |
422 | Unprocessable Entity | - |
List<AutoTestModel> apiV2AutoTestsSearchPost(skip, take, orderBy, searchField, searchValue, apiV2AutoTestsSearchPostRequest)
Search for autotests
// Import classes:
import ru.testit.client.invoker.ApiClient;
import ru.testit.client.invoker.ApiException;
import ru.testit.client.invoker.Configuration;
import ru.testit.client.invoker.auth.*;
import ru.testit.client.invoker.models.*;
import ru.testit.client.api.AutoTestsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");
// Configure API key authorization: Bearer or PrivateToken
ApiKeyAuth Bearer or PrivateToken = (ApiKeyAuth) defaultClient.getAuthentication("Bearer or PrivateToken");
Bearer or PrivateToken.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer or PrivateToken.setApiKeyPrefix("Token");
AutoTestsApi apiInstance = new AutoTestsApi(defaultClient);
Integer skip = 56; // Integer | Amount of items to be skipped (offset)
Integer take = 56; // Integer | Amount of items to be taken (limit)
String orderBy = "orderBy_example"; // String | SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC)
String searchField = "searchField_example"; // String | Property name for searching
String searchValue = "searchValue_example"; // String | Value for searching
ApiV2AutoTestsSearchPostRequest apiV2AutoTestsSearchPostRequest = new ApiV2AutoTestsSearchPostRequest(); // ApiV2AutoTestsSearchPostRequest |
try {
List<AutoTestModel> result = apiInstance.apiV2AutoTestsSearchPost(skip, take, orderBy, searchField, searchValue, apiV2AutoTestsSearchPostRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AutoTestsApi#apiV2AutoTestsSearchPost");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
skip | Integer | Amount of items to be skipped (offset) | [optional] |
take | Integer | Amount of items to be taken (limit) | [optional] |
orderBy | String | SQL-like ORDER BY statement (column1 ASC | DESC , column2 ASC |
searchField | String | Property name for searching | [optional] |
searchValue | String | Value for searching | [optional] |
apiV2AutoTestsSearchPostRequest | ApiV2AutoTestsSearchPostRequest | [optional] |
[Bearer or PrivateToken](../README.md#Bearer or PrivateToken)
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | * Pagination-Skip - Skipped amount of items * Pagination-Take - Taken items * Pagination-Pages - Expected number of pages * Pagination-Total-Items - Total count of items |
400 | Bad Request | - |
401 | Unauthorized | - |
403 | Read permission for autotests library is required | - |
404 | Not Found | - |
409 | Conflict | - |
422 | Unprocessable Entity | - |
AutoTestModel createAutoTest(autoTestPostModel)
Create autotest
This method creates a new autotest. To add an autotest to the test plan, link it to a work item using the `POST /api/v2/autoTests/{autoTestId}/workItems` method. Use the `POST /api/v2/testRuns/byAutoTests` method to run autotest outside the test plan.
// Import classes:
import ru.testit.client.invoker.ApiClient;
import ru.testit.client.invoker.ApiException;
import ru.testit.client.invoker.Configuration;
import ru.testit.client.invoker.auth.*;
import ru.testit.client.invoker.models.*;
import ru.testit.client.api.AutoTestsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");
// Configure API key authorization: Bearer or PrivateToken
ApiKeyAuth Bearer or PrivateToken = (ApiKeyAuth) defaultClient.getAuthentication("Bearer or PrivateToken");
Bearer or PrivateToken.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer or PrivateToken.setApiKeyPrefix("Token");
AutoTestsApi apiInstance = new AutoTestsApi(defaultClient);
AutoTestPostModel autoTestPostModel = new AutoTestPostModel(); // AutoTestPostModel |
try {
AutoTestModel result = apiInstance.createAutoTest(autoTestPostModel);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AutoTestsApi#createAutoTest");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
autoTestPostModel | AutoTestPostModel | [optional] |
[Bearer or PrivateToken](../README.md#Bearer or PrivateToken)
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | Created | - |
400 | - Name cannot be empty or contain only white space characters - External ID cannot be empty or contain only white space characters - Namespace cannot be empty or contain only white space characters - Classname cannot be empty or contain only white space characters - Steps cannot be `null` - Steps nesting level is more than 15 - Invalid URI | - |
401 | Unauthorized | - |
403 | Update permission for autotests is required | - |
404 | Project with provided ID cannot be found | - |
409 | Autotest with the same external ID already exists is the project | - |
422 | - Labels have duplicates - Labels begin with `::` - Labels with the same base have different values | - |
List<AutoTestModel> createMultiple(autoTestPostModel)
Create multiple autotests
Use case User sets autotest parameters (listed in the example) and runs method execution System creates autotest [Optional] If steps enumeration is set, system creates step items and relates them to autotest [Optional] If setup enumeration is set, system creates setup items and relates them to autotest [Optional] If teardown enumeration is set, system creates teardown items and relates them to autotest [Optional] If label enumeration is set, system creates labels and relates them to autotest [Optional] If link enumeration is set, system creates links and relates them to autotest System returns autotest model (example listed in response parameters)
// Import classes:
import ru.testit.client.invoker.ApiClient;
import ru.testit.client.invoker.ApiException;
import ru.testit.client.invoker.Configuration;
import ru.testit.client.invoker.auth.*;
import ru.testit.client.invoker.models.*;
import ru.testit.client.api.AutoTestsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");
// Configure API key authorization: Bearer or PrivateToken
ApiKeyAuth Bearer or PrivateToken = (ApiKeyAuth) defaultClient.getAuthentication("Bearer or PrivateToken");
Bearer or PrivateToken.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer or PrivateToken.setApiKeyPrefix("Token");
AutoTestsApi apiInstance = new AutoTestsApi(defaultClient);
List<AutoTestPostModel> autoTestPostModel = Arrays.asList(); // List<AutoTestPostModel> |
try {
List<AutoTestModel> result = apiInstance.createMultiple(autoTestPostModel);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AutoTestsApi#createMultiple");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
autoTestPostModel | List<AutoTestPostModel> | [optional] |
[Bearer or PrivateToken](../README.md#Bearer or PrivateToken)
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | Created | - |
400 | - Name cannot be empty or contain only white space characters - External ID cannot be empty or contain only white space characters - Namespace cannot be empty or contain only white space characters - Classname cannot be empty or contain only white space characters - Steps cannot be `null` - Steps nesting level is more than 15 - Invalid URI | - |
401 | Unauthorized | - |
403 | Update permission for autotests is required | - |
404 | Project with provided ID cannot be found | - |
409 | Autotest with the same external ID already exists is the project | - |
422 | - Labels have duplicates - Labels begin with `::` - Labels with the same base have different values | - |
deleteAutoTest(id)
Delete autotest
Use case User sets autotest internal (guid format) or global (integer format) identifier and runs method execution System finds the autotest by the identifier System deletes autotest and returns no content response
// Import classes:
import ru.testit.client.invoker.ApiClient;
import ru.testit.client.invoker.ApiException;
import ru.testit.client.invoker.Configuration;
import ru.testit.client.invoker.auth.*;
import ru.testit.client.invoker.models.*;
import ru.testit.client.api.AutoTestsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");
// Configure API key authorization: Bearer or PrivateToken
ApiKeyAuth Bearer or PrivateToken = (ApiKeyAuth) defaultClient.getAuthentication("Bearer or PrivateToken");
Bearer or PrivateToken.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer or PrivateToken.setApiKeyPrefix("Token");
AutoTestsApi apiInstance = new AutoTestsApi(defaultClient);
String id = "id_example"; // String | Autotest internal (UUID) or global (integer) identifier
try {
apiInstance.deleteAutoTest(id);
} catch (ApiException e) {
System.err.println("Exception when calling AutoTestsApi#deleteAutoTest");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | String | Autotest internal (UUID) or global (integer) identifier |
null (empty response body)
[Bearer or PrivateToken](../README.md#Bearer or PrivateToken)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | No Content | - |
400 | Bad Request | - |
401 | Unauthorized | - |
403 | Delete permission for autotests is required | - |
404 | Autotest with provided ID cannot be found | - |
409 | Conflict | - |
422 | Unprocessable Entity | - |
deleteAutoTestLinkFromWorkItem(id, workItemId)
Unlink autotest from work item
Use case User sets autotest internal (guid format) or global (integer format) identifier [Optional] User sets workitem internal (guid format) or global (integer format) identifier User runs method execution System finds the autotest by the autotest identifier [Optional] if workitem id is set by User, System finds the workitem by the workitem identifier and unlinks it from autotest. [Optional] Otherwise, if workitem id is not specified, System unlinks all workitems linked to autotest. System returns no content response
// Import classes:
import ru.testit.client.invoker.ApiClient;
import ru.testit.client.invoker.ApiException;
import ru.testit.client.invoker.Configuration;
import ru.testit.client.invoker.auth.*;
import ru.testit.client.invoker.models.*;
import ru.testit.client.api.AutoTestsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");
// Configure API key authorization: Bearer or PrivateToken
ApiKeyAuth Bearer or PrivateToken = (ApiKeyAuth) defaultClient.getAuthentication("Bearer or PrivateToken");
Bearer or PrivateToken.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer or PrivateToken.setApiKeyPrefix("Token");
AutoTestsApi apiInstance = new AutoTestsApi(defaultClient);
String id = "id_example"; // String | Autotest internal (UUID) or global (integer) identifier
String workItemId = "workItemId_example"; // String | Work item internal (UUID) or global (integer) identifier
try {
apiInstance.deleteAutoTestLinkFromWorkItem(id, workItemId);
} catch (ApiException e) {
System.err.println("Exception when calling AutoTestsApi#deleteAutoTestLinkFromWorkItem");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | String | Autotest internal (UUID) or global (integer) identifier | |
workItemId | String | Work item internal (UUID) or global (integer) identifier | [optional] |
null (empty response body)
[Bearer or PrivateToken](../README.md#Bearer or PrivateToken)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | No Content | - |
400 | Work item ID is invalid | - |
401 | Unauthorized | - |
403 | Update permission for autotests is required | - |
404 | - Autotest with provided ID cannot be found - Work item with provided ID cannot be found | - |
409 | Conflict | - |
422 | Unprocessable Entity | - |
List<AutoTestModel> getAllAutoTests(projectId, externalId, globalId, namespace, isNamespaceNull, includeEmptyNamespaces, className, isClassnameNull, includeEmptyClassNames, isDeleted, deleted, labels, stabilityMinimal, minStability, stabilityMaximal, maxStability, isFlaky, flaky, includeSteps, includeLabels, externalKey, skip, take, orderBy, searchField, searchValue)
// Import classes:
import ru.testit.client.invoker.ApiClient;
import ru.testit.client.invoker.ApiException;
import ru.testit.client.invoker.Configuration;
import ru.testit.client.invoker.auth.*;
import ru.testit.client.invoker.models.*;
import ru.testit.client.api.AutoTestsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");
// Configure API key authorization: Bearer or PrivateToken
ApiKeyAuth Bearer or PrivateToken = (ApiKeyAuth) defaultClient.getAuthentication("Bearer or PrivateToken");
Bearer or PrivateToken.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer or PrivateToken.setApiKeyPrefix("Token");
AutoTestsApi apiInstance = new AutoTestsApi(defaultClient);
UUID projectId = UUID.randomUUID(); // UUID | Project internal ID
String externalId = "externalId_example"; // String | Autotest external ID
Long globalId = 56L; // Long | Autotest global ID
String namespace = "namespace_example"; // String | Namespace in which autotest is located
Boolean isNamespaceNull = true; // Boolean | OBSOLETE: Use `includeEmptyNamespaces` instead
Boolean includeEmptyNamespaces = true; // Boolean | If result must contain autotests without namespace
String className = "className_example"; // String | Name of class in which autotest is located
Boolean isClassnameNull = true; // Boolean | OBSOLETE: Use `includeEmptyClassNames` instead
Boolean includeEmptyClassNames = true; // Boolean | If result must contain autotests without class
Boolean isDeleted = true; // Boolean | OBSOLETE: Use `deleted` instead
Boolean deleted = true; // Boolean | Is autotest deleted
List<String> labels = Arrays.asList(); // List<String> | Include only autotests with provided labels
Integer stabilityMinimal = 56; // Integer | OBSOLETE: Use `minStability` instead
Integer minStability = 56; // Integer | Minimum stability value of autotest
Integer stabilityMaximal = 56; // Integer | OBSOLETE: Use `maxStability` instead
Integer maxStability = 56; // Integer | Maximum stability value of autotest
Boolean isFlaky = true; // Boolean | OBSOLETE: Use `flaky` instead
Boolean flaky = true; // Boolean | Is autotest marked as \"Flaky\"
Boolean includeSteps = true; // Boolean | If result must also include autotest steps
Boolean includeLabels = true; // Boolean | If result must also include autotest labels
String externalKey = "externalKey_example"; // String | External key of autotest
Integer skip = 56; // Integer | Amount of items to be skipped (offset)
Integer take = 56; // Integer | Amount of items to be taken (limit)
String orderBy = "orderBy_example"; // String | SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC)
String searchField = "searchField_example"; // String | Property name for searching
String searchValue = "searchValue_example"; // String | Value for searching
try {
List<AutoTestModel> result = apiInstance.getAllAutoTests(projectId, externalId, globalId, namespace, isNamespaceNull, includeEmptyNamespaces, className, isClassnameNull, includeEmptyClassNames, isDeleted, deleted, labels, stabilityMinimal, minStability, stabilityMaximal, maxStability, isFlaky, flaky, includeSteps, includeLabels, externalKey, skip, take, orderBy, searchField, searchValue);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AutoTestsApi#getAllAutoTests");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
projectId | UUID | Project internal ID | [optional] |
externalId | String | Autotest external ID | [optional] |
globalId | Long | Autotest global ID | [optional] |
namespace | String | Namespace in which autotest is located | [optional] |
isNamespaceNull | Boolean | OBSOLETE: Use `includeEmptyNamespaces` instead | [optional] |
includeEmptyNamespaces | Boolean | If result must contain autotests without namespace | [optional] |
className | String | Name of class in which autotest is located | [optional] |
isClassnameNull | Boolean | OBSOLETE: Use `includeEmptyClassNames` instead | [optional] |
includeEmptyClassNames | Boolean | If result must contain autotests without class | [optional] |
isDeleted | Boolean | OBSOLETE: Use `deleted` instead | [optional] |
deleted | Boolean | Is autotest deleted | [optional] |
labels | List<String> | Include only autotests with provided labels | [optional] |
stabilityMinimal | Integer | OBSOLETE: Use `minStability` instead | [optional] |
minStability | Integer | Minimum stability value of autotest | [optional] |
stabilityMaximal | Integer | OBSOLETE: Use `maxStability` instead | [optional] |
maxStability | Integer | Maximum stability value of autotest | [optional] |
isFlaky | Boolean | OBSOLETE: Use `flaky` instead | [optional] |
flaky | Boolean | Is autotest marked as "Flaky" | [optional] |
includeSteps | Boolean | If result must also include autotest steps | [optional] |
includeLabels | Boolean | If result must also include autotest labels | [optional] |
externalKey | String | External key of autotest | [optional] |
skip | Integer | Amount of items to be skipped (offset) | [optional] |
take | Integer | Amount of items to be taken (limit) | [optional] |
orderBy | String | SQL-like ORDER BY statement (column1 ASC | DESC , column2 ASC |
searchField | String | Property name for searching | [optional] |
searchValue | String | Value for searching | [optional] |
[Bearer or PrivateToken](../README.md#Bearer or PrivateToken)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | * Pagination-Skip - Skipped amount of items * Pagination-Take - Taken items * Pagination-Pages - Expected number of pages * Pagination-Total-Items - Total count of items |
400 | Bad Request | - |
401 | Unauthorized | - |
403 | Forbidden | - |
404 | Not Found | - |
409 | Conflict | - |
422 | Unprocessable Entity | - |
AutoTestAverageDurationModel getAutoTestAverageDuration(id)
Get average autotest duration
Use case User sets autotest internal (guid format) or global (integer format) identifier User runs method execution System calculates pass average duration and fail average duration of autotest from all related test results System returns pass average duration and fail average duration for autotest
// Import classes:
import ru.testit.client.invoker.ApiClient;
import ru.testit.client.invoker.ApiException;
import ru.testit.client.invoker.Configuration;
import ru.testit.client.invoker.auth.*;
import ru.testit.client.invoker.models.*;
import ru.testit.client.api.AutoTestsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");
// Configure API key authorization: Bearer or PrivateToken
ApiKeyAuth Bearer or PrivateToken = (ApiKeyAuth) defaultClient.getAuthentication("Bearer or PrivateToken");
Bearer or PrivateToken.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer or PrivateToken.setApiKeyPrefix("Token");
AutoTestsApi apiInstance = new AutoTestsApi(defaultClient);
String id = "id_example"; // String | Autotest internal (UUID) or global (integer) identifier
try {
AutoTestAverageDurationModel result = apiInstance.getAutoTestAverageDuration(id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AutoTestsApi#getAutoTestAverageDuration");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | String | Autotest internal (UUID) or global (integer) identifier |
[Bearer or PrivateToken](../README.md#Bearer or PrivateToken)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
404 | Autotest with provided ID was not found | - |
400 | Bad Request | - |
401 | Unauthorized | - |
403 | Read permission for autotests is required | - |
409 | Conflict | - |
422 | Unprocessable Entity | - |
0 | Error | - |
AutoTestModel getAutoTestById(id)
Get autotest by internal or global ID
Use case User sets autotest internal or global identifier and runs method execution System returns autotest, which internal or global identifier equals the identifier value set in the previous action
// Import classes:
import ru.testit.client.invoker.ApiClient;
import ru.testit.client.invoker.ApiException;
import ru.testit.client.invoker.Configuration;
import ru.testit.client.invoker.auth.*;
import ru.testit.client.invoker.models.*;
import ru.testit.client.api.AutoTestsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");
// Configure API key authorization: Bearer or PrivateToken
ApiKeyAuth Bearer or PrivateToken = (ApiKeyAuth) defaultClient.getAuthentication("Bearer or PrivateToken");
Bearer or PrivateToken.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer or PrivateToken.setApiKeyPrefix("Token");
AutoTestsApi apiInstance = new AutoTestsApi(defaultClient);
String id = "id_example"; // String | Autotest internal (UUID) or global (integer) identifier
try {
AutoTestModel result = apiInstance.getAutoTestById(id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AutoTestsApi#getAutoTestById");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | String | Autotest internal (UUID) or global (integer) identifier |
[Bearer or PrivateToken](../README.md#Bearer or PrivateToken)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
404 | Autotest with provided ID cannot be found | - |
400 | Autotest ID is invalid | - |
401 | Unauthorized | - |
403 | Read permission for autotests is required | - |
409 | Conflict | - |
422 | Unprocessable Entity | - |
0 | Error | - |
List<TestResultChronologyModel> getAutoTestChronology(id)
Get autotest chronology
Use case User sets autotest internal (guid format) or global (integer format) identifier User runs method execution System search all test results related to autotest (with default limit equal 100) System orders the test results by CompletedOn property descending and then orders by CreatedDate property descending System returns test result chronology for autotest
// Import classes:
import ru.testit.client.invoker.ApiClient;
import ru.testit.client.invoker.ApiException;
import ru.testit.client.invoker.Configuration;
import ru.testit.client.invoker.auth.*;
import ru.testit.client.invoker.models.*;
import ru.testit.client.api.AutoTestsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");
// Configure API key authorization: Bearer or PrivateToken
ApiKeyAuth Bearer or PrivateToken = (ApiKeyAuth) defaultClient.getAuthentication("Bearer or PrivateToken");
Bearer or PrivateToken.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer or PrivateToken.setApiKeyPrefix("Token");
AutoTestsApi apiInstance = new AutoTestsApi(defaultClient);
String id = "id_example"; // String | Autotest internal (UUID) or global (integer) identifier
try {
List<TestResultChronologyModel> result = apiInstance.getAutoTestChronology(id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AutoTestsApi#getAutoTestChronology");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | String | Autotest internal (UUID) or global (integer) identifier |
List<TestResultChronologyModel>
[Bearer or PrivateToken](../README.md#Bearer or PrivateToken)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
400 | Bad Request | - |
401 | Unauthorized | - |
403 | Read permission for autotests is required | - |
404 | Autotest with provided ID was not found | - |
409 | Conflict | - |
422 | Unprocessable Entity | - |
List<TestRunShortModel> getTestRuns(id)
Get completed tests runs for autotests
Use case User sets autotest internal (guid format) or global (integer format) identifier User runs method execution System search for all test runs related to the autotest System returns the enumeration of test runs
// Import classes:
import ru.testit.client.invoker.ApiClient;
import ru.testit.client.invoker.ApiException;
import ru.testit.client.invoker.Configuration;
import ru.testit.client.invoker.auth.*;
import ru.testit.client.invoker.models.*;
import ru.testit.client.api.AutoTestsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");
// Configure API key authorization: Bearer or PrivateToken
ApiKeyAuth Bearer or PrivateToken = (ApiKeyAuth) defaultClient.getAuthentication("Bearer or PrivateToken");
Bearer or PrivateToken.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer or PrivateToken.setApiKeyPrefix("Token");
AutoTestsApi apiInstance = new AutoTestsApi(defaultClient);
String id = "id_example"; // String | Autotest internal (UUID) or global (integer) identifier
try {
List<TestRunShortModel> result = apiInstance.getTestRuns(id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AutoTestsApi#getTestRuns");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | String | Autotest internal (UUID) or global (integer) identifier |
[Bearer or PrivateToken](../README.md#Bearer or PrivateToken)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
400 | Bad Request | - |
401 | Unauthorized | - |
403 | Read permission for autotests is required | - |
404 | Autotest with provided ID was not found | - |
409 | Conflict | - |
422 | Unprocessable Entity | - |
List<WorkItemIdentifierModel> getWorkItemsLinkedToAutoTest(id, isDeleted, isWorkItemDeleted)
Get work items linked to autotest
This method links an autotest to a test case or a checklist. A manual test case with a linked automated work item is marked in the test management system as an autotest. You can run it from graphical user interface (GUI). To do that: 1. Open the project in GUI. 2. Go to <b>Test plans</b> section and switch to the <b>Execution</b> tab. 3. Select the autotest(s) you want to run using checkboxes. 4. In the toolbar above the test list, click <b>Run autotests</b>.
// Import classes:
import ru.testit.client.invoker.ApiClient;
import ru.testit.client.invoker.ApiException;
import ru.testit.client.invoker.Configuration;
import ru.testit.client.invoker.auth.*;
import ru.testit.client.invoker.models.*;
import ru.testit.client.api.AutoTestsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");
// Configure API key authorization: Bearer or PrivateToken
ApiKeyAuth Bearer or PrivateToken = (ApiKeyAuth) defaultClient.getAuthentication("Bearer or PrivateToken");
Bearer or PrivateToken.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer or PrivateToken.setApiKeyPrefix("Token");
AutoTestsApi apiInstance = new AutoTestsApi(defaultClient);
String id = "id_example"; // String | Specifies the autotest entity ID. You can copy it from the address bar in your web browser or use autotest GUID.
Boolean isDeleted = true; // Boolean | Specifies that a test is deleted or still relevant.
Boolean isWorkItemDeleted = false; // Boolean | OBSOLETE: Use `isDeleted` instead
try {
List<WorkItemIdentifierModel> result = apiInstance.getWorkItemsLinkedToAutoTest(id, isDeleted, isWorkItemDeleted);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AutoTestsApi#getWorkItemsLinkedToAutoTest");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | String | Specifies the autotest entity ID. You can copy it from the address bar in your web browser or use autotest GUID. | |
isDeleted | Boolean | Specifies that a test is deleted or still relevant. | [optional] |
isWorkItemDeleted | Boolean | OBSOLETE: Use `isDeleted` instead | [optional] [default to false] |
[Bearer or PrivateToken](../README.md#Bearer or PrivateToken)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
400 | Bad Request | - |
401 | Unauthorized | - |
403 | Read permission for autotests is required | - |
404 | Autotest with provided ID cannot be found | - |
409 | Conflict | - |
422 | Unprocessable Entity | - |
linkAutoTestToWorkItem(id, workItemIdModel)
Link autotest with work items
Use case User sets autotest internal (guid format) or global (integer format) identifier User sets work item internal (guid format) or global (integer format) identifier User runs method execution System finds the autotest by the autotest identifier System finds the work item by the work item identifier System relates the work item with the autotest and returns no content response
// Import classes:
import ru.testit.client.invoker.ApiClient;
import ru.testit.client.invoker.ApiException;
import ru.testit.client.invoker.Configuration;
import ru.testit.client.invoker.auth.*;
import ru.testit.client.invoker.models.*;
import ru.testit.client.api.AutoTestsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");
// Configure API key authorization: Bearer or PrivateToken
ApiKeyAuth Bearer or PrivateToken = (ApiKeyAuth) defaultClient.getAuthentication("Bearer or PrivateToken");
Bearer or PrivateToken.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer or PrivateToken.setApiKeyPrefix("Token");
AutoTestsApi apiInstance = new AutoTestsApi(defaultClient);
String id = "id_example"; // String | Autotest internal (UUID) or global (integer) identifier
WorkItemIdModel workItemIdModel = new WorkItemIdModel(); // WorkItemIdModel |
try {
apiInstance.linkAutoTestToWorkItem(id, workItemIdModel);
} catch (ApiException e) {
System.err.println("Exception when calling AutoTestsApi#linkAutoTestToWorkItem");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | String | Autotest internal (UUID) or global (integer) identifier | |
workItemIdModel | WorkItemIdModel | [optional] |
null (empty response body)
[Bearer or PrivateToken](../README.md#Bearer or PrivateToken)
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | No Content | - |
400 | - Autotest cannot be linked to shared steps - Autotest cannot be linked to work item from other project - Work item ID is invalid | - |
401 | Unauthorized | - |
403 | Update permission for autotests is required | - |
404 | - Autotest with provided ID cannot be found - Work item with provided ID cannot be found | - |
409 | Conflict | - |
422 | Unprocessable Entity | - |
updateAutoTest(autoTestPutModel)
Update autotest
Use case User sets autotest updated parameters values (listed in the example) and runs method execution System finds the autotest by the identifier System updates autotest parameters [Optional] If steps enumeration is set, system creates step items, relates them to autotest and deletes relations with current steps( if exist) [Optional] If Setup enumeration is set, system creates setup items and relates them to autotest and deletes relations with current Setup items (if exist) [Optional] If teardown enumeration is set, system creates teardown items and relates them to autotest and deletes relations with current teardown items (if exist) [Optional] If label enumeration is set, system creates labels and relates them to autotest and deletes relations with current Labels (if exist) [Optional] If link enumeration is set, system creates links and relates them to autotest and deletes relations with current Links (if exist) System updates autotest and returns no content response
// Import classes:
import ru.testit.client.invoker.ApiClient;
import ru.testit.client.invoker.ApiException;
import ru.testit.client.invoker.Configuration;
import ru.testit.client.invoker.auth.*;
import ru.testit.client.invoker.models.*;
import ru.testit.client.api.AutoTestsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");
// Configure API key authorization: Bearer or PrivateToken
ApiKeyAuth Bearer or PrivateToken = (ApiKeyAuth) defaultClient.getAuthentication("Bearer or PrivateToken");
Bearer or PrivateToken.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer or PrivateToken.setApiKeyPrefix("Token");
AutoTestsApi apiInstance = new AutoTestsApi(defaultClient);
AutoTestPutModel autoTestPutModel = new AutoTestPutModel(); // AutoTestPutModel |
try {
apiInstance.updateAutoTest(autoTestPutModel);
} catch (ApiException e) {
System.err.println("Exception when calling AutoTestsApi#updateAutoTest");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
autoTestPutModel | AutoTestPutModel | [optional] |
null (empty response body)
[Bearer or PrivateToken](../README.md#Bearer or PrivateToken)
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
400 | - Name cannot be empty or contain only white space characters - External ID cannot be empty or contain only white space characters - Namespace cannot be empty or contain only white space characters - Classname cannot be empty or contain only white space characters - Steps cannot be `null` - Steps nesting level is more than 15 - Invalid URI | - |
401 | Unauthorized | - |
403 | Update permission for autotests is required | - |
404 | - Autotests with provided ID cannot be found - Project with provided ID cannot be found - Link with provided ID cannot be found - Label with provided ID cannot be found | - |
409 | Autotest with the same external ID already exists is the project | - |
422 | - Project ID cannot be changed - Labels have duplicates - Labels begin with `::` - Labels with the same base have different values | - |
204 | Success | - |
updateMultiple(autoTestPutModel)
Update multiple autotests
Use case User sets autotest updated parameters values (listed in the example) and runs method execution System finds the autotest by the identifier System updates autotest parameters [Optional] If steps enumeration is set, system creates step items, relates them to autotest and deletes relations with current steps( if exist) [Optional] If Setup enumeration is set, system creates setup items and relates them to autotest and deletes relations with current Setup items (if exist) [Optional] If teardown enumeration is set, system creates teardown items and relates them to autotest and deletes relations with current teardown items (if exist) [Optional] If label enumeration is set, system creates labels and relates them to autotest and deletes relations with current Labels (if exist) [Optional] If link enumeration is set, system creates links and relates them to autotest and deletes relations with current Links (if exist) System updates autotest and returns no content response
// Import classes:
import ru.testit.client.invoker.ApiClient;
import ru.testit.client.invoker.ApiException;
import ru.testit.client.invoker.Configuration;
import ru.testit.client.invoker.auth.*;
import ru.testit.client.invoker.models.*;
import ru.testit.client.api.AutoTestsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");
// Configure API key authorization: Bearer or PrivateToken
ApiKeyAuth Bearer or PrivateToken = (ApiKeyAuth) defaultClient.getAuthentication("Bearer or PrivateToken");
Bearer or PrivateToken.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer or PrivateToken.setApiKeyPrefix("Token");
AutoTestsApi apiInstance = new AutoTestsApi(defaultClient);
List<AutoTestPutModel> autoTestPutModel = Arrays.asList(); // List<AutoTestPutModel> |
try {
apiInstance.updateMultiple(autoTestPutModel);
} catch (ApiException e) {
System.err.println("Exception when calling AutoTestsApi#updateMultiple");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
autoTestPutModel | List<AutoTestPutModel> | [optional] |
null (empty response body)
[Bearer or PrivateToken](../README.md#Bearer or PrivateToken)
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | No Content | - |
400 | - Name cannot be empty or contain only white space characters - External ID cannot be empty or contain only white space characters - Namespace cannot be empty or contain only white space characters - Classname cannot be empty or contain only white space characters - Steps cannot be `null` - Steps nesting level is more than 15 - Invalid URI | - |
401 | Unauthorized | - |
403 | Update permission for autotests is required | - |
404 | - Autotests with provided ID cannot be found - Project with provided ID cannot be found - Link with provided ID cannot be found - Label with provided ID cannot be found | - |
409 | Autotest with the same external ID already exists is the project | - |
422 | - Project ID cannot be changed - Labels have duplicates - Labels begin with `::` - Labels with the same base have different values | - |