cURL
Python
JavaScript
PHP
Go
Java
curl --request POST \
--url https://app.octomind.dev/api/apiKey/v2/execute \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '{
"testTargetId": "2e2bb27b-a19c-47ce-a9b6-cd1bd31622dc",
"url": "https://example.com",
"context": {
"source": "github",
"issueNumber": 123,
"ref": "refs/heads/main",
"sha": "abc123def456",
"repo": "my-repo",
"owner": "repo-owner",
"triggeredBy": {
"type": "USER",
"userId": "user123"
},
"nodeId": "node-123"
},
"environmentName": "default",
"variablesToOverwrite": {
"SPACE_ID": [
"64ee32b4-7365-47a6-b5b0-2903b6ad849d"
]
},
"tags": [
"tag1",
"tag2"
]
}'
{
"testReportUrl" : "https://app.octomind.dev/testreports/826c15af-644b-4b28-89b4-f50ff34e46b7" ,
"testReport" : {
"id" : "826c15af-644b-4b28-89b4-f50ff34e46b7" ,
"testTargetId" : "3435918b-3d29-4ebd-8c68-9a540532f45a" ,
"createdAt" : "2024-09-06T13:01:51.686Z" ,
"updatedAt" : "2024-09-06T13:01:51.686Z" ,
"executionUrl" : "https://en.wikipedia.org/" ,
"status" : "WAITING" ,
"context" : {
"source" : "manual" ,
"description" : "manual trigger" ,
"triggeredBy" : {
"type" : "USER" ,
"userId" : "2e2bb27b-a19c-47ce-a9b6-cd1bd31622dc"
}
} ,
"testResults" : [
{
"id" : "826c15af-644b-4b28-89b4-f50ff34e46b7" ,
"testTargetId" : "3435918b-3d29-4ebd-8c68-9a540532f45a" ,
"testCaseId" : "5b844cf1-d597-4048-9e74-7c0f9ce3e2ee" ,
"createdAt" : "2024-09-06T13:01:51.686Z" ,
"updatedAt" : "2024-09-06T13:01:51.686Z" ,
"status" : "WAITING" ,
"errorMessage" : "TimeoutError: locator.click: Timeout 30000ms exceeded." ,
"traceUrl" : "https://storage.googleapis.com/automagically-traces/826c15af-644b-4b28-89b4-f50ff34e46b7-trace.zip"
}
]
}
}
If you provide an enviroment name, the test are executed within that environment, meaning all settings (test account, headers etc.)
of that environment are applied.
The tags list is used to filter test cases. If you provide more than one tag all test cases with at least one matching tags are executed.
Optionally you can overwrite variables defined in the environment for that specific run.
More on tags see manage tests
Unique identifier for the testTarget.
The URL of the test target for this run.
Option 1 Option 2 Option 3 Option 4 Option 5 Option 6
Available options:
github
context.triggeredBy. userId
the environment name you want to run your test against
The variables to overwrite exclusively for this test run.
variablesToOverwrite. {key}
Test executed successfully
The URL where the test report can be accessed.
Unique identifier for the test report.
The unique identifier of the test target.
The timestamp when the test report was created.
The timestamp when the test report was last updated.
The URL where the test execution was performed.
The status of the test report, will be WAITING as long as any result is running, FAILED if the report is done but has any failed result and PASSED if all test results are done and successful
Available options:
WAITING
,
PASSED
,
FAILED
testReport.context. source
The source of the test trigger.
Available options:
manual
testReport.context. description
The description of the test context.
testReport.context. triggeredBy
testReport.context.triggeredBy. type
The type of entity triggering the test.
testReport.context.triggeredBy. userId
The unique identifier of the user who triggered the test.
testReport.testResults. id
Unique identifier for the test result.
testReport.testResults. testTargetId
Unique identifier of the test report this result belongs to.
testReport.testResults. testCaseId
Unique identifier of the test case this result belongs to.
testReport.testResults. createdAt
The timestamp when the test result was created.
testReport.testResults. updatedAt
The timestamp when the test result was last updated.
testReport.testResults. status
The status of the specific test result, will be WAITING as long as the result is running, FAILED if the execution failed, PASSED if it succeeded, and ERROR if an internal error occurred.
Available options:
WAITING
,
PASSED
,
FAILED
,
ERROR
testReport.testResults. errorMessage
The error that has occurred during execution - only set if the status is FAILED or ERROR.
testReport.testResults. traceUrl
Link to the playwright trace of the test execution - only set once the test result is finished (PASSED or FAILED).