GitAuto Logo
  1. Home
  2. Pricing
  3. Docs
  4. Dashboard
  5. Blog
  6. Contact
  1. Home
  2. How It Works
  3. Use Cases
  4. Pricing
  5. Docs
  6. Dashboard
  7. FAQ
  8. Blog
  9. Contact

Test Naming Detection

GitAuto walks the repository directory tree, matches test files against 6 common naming patterns, and determines the dominant convention. If 60% or more of test files use a single pattern, GitAuto tells the model to follow it - for example, "Use .spec. naming (e.g., User.spec.ts)."

Why Consistency Matters

CI configurations rely on specific glob patterns to discover test files. Developers scanning a directory expect a single convention. Mixed naming ( .test.ts next to .spec.ts next to test_user.py) creates confusion and can cause test runners to miss files entirely.

Why Models Need Application-Layer Help

Models are fundamentally non-deterministic - even at temperature 0, the same prompt can produce different outputs across runs. Naming conventions are arbitrary choices with no "correct" answer, so without explicit guidance the model picks whichever pattern it has seen most in training data - which varies with context. More importantly, the model has no memory across separate runs, so each session starts fresh with no knowledge of what previous sessions chose. Telling the model "be consistent" does not help because it has nothing to be consistent with. The only reliable fix is to detect the convention at the application layer and inject it as a concrete directive. No benchmark penalizes inconsistent test file naming across PRs - models are evaluated on individual task correctness, not cross-session consistency.

How It Works

GitAuto scans the repo and tallies test files against 6 patterns:

  • .spec. - e.g., User.spec.ts
  • .test. - e.g., User.test.ts
  • test_ prefix - e.g., test_user.py
  • Test suffix - e.g., UserTest.java
  • _test suffix - e.g., user_test.go
  • _spec suffix - e.g., user_spec.rb

If any single pattern accounts for 60% or more of test files, GitAuto declares it the dominant convention and injects a directive into the model's system message. If no pattern reaches the threshold, GitAuto falls back to the language's idiomatic default.

Related Features

  • Test File Preloading - loads example test files so the model sees the naming in practice
  • Repository Rules - allows manual override of the detected naming convention

Need Help?

Have questions or suggestions? We're here to help you get the most out of GitAuto.

Contact us with your questions or feedback!

Test File PreloadingError Baselines

Getting Started

  • Installation
  • Setup

Triggers

  • Overview
  • Schedule Trigger
  • Test Failure Trigger
  • Review Comment Trigger
  • Dashboard Trigger

Coverage Dashboard

  • Overview
  • Python Testing
  • JavaScript Testing
  • Java Testing
  • Go Testing
  • PHP Testing
  • Ruby Testing
  • Flutter Testing
  • Multi-Language
  • Coverage Charts

Customization

  • Repository Rules
  • Output Language
  • GITAUTO.md

Integrations

  • CircleCI Integration
  • npm Integration

How It Works

Context Enrichment

  • Line Numbers
  • Full File Reads
  • Test File Preloading
  • Test Naming Detection
  • Error Baselines
  • CI Log Cleaning
  • Trigger-Specific Prompts
  • Coding Standards

Output Auto-Correction

  • Diff Hunk Repair
  • Diff Prefix Repair
  • Tool Name Correction
  • Tool Argument Correction
  • Import Sorting
  • Trailing Space Removal
  • Final Newline
  • Line Ending Preservation
  • Sanitize Tool Arguments
  • Lint Disable Headers

Quality Verification

  • Formatting
  • Linting
  • Type Checking
  • Test Execution
  • Coverage Enforcement
  • phpcs / phpstan Support
  • PHPUnit Support
  • pytest Support
  • Snapshot Auto-Update
  • Untestable Detection
  • Should-Skip Detection
  • Dead Code Removal
  • Quality Check Scoring
  • Quality Checklist

Safety Guardrails

  • File Edit Restrictions
  • Temperature Zero
  • PR/Branch Checks
  • Race Condition Prevention
  • Bot Loop Prevention
  • Webhook Deduplication
  • Duplicate Error Hashing
  • Infrastructure Failure Detection
  • Strict Tool Schemas
  • No-Change Detection

Token/Cost Management

  • Token Trimming
  • Outdated Diff Removal
  • Stale File Replacement
  • Skip CI Intermediate
  • CI Log Deduplication
  • Web Fetch Summarization
  • Context Forgetting
  • File Query Routing
  • On-Demand Diff

Resilience & Recovery

  • Model Fallback
  • Overload Retry
  • Forced Verification
  • Error Files Editable

Hallucination Prevention

  • Web Search
  • URL Fetching
  • Anti-Hallucination Prompts
  • GITAUTO.md Restrictions
  • Review Response Guardrails

Ready to improve your test coverage?

Go from 0% to 90% test coverage with GitAuto. Start for free, no credit card required.

Install FreeContact Sales

Product

  • Home
  • Why GitAuto
  • What GitAuto Does
  • How It Works
  • Use Cases
  • How to Get Started
  • Solution
  • Pricing
  • Pricing Details
  • ROI Calculator
  • ROI Methodology
  • FAQ
  • Blog
  • Contact

Dashboard

  • Dashboard
  • Coverage Trends
  • File Coverage
  • Credits
  • Open PRs
  • Usage
  • Triggers
  • Actions
  • References
  • Rules
  • CircleCI Integration
  • npm Integration

Documentation

  • Docs
  • Getting Started
  • Setup
  • Triggers
  • Coverage Setup
  • Customization
  • How It Works
  • Auto Merge
  • CircleCI
  • npm

Legal

  • Privacy Policy
  • Terms of Service

Connect

  • GitHub
  • LinkedIn
  • Twitter
  • YouTube
GitAuto Logo© 2026 GitAuto, Inc. All Rights Reserved