Skip to main content

Knowledge Graph

The Knowledge Graph (KG) is Aucert's structured representation of your application. It captures the relationships between screens, user flows, API endpoints, and data models — giving the AI pipeline deep context about your app so it generates meaningful tests, not random interactions.

What the Knowledge Graph captures

SourceWhat it extractsWhy it matters
Application codeScreen definitions, navigation paths, state management patternsTells the AI which screens exist and how users move between them
API schemasEndpoints, request/response shapes, authentication flowsEnables testing API-dependent screens with realistic data expectations
UI layoutsScreen hierarchy, interactive elements, accessibility labelsGuides the AI on where to tap, swipe, and type during test execution
Historical dataPast test results, known bug patterns, regression areasPrioritizes testing on code areas that have failed before
Product requirementsPRDs defining expected behavior and user storiesEnsures tests validate what the product should do, not just what the code does

How it works

When you run aucert init or aucert run, the ingestion engine parses your app and builds the graph:

  1. Parsing — The engine reads your source files, extracting screen definitions (Activities, Fragments, Composables for Android), navigation graphs, and API calls
  2. Schema extraction — OpenAPI specs or Protobuf definitions are parsed to map endpoint relationships and data shapes
  3. Graph construction — Extracted entities become nodes; relationships become edges. The result is a connected graph of your entire app
  4. Enrichment — Historical test results and bug patterns are overlaid on the graph, marking high-risk areas and known failure points

Data model

The Knowledge Graph represents your app as nodes (entities) and edges (relationships):

Nodes

Each node represents a distinct entity in your app:

Node typeExamplesProperties
screenLoginScreen, HomeScreen, SettingsScreenroute, layout_file, has_form
componentLoginButton, UserAvatar, SearchBartype, interactive, accessibility_label
endpointPOST /auth/login, GET /users/memethod, path, auth_required
data_modelUser, Product, Orderfields, validation_rules

Edges

Edges capture how entities relate to each other:

RelationshipExampleMeaning
navigates_toHomeScreen → SettingsScreenUser can navigate between these screens
callsLoginScreen → POST /auth/loginThis screen makes this API call
depends_onOrderScreen → User (data model)This screen requires this data to render
containsHomeScreen → SearchBarThis screen contains this component

How it powers test generation

The graph structure enables the Generation layer to:

  • Identify critical paths — Find the most important user flows by traversing high-connectivity nodes (screens with many edges)
  • Detect edge cases — Discover unusual state combinations by examining node properties (what happens when has_form=true but auth_required=false?)
  • Prioritize testing — Weight test generation toward nodes marked as high-risk from historical bug data
  • Avoid redundancy — Skip testing identical flows that differ only in irrelevant parameters
info

The Knowledge Graph is stored in PostgreSQL with JSONB columns rather than a dedicated graph database. This provides query flexibility with standard tooling and avoids the operational overhead of Neo4j for the current scale. See the internal docs for details.

What's next