Skip to main content

Step 1: Write a Simple Test

Testpilot runs tests that are written in a pilotplan format. For this example we’ll use YAML, but Testpilot can also recognize pilot files written in TOML or JSON: Here is a simple test that will go to Hacker News, search for a topic, and click the first result. Copy these contents to a yaml file titled example-hn-search.pilot.yaml.
Tests are provided to Testpilot as a list of cases, where each case executres one or more steps. When Testpilot executes a test case, it opens the url of the test case in a new browser or device context, and begins executing the steps.

Step 2: Running your Test

You can run your test files using testpilot test <path_to_file>. Testpilot runs your tests in headless mode by default, but you can use --show-browser to watch what Testpilot is doing live:
Testpilot will launch the browser and begin executing your testplan live. You can view the LLM’s actions and reasoning in your terminal:

Step 3: Viewing your Test Results

Once your test is finished, a static HTML report with the results, screenshots, and video of the test will be written to testpilot-out. You can view the results by opening the index.html at the root of the folder:
Test Output Example