Skip to main content

Prerequisites

First, go to the test suites page to create a test suite that the test will belong to.

Creating a Test

To get started with writing a test on Docket, you should:
  1. Navigate to the tests tab on the left
  2. Click “Create New Test”
  3. Enter a title, select a test suite, and provide an entrypoint URL (the starting point for your test)
  4. Click “Launch Browser”
Screenshot 2025-07-17 at 4.03.12 PM.png The URL you provide will be where the Docket Browser agent automatically navigates to begin executing your test.

Building Your Test

To create tests on Docket, you can simply interact in the remote browser and Docket will record actions alongside English annotations automatically. There are three types of steps you can write on Docket:
  1. Cached Steps - Precise coordinate-based actions that replay exactly as recorded
  2. AI Steps - Natural language instructions that adapt to your UI dynamically
  3. API Steps - Network requests to endpoints for seeding, setup, and teardown of test resources
Learn more about each step type to understand when to use them.

API Steps

API steps allow you to make network requests to any endpoint during your test execution. These steps are particularly useful for:
  • Test Setup: Creating test data, user accounts, or resources before the main test flow
  • Test Seeding: Populating databases or systems with necessary data
  • Test Teardown: Cleaning up resources after test completion
API steps support all HTTP methods (GET, POST, PUT, DELETE, PATCH, etc.) and pass when they receive a 2xx response status code. This makes them ideal for integrating with your application’s backend APIs to prepare the testing environment or verify system state.

Test Variables

Docket supports two types of variables that can be used to make your tests more dynamic and reusable. Variables can be created in the Variables tab of the test and inserted into your test instructions by pressing the @ key while writing. Screenshot 2025-07-17 at 4.18.22 PM.png

Text Variables

Text variables are simple placeholders that get replaced with their configured values when your test runs. They’re ideal for making tests flexible and reusable across different environments or scenarios. Common use cases:
  • Credentials: Usernames and passwords when not using the accounts feature
  • Test data: Product names, user IDs, or any values that you might want to change often
Example usage:
Log in with username @test_username and password @test_password.
Search for @product_name and add it to the cart.

Email Variables

Email variables are more sophisticated and generate a unique mailbox for each test run using plus addressing. This creates a dedicated email address that the agent can monitor during that specific test execution. Key features of email variables:
  • Unique per run: Each test execution gets its own email address (e.g., baseaddress+unique123@domain.com)
  • Agent accessibility: The agent can only check emails sent to this specific unique address during the test run
  • Full address reference: You can reference the complete generated email address in your instructions when you need to input it into forms
Example usage:
Register a new account using @registration_email as the email address. 
After registering, get the confirmation code from the email and use it to confirm your account
In this example, @registration_email would be replaced with the unique email address generated for that test run, and the agent would monitor only that specific mailbox for incoming emails.

Random Alphanumeric Variables

Random alphanumeric variables generate unique random strings (letters and numbers) for each test run. You can set the length and toggle between uppercase/lowercase letters. Perfect for unique usernames, product IDs, or any data that needs to be different every time. Example usage:
Register a new account with username @random_username and create a product named @random_product_id.

Using Variables in Instructions

To insert variables while writing test steps: just reference the variable using “@variable_name” and Docket will auto-populate it during runtime. Variables make your tests more maintainable and allow you to easily run the same test logic with different data across multiple environments or scenarios.
Learn more: For detailed guidance on writing assertions and understanding AI steps, see the AI Steps documentation.

Advanced Test Configuration

Configure additional settings to fine-tune your test execution behavior. Advanced Test Configuration

Browser Zoom Level

Control the browser’s zoom level (equivalent to Ctrl +/- in Chromium). Useful for testing responsive design and accessibility. Options: 50%, 75%, 100% (default), 125%, 150%, 200%

Test Retries

Configure automatic retries when a test fails. Docket will re-run the entire test from the beginning. Options: No retries (default), 1-3 retries

Test Status

  • Active (default): Test runs in all scenarios
  • Paused: Test is excluded from scheduled runs, CI/CD, and group executions

Two-Factor Authentication (2FA)

Store TOTP secrets for automated 2FA during testing. Enter the secret key from your authenticator app setup, and Docket will automatically generate codes when prompted.