FeaturesKnowledge Base

Knowledge Base

Enhance AI test generation accuracy by providing project-specific documentation, business rules, and context.

What is the Knowledge Base?

The Knowledge Base stores project-specific information that helps AI understand:

  • How your application works
  • Business logic and validation rules
  • Common user workflows
  • Domain-specific terminology
  • Technical requirements
  • Edge cases and constraints

When you generate tests with AI, you can select relevant knowledge items to include as context, resulting in more accurate and comprehensive test cases.

Why Use Knowledge Base?

Without Knowledge Base

AI generates tests based only on:

  • Your test description
  • General testing knowledge
  • Basic web patterns

Result: Generic tests that may miss domain-specific logic

With Knowledge Base

AI generates tests informed by:

  • Your specific business rules
  • Actual application workflows
  • Domain expertise
  • Project requirements

Result: Accurate tests that match your application’s unique behavior

Example: For an e-commerce site, adding knowledge about “Orders must have at least one item and shipping address must match billing for new customers” helps AI generate tests that verify these specific rules.

Types of Knowledge Items

Documentation

What: Links to your application documentation

Examples:

  • API documentation URLs
  • User guides
  • Technical specifications
  • Design documents
  • Confluence pages

Usage: AI reads the documentation to understand features

Business Rules

What: Text descriptions of validation logic

Examples:

  • “Email format must be valid@domain.com
  • “Passwords require 8+ characters with mixed case”
  • “Shopping cart maximum is 99 items”
  • “Discounts cannot exceed 50%”

Usage: AI includes these validations in tests

User Workflows

What: Step-by-step descriptions of common flows

Examples:

  • “Users must verify email before accessing premium features”
  • “Checkout requires: cart → shipping → payment → review → confirm”
  • “Password reset sends code to email, valid for 10 minutes”

Usage: AI structures tests to match actual user journeys

Technical Requirements

What: Implementation-specific details

Examples:

  • “Login uses JWT tokens valid for 24 hours”
  • “API rate limit is 100 requests per minute”
  • “Images must be under 5MB”
  • “Usernames are case-insensitive”

Usage: AI includes technical constraints in tests

Edge Cases

What: Special scenarios and limitations

Examples:

  • “Free users limited to 3 projects”
  • “Dates before 1900 are invalid”
  • “Special characters not allowed in usernames”
  • “International phone numbers supported”

Usage: AI creates edge case tests

Creating Knowledge Items

  1. Go to your project
  2. Click “Knowledge Base” in sidebar
  3. Click “New Knowledge Item”
  4. Fill in details:
    • Title: Descriptive name
    • Type: Documentation, Business Rule, Workflow, etc.
    • Content: The knowledge itself (text or URL)
    • Tags: For organization
  5. Click “Save”

Knowledge Item Fields

Title (required)

  • Clear, descriptive name
  • Example: “Password Validation Rules”

Type (required)

  • Documentation
  • Business Rule
  • Workflow
  • Technical Requirement
  • Edge Case

Content (required)

  • Text description or URL
  • Supports markdown formatting
  • Include relevant details

Tags (optional)

  • Organize by feature area
  • Example: “authentication”, “payments”, “api”

Visibility (optional)

  • Project-wide (default)
  • Specific to certain test types

Using Knowledge Base

During AI Test Generation

  1. Start AI test generation
  2. Click “Knowledge Base” section
  3. Select relevant knowledge items
  4. Generate tests

AI uses selected knowledge to:

  • Understand your application better
  • Include domain-specific validations
  • Follow your actual workflows
  • Cover edge cases
  • Use correct terminology
💡

Pro Tip: Select 2-5 most relevant knowledge items. Too many can dilute focus, too few may miss important context.

Automatic Suggestions

BugBrain suggests relevant knowledge:

  • Based on your test description
  • By matching tags
  • Using past generation patterns
  • Popular items for similar tests

Review suggestions and select what’s relevant.

