Skip to content

Phase Discovery

BrowseGenius transforms five key screens into a comprehensive evaluation with testable phases. This page explains how screen capture works, what the LLM sees, and how to guide it toward accurate phase identification.

Capture overlay

  • The popup controls capture. Each click of Capture screen:
    • Triggers chrome.tabs.captureVisibleTab to save a PNG snapshot.
    • Calls the content script to serialize a DOM snapshot with semantic annotations.
    • Stores URL, title, timestamp, notes, and DOM in the testPlanner store.
  • Captures are capped at five to keep prompts short and targeted. The most recent five are retained automatically.

Notes & metadata

LLM prompts include:

  • URL and document title.
  • Analyst notes you enter per screen.
  • A templatized DOM tree that highlights interactive elements, labeled inputs, roles, and relevant text.

Tips for better output:

  • Mention critical data setup: e.g., "user with unpaid invoice", "sandbox mode"
  • Flag risky workflows: "delete customer", "bulk import"
  • Add references to expected integrations: "stripe webhook appears", "email should trigger"

GPT-4 prompt structure

The DiscoveryService composes a JSON-focused instruction:

  1. System message identifies BrowseGenius as an elite QA manager.
  2. User message includes each captured screen block with DOM markup.
  3. The model must respond with discovered phases and test cases per phase:
    • appOverview - Application description
    • userActors - User roles (Guest, Registered, Admin, etc.)
    • phases - Array of navigation phases with:
      • phaseName - Name of the navigation section (Dashboard, Settings, etc.)
      • description - What this phase represents
      • priority (P0/P1/P2)
      • selected - Whether phase is selected for testing
      • Up to 10 testCases per phase containing:
        • title
        • narrative
        • priority (P0/P1/P2)
        • An ordered array of { action, expectation } steps

Automatic safeguards:

  • Empty or malformed responses bubble a clear error.
  • Phases with zero test cases are discarded.
  • The planner provides actionable toasts for missing keys or low context.

Editing and regenerating

  • Remove individual captures to declutter context.
  • Update notes inline by selecting the pencil icon.
  • Regenerate the discovery after modifying captures or notes. Each regeneration resets phase selection and test cases while preserving your capture set.

Quality heuristics

Consider capturing a balanced mix of:

  1. Authentication or onboarding screens.
  2. High-value dashboards with navigation menus.
  3. Settings or configuration pages.
  4. User management or admin panels.
  5. Core feature sections (e.g., Projects, Tasks, Reports).

The more diverse your five screens, the more accurately AI can identify distinct navigation phases.

Phase-Based Organization

Phases represent navigation sections of your application:

  • Dashboard: Main overview and home screen
  • Settings: Configuration and preferences
  • User Management: User, roles, permissions
  • Profile: User profile and account settings
  • Reports: Analytics and reporting sections

Each phase can contain up to 10 test cases that validate functionality within that section.

Released under the MIT License.