How to Discover Your Web App
Use Discovery to automatically crawl your application, find pages, detect user flows, and identify UI patterns.
What You’ll Accomplish
By the end of this guide, you’ll have:
- Discovered all pages in your application
- Identified user flows (login, signup, etc.)
- Found UI patterns (forms, tables, modals)
- Captured screenshots of every page
- Generated test cases from discovered flows (optional)
Prerequisites
- A BugBrain account and project
- The base URL of your application
- (Optional) A Persona for authenticated areas
Starting a Discovery Session
Monitoring Discovery Progress
While Discovery runs, you’ll see:
Real-Time Updates:
- Pages discovered so far
- Current page being crawled
- Flows detected
- Patterns identified
Progress Indicators:
- Percentage complete
- Estimated time remaining
- Pages per minute rate
Controls:
- Pause - Temporarily stop crawling
- Resume - Continue a paused crawl
- Cancel - Stop and keep what’s been discovered
Crawl Duration: A typical crawl of 50 pages with depth 3 takes 5-10 minutes, depending on page load times and complexity.
Understanding Discovery Results
Pages Discovered
Each discovered page includes:
- URL and Title
- HTTP Status (200, 404, 500, etc.)
- Screenshot
- Elements Found (forms, buttons, links, inputs)
- Load Time
Flows Detected
Discovery automatically identifies these flow types:
| Flow Type | Example |
|---|---|
| Authentication | Login, logout, signup, password reset |
| CRUD Operations | Create, read, update, delete workflows |
| Search | Search forms and results pages |
| Navigation | Site navigation patterns |
| Checkout | E-commerce purchase flows |
| Onboarding | New user orientation flows |
UI Patterns
Identified patterns include:
- Forms - Input fields, dropdowns, submissions
- Tables - Data grids and lists
- Modals - Dialogs and popups
- Navigation - Menus, breadcrumbs, footers
- Cards - Content cards and tiles
Discovering Authenticated Areas
To crawl pages behind login:
- Create a Persona with valid credentials
- Select it when starting discovery
- Discovery will automatically log in using those credentials
- Protected pages will be discovered
Configuring Discovery Settings
Max Depth
Controls how many levels deep to crawl:
Depth 1: Homepage only
Depth 2: Homepage + all linked pages
Depth 3: Homepage + linked pages + their linked pagesRecommendation: Start with depth 3, increase to 5 for comprehensive coverage.
Max Pages
Limits total pages discovered:
- 50 pages - Quick initial discovery
- 100-200 pages - Medium-sized applications
- 500+ pages - Large applications and comprehensive crawls
Include/Exclude Patterns
Control which URLs to crawl:
Include patterns:
/products/*
/blog/*
/docs/*Exclude patterns:
/admin/* # Skip admin pages
/api/* # Skip API endpoints
/cdn/* # Skip CDN resources
/logout # Avoid logging out during crawl
**/delete/** # Avoid destructive actionsImportant: Always exclude URLs that perform destructive actions (delete, logout, etc.) to avoid unintended consequences during discovery.
Generating Tests from Discovery
After discovery completes, you can:
1. Generate Test Cases
Convert discovered flows into test cases:
- Review the discovered flows
- Select flows you want as tests
- Click ‘Generate Tests’
- AI creates test cases based on the flow steps
- Review and save generated tests
2. Generate Documentation
Create documentation about your app structure:
- Click ‘Generate Knowledge Doc’
- AI analyzes discovery results
- Generates comprehensive documentation including:
- Application structure overview
- Flow descriptions
- UI pattern inventory
- Page relationships
3. Export Results
Export discovery data:
- JSON - Machine-readable format
- CSV - Spreadsheet of discovered pages
- PDF - Visual report with screenshots
Comparing Discoveries
Compare two discovery sessions to detect changes:
Change Severity Levels
| Severity | Examples |
|---|---|
| Critical | Broken pages (404, 500), Missing critical flows (login, checkout) |
| Major | Significant UI changes, New error messages, Flow changes |
| Minor | Content updates, Style changes, Small layout adjustments |
Best Practices
1. Start Small Begin with limited depth and pages to understand what will be discovered.
2. Use Exclusions Always exclude admin areas, APIs, external links, and destructive actions.
3. Schedule Regular Crawls Run discovery weekly or before major deployments.
4. Keep a Baseline Maintain a baseline discovery to compare against for regression detection.
5. Generate Tests Don’t just discover - convert findings into automated tests!
6. Review Results Take time to review discovered pages and flows - you might find areas you didn’t know existed.
Troubleshooting
Discovery is stuck?
- Check if a page is taking too long to load
- Pause and review progress so far
- Exclude the problematic URL and resume
Not finding authenticated pages?
- Verify the Persona credentials are correct
- Check if the login flow is working
- Ensure cookies are being preserved during crawl
Too many pages discovered?
- Reduce Max Depth
- Lower Max Pages limit
- Add more exclusion patterns
- Be more specific with include patterns
No flows detected?
- Try increasing Max Depth to discover more pages
- Ensure forms and buttons are being found
- Check if JavaScript-heavy pages are loading properly
Next Steps
- Generate tests from flows
- Create Personas for authenticated discovery
- Set up CI/CD integration to run discovery on deployment
- View discovery analytics