---
title: "Create test"
method: POST
path: "/tests"
---

# Create test

`POST /tests`

Create a new test case with natural-language commands.

## Request body

- Create
  - `commands` string[], required — Natural-language commands that make up the test case.
  - `autoGenerate` boolean — Whether creating this test should automatically trigger MobileBoost to write and verify its automation code. Defaults to true; pass false to skip automatic generation.
  - `title` string — Human-readable title of the test.
  - `tags` string[] — Tags used to group or filter tests.
  - `preRequests` PreRequest[] — HTTP requests executed before the test runs (e.g. to seed state or fetch tokens).
    - `curlCommand` string — The cURL command to execute before the test runs.
    - `delayBeforeRequest` integer — Delay in milliseconds to wait before issuing the request.
    - `valuesToRemember` string[] — JSON paths (or identifiers) of values from the response to remember for later use in the test.
  - `launchParams` LaunchParam[] — Key/value pairs passed to the test at launch.
    - `key` string, required — Launch parameter name.
    - `value` string, required — Launch parameter value.
  - `testInputs` TestInput[] — Named inputs referenced by the test commands, with default values.
    - `key` string, required — Input identifier referenced by the test commands.
    - `defaultValue` string, required — Default value used when no override is supplied at execution time.
  - `teardownRequests` TearDownRequest[] — HTTP requests executed after the test finishes (e.g. to clean up state).
    - `curlCommand` string — The cURL command to execute after the test finishes.
  - `folderId` string — File the new test into this folder. Omit it and the test is unfiled. `GET /tests/folders` has the ids.

## Response `200`

Successful response

- object
  - `testId` string — The unique identifier of the created test

---

[API](https://skmtc.dev/mobileboost/apis/mobileboost-api.md) · [All operations](https://skmtc.dev/mobileboost/apis/mobileboost-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/mobileboost/mobileboost-api/revisions/005e59399710/schema)
