Skip to main content
This endpoint is useful for importing tests from external systems, generating tests from custom logic, or integrating test creation into your CI/CD workflows.

Endpoint

  • Path: POST /projects/{projectUuid}/test-cases
  • Authentication: Bearer token (JWT)
  • Content-Type: application/json

Authentication

The Create Test Case API uses Bearer token authentication. Include your project’s API token in the Authorization header:
Authorization: Bearer YOUR_API_TOKEN
You can obtain your project’s API token from the QA.tech dashboard in Settings → Integrations → API.

Finding Your Project UUID

Your project UUID is required in the URL path. For detailed instructions on locating your project UUID, see Finding Your Project UUID.

Path Parameters

ParameterTypeRequired
projectUuidstring (UUID)Yes

Request Body

The request body must be a JSON object with the following fields:

Required Fields

FieldTypeDescription
namestringTest case name (1-80 characters)
goalstringThe goal/objective of the test case
applicationIdstring (UUID)The UUID of the application this test belongs to

Optional Fields

FieldTypeDescription
expectedResultstringExpected result description
configIdsarray of UUIDsArray of configuration IDs (e.g., login credentials, API keys)
scenarioIdstring (UUID)Scenario ID if grouping tests into scenarios
resumeFromDependencyProjectTestCaseIdstring (UUID)ID of a test case to resume browser state from (Resume From dependency)
waitForDependenciesProjectTestCaseIdsarray of UUIDsArray of test case IDs that must complete before this test runs (Wait For dependencies)
All ID fields (applicationId, configIds, scenarioId, and dependency IDs) require full UUIDs, not short IDs.

Response Format

Success Response (200)

{
  "success": true,
  "testCase": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "Login Test",
    "url": "https://app.qa.tech/p/project_slug/test-cases/550e8400-e29b-41d4-a716-446655440000/edit"
  }
}
The test case is created with generationStatus: 'GENERATING' and automatically undergoes a “burn-in” process to generate test steps based on your goal.
Test cases created via API are disabled by default (isEnabled: false). Enable them in the QA.tech UI before they run in test plans. The createdBy field is automatically set to the QA.tech system user.

Error Responses

Status CodeDescription
400Bad request - Invalid request data, validation errors, or invalid IDs for this project
401Unauthorized - Invalid or missing API token
403Forbidden - Organization is suspended or access denied
404Not Found - Project not found
500Internal Server Error - Server error during test creation

Example Requests

Basic Test Case Creation

curl -X POST https://app.qa.tech/api/projects/YOUR_PROJECT_UUID/test-cases \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
    "name": "Login Test",
    "goal": "Verify that users can log in successfully with valid credentials",
    "expectedResult": "User should be redirected to dashboard after successful login",
    "applicationId": "550e8400-e29b-41d4-a716-446655440000"
  }'

Test Case with Configurations

curl -X POST https://app.qa.tech/api/projects/YOUR_PROJECT_UUID/test-cases \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
    "name": "Checkout Flow Test",
    "goal": "Complete a purchase from cart to order confirmation",
    "applicationId": "550e8400-e29b-41d4-a716-446655440000",
    "configIds": [
      "config-uuid-1",
      "config-uuid-2"
    ]
  }'

Test Case with Resume From Dependency

curl -X POST https://app.qa.tech/api/projects/YOUR_PROJECT_UUID/test-cases \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
    "name": "Update Profile Test",
    "goal": "Update user profile information",
    "applicationId": "550e8400-e29b-41d4-a716-446655440000",
    "resumeFromDependencyProjectTestCaseId": "login-test-case-uuid"
  }'
This creates a test that will resume browser state from the login test, skipping the need to log in again.

Test Case with Wait For Dependencies

curl -X POST https://app.qa.tech/api/projects/YOUR_PROJECT_UUID/test-cases \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
    "name": "Final Verification Test",
    "goal": "Verify all setup steps completed successfully",
    "applicationId": "550e8400-e29b-41d4-a716-446655440000",
    "waitForDependenciesProjectTestCaseIds": [
      "setup-test-1-uuid",
      "setup-test-2-uuid"
    ]
  }'
This test will wait for both setup tests to complete before starting execution.