Application knowledge graph
How BugBrain builds a graph of your app — AppState nodes for pages and AppAction edges for transitions — using a bounded, entropy-weighted crawl that powers test generation, risk-based selection, and coverage.
To test an app the way a careful user would, BugBrain first needs a mental model of it: what pages exist, how you move between them, and what each screen is for. BugBrain builds and keeps that model as an application knowledge graph — a living map that grows as your app is explored and gets reused on every future run.
Nodes and edges#
The graph is made of two simple pieces:
- AppState nodes represent the pages and screens of your app — the home page, a product listing, a checkout step, an admin dashboard. Each node captures what that screen is and what you can do on it.
- AppAction edges represent the transitions between states — clicking a button, submitting a form, following a link. An edge says "from this screen, doing this action takes you to that screen."
Put together, the nodes and edges form a map of your app's reachable surface area: every place a user can get to, and every way to get there. This is the territory the AI agents work from when they plan and run tests.
How the map gets built#
An explorer discovers the graph by crawling your app, but it does so deliberately rather than wandering forever:
- It uses a bounded breadth-first crawl — it explores broadly, layer by layer, and stops at a hard cap (for example, no more than around 100 states in a single session). This guarantees a run finishes in predictable time and cost.
- It chooses where to go next with entropy-weighted selection: unexplored or surprising states score higher than ones it has already seen. In plain terms, the crawl is naturally curious — it spends its budget reaching new territory instead of circling familiar screens.
- When it reaches a brand-new state, the AI model labels it once — giving it a meaningful name and understanding what the screen is for — and that label is reused from then on. Labeling each state a single time keeps cost low and keeps the map stable from run to run.
The explorer's job is specifically to fill the gaps — to reach corners of the app that ordinary test recording wouldn't otherwise cover.
Why the graph matters#
The knowledge graph is not a side artifact; it's the foundation that several BugBrain features stand on:
- Test generation — BugBrain can turn real paths through the graph (from a starting screen to a meaningful end state) into test cases, so the tests reflect how your app is actually wired together.
- Risk-based selection — when code changes, BugBrain can map the change to the states it affects and run only the tests that visit those states, instead of re-running everything.
- Coverage — because the graph knows every reachable state, it can show you which parts of your app have been exercised and which haven't, surfacing blind spots.
As your app is explored more, the map gets richer and these decisions get sharper. The graph is what makes BugBrain's testing feel like it actually knows your application rather than poking at it blindly.
The map keeps the AI grounded
Because the agent reasons over a concrete map of your app rather than guessing from scratch each time, runs are more focused and repeatable — and you can see exactly which screens were and weren't reached.
Related#
Frequently asked questions
What is the application knowledge graph?
It's BugBrain's internal map of your app, stored as nodes for the pages and screens it can reach and edges for the actions that move between them. It's the foundation the AI uses to generate tests, decide what to re-run after a change, and measure coverage.
How does BugBrain decide what to explore?
An explorer does a bounded breadth-first crawl, capped per session, and favors unexplored states using an entropy-weighted score — so it spends its budget discovering new territory rather than revisiting the same screens.
Does the AI re-label pages on every run?
No. The model labels each new state once, then reuses that label. This keeps cost down and keeps the map stable across runs.
How does the graph help me?
It lets BugBrain generate test cases from real paths through your app, run only the tests touched by a change, and show you which parts of the app have and haven't been covered.