# Test Automation
The following endpoint enables you to use the Test Automation feature programmatically.
# Quick reference
Type | Resource | Description |
---|---|---|
POST | /api/managed_users/:managed_user_id/test_cases/run_requests | Run test cases in a customer workspace. |
# Run test cases
Use this endpoint to run test cases in a customer workspace.
You can specify the test cases to run in the following ways:
- All test cases of all recipes in a manifest
- All test cases of all recipes in a project
- All test cases of all recipes in a folder
- All test cases belonging to a particular recipe
- Test cases you specify
This endpoint is asynchronous.
POST /api/managed_users/:managed_user_id/test_cases/run_requests
# URL parameters
Name | Type | Description |
---|---|---|
managed_user_id | string required | Embedded customer ID/external ID. The external ID must be URL encoded and prefixed with an E (for example, EA2300 ). |
# Payload
Name | Type | Description |
---|---|---|
manifest_id | integer optional | Run test cases for all recipes in the export manifest you specify. |
project_id | integer optional | Run test cases for all recipes in the project you specify. Use the list projects endpoint to retrieve the IDs of all projects in a customer workspace. |
folder_id | integer optional | Run test cases for all recipes in the folder you specify. Use the list folders endpoint to retrieve the IDs of all folders in a customer workspace. |
recipe_id | integer optional | Run all test cases for the recipe you specify. Use the list recipes endpoint to retrieve the IDs of all recipes in a customer workspace. |
test_case_ids | array of strings optional | Run specific test cases by ID. |
# Sample request
curl -X POST https://www.workato.com/api/managed_users/12345/test_cases/run_requests \
-H 'Authorization: Bearer <api_token>' \
-H 'Content-Type: application/json' \
-d '{
"recipe_id": 987654
}'
# Sample response
{
"data": {
"id": "cirr-ALAGo123-Em8ewZ",
"status": "running",
"created_at": "2024-01-24T04:24:11.601-09:00",
"updated_at": "2024-01-24T04:24:11.601-09:00",
"user": {
"id": 12345
},
"results": [
{
"job": {
"id": "j-ALAGo234-tXMPxZ"
},
"status": "pending",
"recipe": {
"id": 987654,
"name": "Example Recipe"
},
"test_case": {
"id": "citc-ALAGd789-wcotNZ",
"name": "Example Test Case"
}
}
]
}
}
Last updated: 4/25/2024, 5:58:27 PM