Skip to content
You're viewing the v2 docs. Looking for v1?Go to v1 docs
Docs
Testsigma
Popular questions
↑↓ to navigate↵ to selectesc to close
Book a demo

Create multiple test steps

POST/test_steps/bulk
Base URL https://app.testsigma.com/api/v2Region

Create 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 →
testCaseIdTarget test case ID.
stepsArray of step objects to create, inserted in the order listed.
steps[].templateIdNLP template ID for the step. Mandatory for NLP_TEXT steps.
steps[].elementIdThe ID of the element associated with the step (required for templates with ${ui-identifier} in grammar).
steps[].textStep input or parameter value.
steps[].typeStep type: NLP_TEXT or STEP_GROUP.
(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?