Skip to main content
POST
/
apiKey
/
v3
/
test-targets
/
{testTargetId}
/
test-cases
/
{testCaseId}
/
import
Import a test case
curl --request POST \
  --url https://app.octomind.dev/api/apiKey/v3/test-targets/{testTargetId}/test-cases/{testCaseId}/import \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "testTargetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "description": "<string>",
  "elements": [
    {
      "index": 123,
      "description": "<string>",
      "selectors": [
        {
          "selectorType": "FRAME",
          "index": 123,
          "selector": "<string>",
          "options": {
            "name": "<string>",
            "exact": true,
            "checked": true,
            "disabled": true,
            "expanded": true,
            "includeHidden": true,
            "level": 123,
            "pressed": true,
            "selected": true,
            "hasText": "<string>",
            "hasNotText": "<string>"
          }
        }
      ],
      "interaction": {
        "action": "CLICK",
        "calledWith": {
          "button": "right",
          "double": true,
          "force": true
        }
      },
      "assertion": {
        "expectation": "VISIBLE",
        "calledWith": "<unknown>"
      },
      "ignoreFailure": false
    }
  ],
  "entryPointUrlPath": "<string>",
  "type": "LOGIN",
  "dependencyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "teardownId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "tags": [
    "<string>"
  ]
}
'
{
  "message": "<string>",
  "success": true,
  "testCaseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

Authorizations

X-API-Key
string
header
required

Path Parameters

testTargetId
string<uuid>
required

The ID of the test target

testCaseId
string<uuid>
required

The ID of the case to import

Body

application/json

schema for import and export of test cases

testTargetId
string<uuid>
required
description
string
required
elements
object[]
required
entryPointUrlPath
string | null
type
enum<string> | null
Available options:
LOGIN,
COOKIE_BANNER,
LINK,
TEARDOWN
dependencyId
string<uuid>
teardownId
string<uuid>
tags
string[]

Response

Test case imported successfully

message
string
required
success
boolean
required
testCaseId
string<uuid>
required