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

Untestable Detection

GitAuto uses the AI model to evaluate whether uncovered code is genuinely untestable or whether it should be removed. Genuinely untestable code includes async error handlers buried inside event handlers, race condition paths, and logically dead branches. Testable code - anything that can be mocked, spied on, or exercised through inputs - is sent back for more test iterations.

Wasted Iterations on Unreachable Code

Some code is structurally impossible to unit test. A catch block inside a setTimeout callback that only fires on a network error during a WebSocket reconnection cannot be reliably triggered in a unit test. Without untestable detection, the agent would waste all its remaining iterations trying to cover unreachable code - writing increasingly convoluted mocks that still fail to hit the target lines.

By identifying genuinely untestable code early, GitAuto can either skip those lines from the coverage target or suggest that the developer remove/refactor them. This focuses the agent's iterations on code that can actually be tested.

Why Models Can't Judge Testability

Models attempt to test any code they're given, regardless of whether it's practically testable. Dead code, platform-specific branches, and tightly coupled I/O operations resist unit testing, but the model doesn't know that until it's already spent several iterations trying and failing. Evaluating testability requires reasoning about the code's runtime behavior - something that needs a separate, focused analysis step. No benchmark gives the model untestable code and evaluates whether it correctly identifies it as untestable. Models are trained to always produce output, not to say "this cannot be done."

How It Works

When coverage enforcement identifies uncovered lines after multiple iterations, GitAuto sends those uncovered code sections to the model with a specific evaluation prompt. The model analyzes each uncovered section and classifies it as either "untestable" (with a reason) or "testable" (with a suggested approach).

Untestable classifications include: async error handlers in event listeners, race condition handling, defensive code for impossible states, and platform-specific code paths. Testable classifications include: code that can be reached through dependency injection, code that responds to mockable function calls, and branches reachable through specific input values.

Related Features

  • Coverage Enforcement - provides the uncovered line data that triggers untestable analysis
  • Dead Code Removal - removes code identified as unreachable rather than merely untestable
  • Should-Skip Detection - skips entire files before test generation, while untestable detection operates at the line level

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!

Snapshot Auto-UpdateShould-Skip Detection

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