# Load from GitHub
testpilot run https://github.com/user/repo/raw/main/tests/pilot.yaml
```

## Example: E-commerce Testing Suite[​](#example-e-commerce-testing-suite "Direct link to Example: E-commerce Testing Suite")

Here's a complete example of a pilot file for testing an e-commerce application:

```yaml theme={null}
name: "E-commerce Application Tests"
login_url: "https://shop.example.com/login"
context:
  - text: "Tests assume a clean database with sample products"
  - text: "Payment gateway is in test mode"
cases:
  - id: "product-search-001"
    name: "Product Search"
    description: "Verify users can search for products and view results"
    url: "https://shop.example.com"
    viewports:
      - name: "Desktop"
        size: [1920, 1080]
      - name: "Mobile"
        size: [375, 667]
    steps:
      - "Navigate to the homepage"
      - "Enter 'laptop' in the search box"
      - "Click the search button"
      - "Verify search results are displayed"
      - "Verify at least 3 products are shown"
    context:
      - text: "Search should return products from the electronics category"
  - id: "checkout-001"
    name: "Complete Checkout Process"
    description: "Test the full checkout flow from cart to payment"
    url: "https://shop.example.com/cart"
    steps:
      - "Add a product to cart"
      - "Navigate to checkout"
      - "Fill in shipping information"
      - "Select payment method"
      - "Complete purchase"
      - "Verify order confirmation"
    context:
      - text: "User must be logged in to complete checkout"
      - text: "Use test credit card: 4111111111111111"
  - id: "mobile-app-001"
    name: "Mobile App Login"
    description: "Test login functionality in mobile application"
    platform_config:
      url: "https://shop.example.com/mobile"
      android_pkg: "com.example.shop"
      ios_bundle: "com.example.Shop"
    steps:
      - "Launch the mobile application"
      - "Tap on login button"
      - "Enter valid credentials"
      - "Verify successful login"
    viewports:
      - name: "Mobile"
        size: [375, 667]
  - id: "api-integration-001"
    name: "Test API Integration"
    description: "Verify custom headers are sent correctly with requests"
    url: "https://shop.example.com/api-test"
    headers:
      X-Shop-Client: "testpilot"
      X-Test-Environment: "staging"
      Authorization: "Bearer test-token-123"
    steps:
      - "Navigate to the API integration test page"
      - "Verify custom headers are displayed in the response"
      - "Check that authentication header was processed correctly"
```

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