Tests

Update project test

Updates a test or component.

PUT /api/public/v1/tests/{testId}

Update project test

curl --request PUT \
  --url 'https://api.buildprint.ai/api/public/v1/tests/{TESTID}' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
  "key": "value"
}'
{
  "ok": true
}

Test updated

Authorizations

  • Authorization string required header

    Workspace REST API token prefixed with bp_

Path Parameters

  • testId string required

    Test ID.

Request Body

application/json
  • name string required

    Name of the test or reusable component.

  • description string | null

    Optional description.

  • isComponent boolean required

    Whether the test definition is reusable as a component step in other tests.

  • viewportPreset string enum | null

    Optional viewport preset for runnable tests.

  • liveTestUserId string | null

    Optional test user assigned to live runs.

  • testVersionTestUserId string | null

    Optional test user assigned to test-version runs.

  • steps[] oneOf required array

    Ordered steps for the test.

    + Show Child Attributes
    • oneOf options 2 variants oneOf

      Exactly one option applies.

      + Show Child Attributes
      • option 1 object
        + Show Child Attributes
        • kind string required

          Marks this entry as a direct executable step.

        • instruction string required

          Instruction the agent should carry out.

        • details string | null

          Optional extra detail to provide more context for the instruction.

        • onFailure string enum required enum

          Whether the run should stop or continue if this step fails. Allowed values: stop, continue.

      • option 2 object
        + Show Child Attributes
        • kind string required

          Marks this entry as a reusable component reference.

        • componentId string required

          Project test component identifier to expand.

        • onFailure string enum enum

          Whether the run should stop or continue if the component fails. Allowed values: stop, continue.

Response

application/json
  • ok boolean

    Always true for a successful mutation response.