Skip to main content
The Create Test Case API allows you to programmatically create new test cases for your project. Use this endpoint to import tests from external systems, generate tests dynamically based on code analysis or custom logic, or automate test creation as part of your CI/CD workflows. For more examples and integration ideas, see CI/CD Integration.
  • Endpoint: POST /test-cases
  • Authentication: Bearer token
  • Content-Type: application/json
  • Base URL: https://api.qa.tech/v1

Request Body

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

Required Fields

Optional Fields

Short ID fields (applicationShortId, configShortIds, scenarioShortId) use prefixed format (e.g. app_gXeBl2, cfg_xyz789, scenario_abc123). Dependency fields (resumeFromDependencyProjectTestCaseId, waitForDependenciesProjectTestCaseIds) use UUIDs (project test case internal IDs).

Authentication

This endpoint requires Bearer token authentication. The project is inferred from the token. See API Introduction.

Test Dependencies in API

Test cases can depend on other test cases to control execution order and share browser state. Dependencies enable you to build test workflows where tests run in sequence, reuse expensive setup like authentication, and pass data between tests. The API supports two dependency types:
  • Resume From: Continues the browser session from another test, preserving cookies, localStorage, and sessionStorage. Use this for sequential workflows that build on each other (e.g., login → create → edit).
  • Wait For: Waits for other tests to complete before starting, but uses a fresh browser session. Use this when you need execution order and data passing but want isolated browser state.
For detailed information about how dependencies work, execution order, browser isolation, and multi-user testing scenarios, see Test Dependencies.

Resume From Dependency

The resumeFromDependencyProjectTestCaseId field creates a Resume From dependency. This allows your test to resume browser state from a previous test case, effectively continuing the browser session. How it works:
  • The test resumes browser state (cookies, localStorage, sessionStorage) from the dependency test
  • Skips login/setup steps that were already completed
  • Use case: Sequential tests that build on each other (e.g., login test → profile update test → logout test)
Example: A “Update Profile” test can resume from a “Login” test, skipping the login step and starting directly at the profile page.

Wait For Dependencies

The waitForDependenciesProjectTestCaseIds field creates Wait For dependencies. This ensures your test waits for one or more other tests to complete before starting execution. How it works:
  • The test waits for all specified dependency tests to complete successfully (status: COMPLETED, result: PASSED)
  • If any dependency fails, the dependent test will not run
  • Tests can run in parallel, but this test waits for all dependencies to pass
  • Use case: Parallel setup tests, then sequential verification (e.g., setup test A and B run in parallel, verification test C waits for both to pass)
Example: A “Final Verification” test can wait for multiple setup tests to complete before running its checks.

Resume From vs Wait For

You can use both dependency types together. For example, a test can wait for multiple setup tests to complete, then resume browser state from one of them.

Response Format

Success Response (200)

The test case is created with generationStatus: 'GENERATING' and automatically undergoes a burn-in process to generate test steps. During burn-in, QA.tech executes the test against your application to discover and record the steps needed to accomplish your goal. Once burn-in completes, the test steps are saved and the test case status changes to COMPLETED.
Test cases created via API are disabled by default (isEnabled: false). Enable them in the QA.tech UI before they run in test plans.

Error Responses

Example Requests

Basic Test Case Creation

Test Case with Configurations

Test Case with Resume From Dependency

This creates a test that will resume browser state from the login test (UUID of the dependency project test case).

Test Case with Wait For Dependencies

This test will wait for both setup tests to complete successfully before starting execution.

CI/CD Integration

This API endpoint works with any CI/CD system. For platform-specific guides: