Repository navigation
v1.3.0 — Project structure discovery
What's New
AutoSpec AI now scans your project for existing page objects, locators, utility functions, and test coverage before generating tests. This context is injected into the LLM prompts so generated tests reuse your real POM classes and locators instead of hallucinating ones that don't exist.
Features
- Page Object Discovery — Finds existing POM/page object classes, extracts method signatures and locator definitions (assignment, getter, readonly patterns)
- Utility Discovery — Finds exported helper functions and constants for reuse in generated tests
- Test Coverage Analysis — Analyzes existing tests for routes, describe blocks, test names, and imported page objects to avoid generating redundant tests
- Relevance Scoring — Prioritizes context related to the current diff (imports, same directory, name references)
- Token Budget Management — Configurable budget (default 8000 tokens) to keep prompts within limits
- Anti-Hallucination Instructions — Explicit prompt instructions to reuse listed objects and not invent new ones
New Action Inputs
| Input | Default | Description |
|---|---|---|
pom_patterns |
(auto-detect) | Comma-separated globs for page object files |
utility_patterns |
(auto-detect) | Comma-separated globs for helper/utility files |
project_context_budget |
8000 |
Max token budget for project context in prompts |
Auto-Detection
When no custom patterns are provided, AutoSpec automatically detects common conventions:
- POM:
**/*.page.ts,**/pages/**/*.ts,**/page-objects/**/*.ts,**/*.pom.ts - Utilities:
**/helpers/**/*.ts,**/utils/**/*.ts,**/fixtures/**/*.ts,**/*.helper.ts