Create multiple test steps
POST
/test_steps/bulkBase URL
https://app.testsigma.com/api/v2RegionCreate multiple test steps in a test case in a single request.
Authenticate with your API key as a
Bearer token in the Authorization header. How to authenticate →Request body
testCaseId | Target test case ID. |
steps | Array of step objects to create, inserted in the order listed. |
steps[].templateId | NLP template ID for the step. Mandatory for NLP_TEXT steps. |
steps[].elementId | The ID of the element associated with the step (required for templates with ${ui-identifier} in grammar). |
steps[].text | Step input or parameter value. |
steps[].type | Step type: NLP_TEXT or STEP_GROUP. |
Response attributes
(array) | Returns an array of the newly created test step objects. Steps are inserted immediately after previousStepId and their order is assigned automatically. |
Request
curl -X POST \
'https://app.testsigma.com/api/v2/test_steps/bulk' \
-H 'Authorization: Bearer <API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"testCaseId": 9,
"steps": [
{
"templateId": 1044,
"elementId": 567,
"text": "https://www.google.com",
"type": "NLP_TEXT"
},
{
"templateId": 37,
"type": "NLP_TEXT"
}
]
}'const response = await fetch('https://app.testsigma.com/api/v2/test_steps/bulk', {
method: 'POST',
headers: {
'Authorization': 'Bearer <API_KEY>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"testCaseId": 9,
"steps": [
{
"templateId": 1044,
"elementId": 567,
"text": "https://www.google.com",
"type": "NLP_TEXT"
},
{
"templateId": 37,
"type": "NLP_TEXT"
}
]
})
});
const data = await response.json();import requests
response = requests.post(
'https://app.testsigma.com/api/v2/test_steps/bulk',
headers={
'Authorization': 'Bearer <API_KEY>',
'Content-Type': 'application/json'
},
json={
"testCaseId": 9,
"steps": [
{
"templateId": 1044,
"elementId": 567,
"text": "https://www.google.com",
"type": "NLP_TEXT"
},
{
"templateId": 37,
"type": "NLP_TEXT"
}
]
}
)
data = response.json()Response200 OK
[
{
"id": 5847,
"action": "Navigate to https://www.google.com",
"type": "NLP_TEXT",
"testCaseId": 9,
"stepGroupId": null
},
{
"id": 5848,
"action": "Click",
"type": "NLP_TEXT",
"testCaseId": 9,
"stepGroupId": null
}
]Was this page helpful?
Thanks for the feedback.