Skip to main content

Overview

Context Hub is a centralized repository for documents that help AI features better understand your application. By providing context about your app’s structure, terminology, and behavior, you improve the accuracy and relevance of AI-generated tests, suggestions, and actions.

Why Use Context Hub

AI features work best when they understand your application:
  • Better test generation: AI creates more accurate steps when it knows your app’s structure
  • Improved AI Actions: Context helps AI navigate complex workflows correctly
  • More relevant suggestions: AI Chat provides better recommendations with context
  • Accurate extractions: AI Extract finds the right data with domain knowledge

Adding Documents

Supported Document Types

Context Hub accepts various document formats:
FormatUse Case
Text (.txt)Simple descriptions, notes
Markdown (.md)Structured documentation
PDF (.pdf)Existing product documentation
Word (.docx)Business requirements, specs

What to Include

Application Structure
  • Page hierarchy and navigation flow
  • Main features and functionality
  • User roles and permissions
Domain Knowledge
  • Business terminology and definitions
  • Industry-specific concepts
  • Common workflows and processes
Technical Details
  • API endpoints and data structures
  • Authentication flows
  • Third-party integrations
Testing Guidelines
  • Test data conventions
  • Environment-specific behaviors
  • Known limitations or edge cases

Managing Documents

Uploading Documents

  1. Navigate to Context Hub in the sidebar
  2. Click Add Document
  3. Select or drag files to upload
  4. Add a title and optional description
  5. Click Save

Organizing Documents

  • Title: Give documents descriptive names
  • Description: Add context about the document’s purpose
  • Tags: Categorize documents for easy filtering

Updating Documents

Keep context current as your application evolves:
  1. Select the document to update
  2. Click Edit or Replace
  3. Upload the new version or edit content
  4. Save changes

Removing Documents

Delete outdated or irrelevant documents:
  1. Select the document
  2. Click Delete
  3. Confirm removal

Best Practices

Keep Context Current

  • Update documents when features change
  • Remove outdated information promptly
  • Add new documents for new features

Be Specific

Provide detailed, actionable information: Less helpful:
Our app has a login page.
More helpful:
Login page (/login):
- Email field: input[name="email"]
- Password field: input[name="password"]
- Submit button: button[type="submit"]
- "Forgot password" link redirects to /reset-password
- After successful login, redirects to /dashboard
- Shows error toast for invalid credentials

Include Test Scenarios

Document common testing patterns:
User Registration Flow:
1. Navigate to /register
2. Fill required fields (name, email, password)
3. Password must be 8+ characters with 1 number
4. Submit triggers email verification
5. User cannot login until email verified
6. Verification link expires after 24 hours

Document Edge Cases

Help AI handle special situations:
Edge Cases - Checkout:
- Empty cart shows "Your cart is empty" message
- Out-of-stock items display "Unavailable" badge
- Promo codes are case-insensitive
- Maximum 10 items per order
- Guest checkout available without account

How AI Uses Context

During Test Generation

When you describe a test, AI references context to:
  • Identify correct page URLs
  • Select appropriate locators
  • Understand workflow sequences
  • Apply relevant assertions

During AI Actions

When AI Action executes, it uses context to:
  • Navigate multi-step processes
  • Handle conditional flows
  • Recognize success/failure states
  • Make decisions about next steps

During AI Chat

When you interact with AI Chat, context helps:
  • Provide relevant suggestions
  • Understand domain terminology
  • Reference application-specific features
  • Generate appropriate test steps

Examples

E-commerce Application Context

# E-commerce App Structure

## Pages
- /products - Product listing with filters
- /product/:id - Product detail page
- /cart - Shopping cart
- /checkout - Multi-step checkout
- /orders - Order history

## User Roles
- Guest: Can browse and add to cart
- Member: Can checkout and view orders
- Admin: Can manage products

## Checkout Flow
1. Cart review
2. Shipping address
3. Payment method
4. Order confirmation

## Test Data
- Test card: 4242424242424242
- Test user: [email protected] / TestPass123

SaaS Application Context

# SaaS Dashboard Context

## Authentication
- SSO available for enterprise plans
- 2FA required for admin users
- Session timeout: 30 minutes

## Subscription Tiers
- Free: 3 projects, 100 API calls/month
- Pro: Unlimited projects, 10K API calls/month
- Enterprise: Custom limits

## Key Workflows
- Onboarding: Email verify → Profile setup → First project
- Billing: Settings → Subscription → Payment method

Troubleshooting

AI Not Using Context

If AI features don’t seem to use your context:
  1. Verify documents are uploaded successfully
  2. Check document content is relevant to the test
  3. Ensure documents aren’t too large or complex
  4. Try more specific, focused documents

Context Conflicts

If context contains contradictory information:
  1. Review all documents for conflicts
  2. Remove outdated versions
  3. Consolidate related documents
  4. Use clear versioning in document names

Performance Issues

If Context Hub loads slowly:
  1. Reduce total number of documents
  2. Remove large, unnecessary files
  3. Break large documents into smaller, focused ones
  4. Archive rarely-used documents