Documentation
Test Generation

AI-Powered Test Generation

Learn how AegisRunner uses AI to automatically generate comprehensive test suites from your crawl data.

AI Test Generation

AegisRunner uses artificial intelligence to automatically generate comprehensive test suites from your crawl data. This feature dramatically reduces the time needed to create end-to-end tests.

Availability: AI test generation is available on Starter ($9/mo) plans and above. Free plan users can create test suites manually.

How It Works

1
Crawl Analysis

The AI analyzes pages discovered during your crawl, including DOM structure, interactive elements, and forms.

2
Interaction Mapping

It identifies clickable elements, form inputs, navigation patterns, and user interaction points.

3
Test Generation

Based on the analysis, the AI creates test cases that verify page loads, form submissions, navigation, and assertions.

4
Suite Creation

Tests are organized into logical suites grouped by page or functionality.

What Gets Tested

AI-generated tests typically include:

Page Tests

  • Page loads successfully (status 200)
  • Title matches expected value
  • Key elements are visible
  • No JavaScript console errors
  • Page loads within acceptable time

Navigation Tests

  • Links navigate to correct destinations
  • Menu items work correctly
  • Breadcrumbs function properly
  • Back/forward navigation works

Form Tests

  • Forms accept valid input
  • Form validation triggers on invalid input
  • Submit buttons are clickable
  • Success/error messages appear appropriately

Interactive Element Tests

  • Buttons respond to clicks
  • Dropdowns expand and collapse
  • Modals open and close
  • Tabs switch content correctly

Viewing Generated Suites

After a crawl completes, find your generated suites:

  1. Navigate to Test Suites
  2. Use the Filter by Crawl dropdown
  3. Select the crawl session
  4. View all suites generated from that crawl

Test Suite Actions

For each generated suite, you can:

Action Description
Run Execute the test suite in a selected browser
Edit Modify test steps, assertions, and settings
Export Playwright Download as Playwright test code
Delete Remove the test suite

Using Test Variables

AI-generated tests can use variables for dynamic data. Define variables in Test Data → Test Variables.

Variables use the {{variableName}} syntax:

// Example usage in tests
Fill input#email with {{testEmail}}
Fill input#password with {{testPassword}}
Click button[type="submit"]

This allows you to:

  • Run tests with different data sets
  • Keep sensitive data out of test code
  • Easily update test data without editing tests

Improving Generated Tests

AI-generated tests are a great starting point, but you may want to enhance them:

Enhancement Tips:
  • Add custom assertions for business logic
  • Include wait conditions for async operations
  • Add data-driven scenarios using variables
  • Create user flow tests for multi-page journeys
  • Remove or modify tests that aren't applicable

Regenerating Tests

If you've made significant changes to your website:

  1. Run a new crawl
  2. New test suites will be generated
  3. Compare with previous suites
  4. Keep tests that are still valid
  5. Delete outdated tests

Custom Test Suite Creation

In addition to AI generation, you can create custom suites:

  1. Click + New Suite in Test Suites
  2. Choose from:
    • New Suite - Create from scratch
    • User Flow - Multi-page user journey
    • Merge Suites - Combine existing suites
  3. Define test steps and assertions
  4. Save and run

Best Practices

AI Test Generation Tips:
  • Crawl with form filling enabled to generate form tests
  • Use a comprehensive crawl (higher max pages) for better coverage
  • Review generated tests and remove irrelevant ones
  • Add custom tests for critical business flows
  • Set up test variables for dynamic data like usernames/passwords
  • Re-crawl after major site updates to regenerate tests

Related Documentation

API Test Generation

When your crawl data includes API endpoints (from form submissions, AJAX requests, or network traffic), the AI can generate api-request test steps:

  • Health checks — Verify API endpoints return expected status codes
  • CRUD operations — Test create, read, update, delete flows
  • Response validation — Assert on response body structure and values
  • Performance gates — Set response time thresholds
Tip: Enable HAR recording during crawls to capture API endpoints. The AI uses this data to generate comprehensive API tests alongside UI tests.

See API Testing for details on configuring API test steps.

Need help?

Can't find what you're looking for? Our support team is here to help.