Knowledge Item Management

Editing Knowledge

  1. Go to Knowledge Base
  2. Click on the item
  3. Click “Edit”
  4. Update content
  5. Click “Save”

Changes apply immediately to future test generations

Organizing Knowledge

Use tags effectively:

  • Feature-based: “login”, “payments”, “search”
  • Type-based: “validation”, “api”, “ui”
  • Priority-based: “critical”, “common”, “edge-case”

Create categories:

  • Group related items
  • Use consistent naming
  • Document your organization scheme

Knowledge Usage Tracking

See which knowledge items are most valuable:

  • Usage count: How many times used in generation
  • Last used: When it was last selected
  • Effectiveness: User ratings of resulting tests

Archive unused items to keep Knowledge Base focused.

Best Practices

💡

1. Be Specific “Passwords require 8+ chars, 1 uppercase, 1 number” beats “Passwords must be secure”

2. Keep Updated Update knowledge when requirements change

3. Use Real Examples Include actual values, URLs, and workflows from your app

4. Organize with Tags Consistent tagging makes finding knowledge easy

5. Start Small Add 5-10 key items, expand based on need

6. Review Regularly Monthly review to add, update, or remove items

Example Knowledge Items

Business Rule Example

Title: Email Validation Rules Type: Business Rule Content:

Email addresses must:
- Contain @ symbol
- Have domain with at least one dot
- Be lowercase (system auto-converts)
- Not exceed 255 characters
- Not use disposable email domains (blocked list includes temp-mail.com, guerrillamail.com)

Workflow Example

Title: Standard Checkout Flow Type: Workflow Content:

1. User adds items to cart
2. Clicks "Checkout"
3. Enters/confirms shipping address
4. Selects shipping method
5. Enters payment details
6. Reviews order summary
7. Clicks "Place Order"
8. Sees confirmation with order number
9. Receives confirmation email within 5 minutes

Technical Requirement Example

Title: API Authentication Type: Technical Requirement Content:

All API requests require:
- Bearer token in Authorization header
- Token obtained from POST /auth/login
- Tokens expire after 24 hours
- Refresh tokens valid for 30 days
- 401 response if token invalid/expired

Advanced Features

Knowledge Templates

Create reusable templates: (Pro plan feature)

  1. Create a well-structured knowledge item
  2. Save as template
  3. Use template for similar projects
  4. Customize as needed

Knowledge Sharing

Share across projects: (Pro plan feature)

  1. Mark knowledge as “Organization-wide”
  2. Available to all projects
  3. Central maintenance
  4. Consistent context

Knowledge Validation

Verify knowledge accuracy: (Pro plan feature)

  1. AI checks knowledge against actual app behavior
  2. Flags outdated information
  3. Suggests updates
  4. Maintains accuracy over time

Token Usage

Knowledge items consume AI tokens:

  • Per generation: ~30% of token budget allocated to knowledge
  • Larger items: Use more tokens
  • Multiple items: Token usage adds up

Optimize for token efficiency:

  • Keep items concise but complete
  • Select only relevant items
  • Remove redundant information
  • Use links for extensive documentation

Analytics

Track knowledge effectiveness:

  1. Go to Knowledge Base → Analytics
  2. View metrics:
    • Most used items
    • Test generation success rate with/without knowledge
    • User ratings of generated tests
    • Token usage by item

Optimize based on data:

  • Expand high-value items
  • Archive low-value items
  • Refine frequently-used items

Troubleshooting

AI not using knowledge?

  • Verify items are selected during generation
  • Check knowledge content is clear and specific
  • Ensure knowledge relevant to test description
  • Try more detailed knowledge items

Tests still not accurate?

  • Add more specific business rules
  • Include more workflow details
  • Check if knowledge is up-to-date
  • Provide examples in knowledge

Can’t find knowledge item?

  • Use search in Knowledge Base
  • Check tags and filters
  • Verify not archived
  • Check project scope

Next Steps