Create a test step
POST
/test_stepsBase URL
https://app.testsigma.com/api/v2RegionCreate a single test step in a test case, with its action, element, NLP template, and position after a previous step.
Authenticate with your API key as a
Bearer token in the Authorization header. How to authenticate →Request body
testCaseId | The ID of the test case where you want to add the new step. |
templateId | Identifier for the type of action performed. Mandatory for NLP_TEXT steps (set stepGroupId to null). |
previousStepId | The ID of the step that the new step should follow. |
elementId | The ID of the element associated with this step (required for templates with ${ui-identifier} in grammar). |
text | The value of the step's action, e.g. the URL to navigate to. |
type | Step type: NLP_TEXT (Natural Language Processing text step) or STEP_GROUP (a group of steps executed together). |
Response attributes
id | Unique numerical identifier for the newly created test step. |
action | Human-readable description of the action the step performs. |
type | Step type: NLP_TEXT or STEP_GROUP. |
conditionType | Condition applied to the step, if any. |
testCaseId | Parent test case ID. |
stepGroupId | Step group ID for STEP_GROUP steps; null for NLP_TEXT steps. |
Request
curl -X POST \
'https://app.testsigma.com/api/v2/test_steps' \
-H 'Authorization: Bearer <API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"testCaseId": 9,
"templateId": 1044,
"previousStepId": 223,
"elementId": 567,
"text": "https://www.google.com",
"type": "NLP_TEXT"
}'const response = await fetch('https://app.testsigma.com/api/v2/test_steps', {
method: 'POST',
headers: {
'Authorization': 'Bearer <API_KEY>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"testCaseId": 9,
"templateId": 1044,
"previousStepId": 223,
"elementId": 567,
"text": "https://www.google.com",
"type": "NLP_TEXT"
})
});
const data = await response.json();import requests
response = requests.post(
'https://app.testsigma.com/api/v2/test_steps',
headers={
'Authorization': 'Bearer <API_KEY>',
'Content-Type': 'application/json'
},
json={
"testCaseId": 9,
"templateId": 1044,
"previousStepId": 223,
"elementId": 567,
"text": "https://www.google.com",
"type": "NLP_TEXT"
}
)
data = response.json()Response200 OK
{
"id": 5846,
"action": "Navigate to https://www.google.com",
"type": "NLP_TEXT",
"conditionType": null,
"testCaseId": 9,
"stepGroupId": null
}Was this page helpful?
Thanks for the feedback.