Skip to main content

Root Level Fields

name

An optional string that provides a human-readable name for the test suite. If not specified, Testpilot will derive the name from the filename.

login_url

An optional URL that specifies the login page for the application under test. When specified, Testpilot will perform authentication before running test cases.

context

An optional array of context objects that provide additional information to all test cases in the plan. This context is inherited by all test cases and can be used to provide background information or setup details.

cases

An array of test case objects that define the individual tests to be executed. Each test case represents a specific scenario or user journey to validate.

Test Case Fields

Each test case in the cases array supports the following fields:

id (required)

A unique identifier for the test case. This ID is used internally by Testpilot to track and reference test cases.

name (required)

A human-readable name for the test case that describes what the test validates.

description (required)

A detailed description of what the test case does and what it validates. This helps with test documentation and debugging.

steps (required)

An array of strings that describe the steps to be performed during the test. Each step represents an action or validation that should be performed.

url

The URL where the test case should begin execution. This is the starting point for the test.

viewports

An array of viewport configurations that define the screen sizes at which the test should be executed. This is useful for responsive testing across different device sizes.
Each viewport object contains:
  • name: A descriptive name for the viewport
  • size: An array of two integers representing width and height in pixels

context

Test case-specific context that provides additional information for this particular test. This is merged with any root-level context.

headers

Custom HTTP headers to include in all browser requests for this test case. The browser sends these headers with every request made during test execution.
Important: custom headers are only supported for web testing with Playwright. They’re currently not available when testing mobile applications on Android or iOS platforms.

platform_config

Configuration for testing on different platforms (web, mobile, etc.). This allows you to specify different entry points for different platforms.
The platform configuration includes:
  • url: The web URL for browser-based testing
  • android_pkg: The Android package name for mobile app testing
  • ios_bundle: The iOS bundle identifier for mobile app testing

Context Objects

Context objects provide additional information that can be used by Testpilot during test execution. Currently, only text-based context is supported.
Each context object contains:
  • text: A string containing contextual information

File Formats

Testpilot supports multiple file formats for pilot files:

TOML Format

JSON Format

File Naming Conventions

Testpilot recognizes pilot files with the following naming patterns:
  • *.pilot - Basic pilot file
  • *.pilot.yaml - YAML format pilot file
  • *.pilot.yml - YAML format pilot file (alternative extension)
  • *.pilot.toml - TOML format pilot file
  • *.pilot.json - JSON format pilot file

Remote Files

Testpilot can load pilot files from remote URLs, including GitHub repositories. When using GitHub URLs, you can optionally set the GITHUB_TOKEN environment variable for authentication.

Example: E-commerce Testing Suite

Here’s a complete example of a pilot file for testing an e-commerce application:
This example demonstrates:
  • Root-level configuration with name, login URL, and context
  • Multiple test cases with different purposes
  • Cross-platform testing configuration
  • Responsive testing with multiple viewports
  • Test-specific context and configuration
  • Custom HTTP headers for API integration testing