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

Update a test step

PUT/test_steps/{id}
Base URL https://app.testsigma.com/api/v2Region

Update an existing test step's action, element, NLP template, or condition type by its ID.

Authenticate with your API key as a Bearer token in the Authorization header. How to authenticate →
idThe ID of the test step to update.
testCaseIdTarget test case ID the step belongs to.
templateIdNLP template ID for the step. Mandatory for NLP_TEXT steps (set stepGroupId to null).
elementIdThe ID of the element associated with this step (required for templates with ${ui-identifier} in grammar).
textStep input or parameter value.
typeStep type: NLP_TEXT or STEP_GROUP.
idUnique identifier of the test step.
actionAction description generated from the step.
typeStep type: NLP_TEXT or STEP_GROUP.
conditionTypeCondition applied to the step, if any.
testCaseIdParent test case ID.
stepGroupIdStep group ID for STEP_GROUP steps; null for NLP_TEXT steps.
Request
curl -X PUT \
  'https://app.testsigma.com/api/v2/test_steps/{id}' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "testCaseId": 9,
    "templateId": 1044,
    "elementId": 567,
    "text": "your password",
    "type": "NLP_TEXT"
  }'
const response = await fetch('https://app.testsigma.com/api/v2/test_steps/{id}', {
  method: 'PUT',
  headers: {
    'Authorization': 'Bearer <API_KEY>',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
      "testCaseId": 9,
      "templateId": 1044,
      "elementId": 567,
      "text": "your password",
      "type": "NLP_TEXT"
  })
});
const data = await response.json();
import requests

response = requests.put(
  'https://app.testsigma.com/api/v2/test_steps/{id}',
  headers={
    'Authorization': 'Bearer <API_KEY>',
    'Content-Type': 'application/json'
  },
  json={
      "testCaseId": 9,
      "templateId": 1044,
      "elementId": 567,
      "text": "your password",
      "type": "NLP_TEXT"
  }
)
data = response.json()
Response200 OK
{
  "id": 12,
  "action": "Enter password in the Enter Password field",
  "type": "NLP_TEXT",
  "conditionType": null,
  "testCaseId": 1,
  "stepGroupId": null
}

Was this page helpful?