Skip to content

v1.3.0 — Project structure discovery

Choose a tag to compare

@cport1 cport1 released this 14 Apr 16:19
· 14 commits to main since this release

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