Testing your appEnvironments and test data

Environments and test data

Configure targets, reusable values, and secrets for repeatable tests.

Use environments to distinguish staging, previews, and production. Keep reusable test values separate from credentials.

Create an environment

  1. Open Project setup → Environments.
  2. Create an environment with a descriptive name and its base URL.
  3. Add non-secret variables such as a feature flag or test tenant name.
  4. Set a default if it should be the project's usual target.
  5. Select the intended environment when configuring a run.

Variables in this form are plain-text configuration visible to project members. Store passwords and tokens under Variables and secrets, using the secret option.

Prepare test data

Open Project setup → Test data to manage reusable values and form datasets. Supply data that satisfies your app's requirements: a valid account, required fields, and records the test user is allowed to access.

For tests that create records, use disposable values and a repeatable cleanup process in your test environment. Existing records, duplicate identifiers, and missing permissions can change a test's outcome.

Keep comparisons meaningful

Use the same environment, account role, and data assumptions when comparing runs. If an environment changes, inspect those differences before treating a new failure as a regression.

For API-triggered runs, environmentId and testDataSetId must belong to the same project as the CI token. See API overview.

For CSV examples and repeated form execution, follow Data-driven testing.