Configuration
Directives
Directives are custom instructions that guide the OpenQA agent's behavior and testing focus.
What Are Directives?
Directives are natural language instructions that tell OpenQA:
- What areas to focus on
- What to avoid or skip
- Special testing requirements
- Known issues to watch for
- Business rules to validate
Adding Directives
During Initial Setup
bash
curl -X POST http://localhost:3000/api/saas-config \
-H "Content-Type: application/json" \
-d '{
"name": "My App",
"description": "...",
"url": "https://my-app.com",
"directives": [
"Focus on the checkout flow - it has had bugs before",
"Test with both logged-in and guest users",
"Check that discount codes work correctly"
]
}'Add a Single Directive
bash
curl -X POST http://localhost:3000/api/saas-config/directive \
-H "Content-Type: application/json" \
-d '{"directive": "Pay special attention to the new refund feature"}'Directive Examples
Focus Areas
text
"Focus on the checkout flow - it has had bugs before"
"Prioritize testing the search functionality"
"Pay extra attention to the admin dashboard"
"The payment integration is critical - test thoroughly"User Scenarios
text
"Test with both logged-in and guest users"
"Test as admin, regular user, and anonymous visitor"
"Verify behavior for users with expired subscriptions"
"Test with users who have items in their cart from previous sessions"Business Rules
text
"Discount codes should not stack - verify this"
"Free shipping applies only for orders over $50"
"Users cannot purchase more than 10 of the same item"
"Refunds should only be possible within 30 days"Known Issues
text
"The cart sometimes loses items on page refresh - check this"
"There's a race condition when adding items quickly"
"The search has issues with special characters"
"Session timeout is flaky - test multiple times"Security Focus
text
"Test for SQL injection on all form inputs"
"Verify that users cannot access other users' data"
"Check that API endpoints require authentication"
"Test for XSS in user-generated content areas"Exclusions
text
"Skip testing the legacy admin panel - it's being deprecated"
"Don't test the /internal routes - they're for internal use only"
"Ignore the beta features section for now"Best Practices
✅ Be Specific
"Test the checkout with Visa, Mastercard, and American Express" is better than "Test payments"
✅ Explain Why
"Focus on checkout - we had 3 bugs there last month" helps the agent prioritize
✅ Include Edge Cases
"Test with empty cart, single item, and 100+ items" covers more scenarios
❌ Avoid Vague Instructions
"Test everything thoroughly" doesn't give actionable guidance
View Current Directives
bash
curl http://localhost:3000/api/saas-config | jq '.directives'
# Response:
[
"Focus on the checkout flow - it has had bugs before",
"Test with both logged-in and guest users",
"Check that discount codes work correctly"
]