Test Data Management
Learn how to configure test data for form filling, environment tokens, and custom headers.
Test Data Management
Effective test data management is essential for reliable automated testing. AegisRunner provides comprehensive tools to configure form data, environment settings, and test variables.
Accessing Test Data
Navigate to Test Data in the sidebar, or use the Test Data quick action on your Dashboard.
The Test Data page has four tabs:
- Detected Forms - Forms discovered during crawls
- Data - Test data sets and schemas
- Test Environment Configuration - Tokens, cookies, and headers
- Test Variables - Variables for AI-generated tests
Detected Forms
When you crawl your website with form detection enabled, AegisRunner captures all discovered forms.
Form Information
For each detected form:
- Form Name/ID - Identifier for the form
- Page URL - Where the form was found
- Fields - List of input fields with types
- Action - Form submission URL
- Method - GET or POST
Grouping by Crawl Session
Forms are grouped by the crawl session in which they were discovered. Use the dropdown to filter by crawl.
Configuring Form Data
Click on a form to configure test data for each field:
Click on a detected form to open configuration.
Enter test values for each form field.
Save your test data configuration.
Data Sets
The Data tab shows test data sets with schema previews. You can:
- Create reusable data sets for testing
- Preview data schema structure
- Edit and update data values
- Delete unused data sets
Test Environment Configuration
The Test Environment Configuration tab provides three configuration options:
Environment Tokens
Set API keys and bypass tokens for authenticated testing:
| Field | Description | Example |
|---|---|---|
| Name | Token identifier | API_KEY |
| Value | Token value | sk_test_abc123... |
| Type | Where to use | Header, Query, Cookie |
Pre-Authentication Cookies
Inject session cookies to skip login flows:
| Field | Description | Example |
|---|---|---|
| Name | Cookie name | session_id |
| Value | Cookie value | abc123xyz... |
| Domain | Cookie domain | .example.com |
| Path | Cookie path | / |
Custom HTTP Headers
Add headers to every request during testing:
| Field | Description | Example |
|---|---|---|
| Name | Header name | X-Test-Mode |
| Value | Header value | true |
Common use cases:
- Enable test mode in your application
- Bypass rate limiting
- Add debugging headers
- Specify test environment
Test Variables
The Test Variables tab allows you to define variables for use in AI-generated and custom tests.
Variable Syntax
Variables use double curly braces: {{variableName}}
Defining Variables
Click + Add Variable.
Provide a variable name (alphanumeric, no spaces) and value.
Save the variable for use in tests.
Common Variables
| Variable | Purpose | Example Value |
|---|---|---|
{{testEmail}} |
Test user email | test@example.com |
{{testPassword}} |
Test user password | SecurePass123! |
{{testName}} |
Test user name | Test User |
{{testPhone}} |
Test phone number | +1-555-0100 |
{{testAddress}} |
Test address | 123 Test Street |
{{testCardNumber}} |
Test payment card | 4242424242424242 |
Using Variables in Tests
// In test steps
Fill input#email with {{testEmail}}
Fill input#password with {{testPassword}}
Click button[type="submit"]
Assert: Welcome, {{testName}} is visible
Best Practices
- Use dedicated test accounts, not production credentials
- Create test data that won't interfere with real users
- Use unique identifiers (timestamps, random strings) for test data
- Regularly refresh pre-auth cookies as they expire
- Keep sensitive values encrypted and never log them
- Document what each variable is used for
- Clean up test data in your application periodically
Environment-Specific Data
Consider creating different test data configurations for:
- Development - Local development testing
- Staging - Pre-production testing
- Production - Smoke tests on live site
Related Documentation
- Starting a New Crawl - Detect forms during crawling
- AI Test Generation - Use variables in generated tests
- User Flow Tests - Use variables in flows
- Debugging Tests - Fix data-related issues