What is Context?
Context in Testpilot is additional information that helps the AI better understand:- How your application works
- Special requirements or conditions for tests
- Expected behaviors or edge cases
- Login credentials or test data
Adding Context to Your Tests
You can add context at two levels in your pilot files:1. Global Context (Test Suite Level)
Global context applies to all test cases in a file. Add it at the root level of your test file:2. Test-Specific Context (Test Case Level)
Test-specific context applies only to a single test case:Best Practices for Adding Context
Be Specific and Relevant
Add context that directly helps with test execution:Explain UI Components
Describe important UI elements and their behavior:Provide Business Rules
Include relevant business logic or validation rules:Specify Test Environment Details
Include information about your test environment:When to Use Additional Context
Add extra context when:- Your application has unique or complex behaviors that might not be immediately obvious
- Test steps require specific knowledge about the application state or business rules
- Handling error conditions or edge cases that require special treatment