Skip to main content

⏱️ Skip Coverage After

By default, Early agents run coverage analysis twice during a test generation flow:

  1. Before test generation β€” to establish a baseline
  2. After test generation β€” to measure improvement and report results

The skip-coverage-after setting allows you to skip the second coverage run in order to reduce overall execution time.


🧠 What This Controls​

Coverage analysis is used to:

  • Decide which methods are eligible for test generation
  • Measure coverage improvement
  • Display before/after coverage metrics in the Early web application

When skip-coverage-after is enabled:

  • Coverage is still calculated before test generation
  • The post-generation coverage run is skipped
  • The web application will display only the β€œbefore” coverage values

πŸ”„ Default Behavior​

By default:

  • Coverage is executed both before and after test generation
  • Coverage improvement is calculated and reported

This provides the most complete visibility, but adds additional runtime.


βš™οΈ Configuration Options​

You can enable this optimization using either a CLI flag or an environment variable.

CLI Flag​

--skip-coverage-after true | false

Environment Variable​

export SKIP_COVERAGE_AFTER=true | false

Both options are equivalent.


πŸ§ͺ Behavior Matrix​

SettingCoverage BeforeCoverage AfterWeb Reporting
false (default)βœ… Yesβœ… YesBefore & After coverage shown
trueβœ… Yes❌ NoOnly Before coverage shown

πŸ”§ When to Enable This​

You may want to enable skip-coverage-after when:

  • CI runtime needs to be minimized
  • Running on large repositories or slow test suites
  • Using Early in time-sensitive pipelines
  • You care primarily about test generation, not immediate coverage delta reporting

This setting is particularly useful in combination with:

  • MAX_TESTABLES
  • CHANGED_METHODS_ONLY
  • Reduced concurrency

πŸ§ͺ Example: GitHub Actions​

env:
SKIP_COVERAGE_AFTER: "true"

This skips the post-generation coverage run for faster execution.


πŸ§ͺ Example: Jenkins​

environment {
SKIP_COVERAGE_AFTER = 'true'
}

Or inline before running the CLI:

export SKIP_COVERAGE_AFTER=true
early generate-pr

πŸ“Œ Notes​

  • Coverage is always required before test generation and cannot be skipped
  • This setting affects reporting only β€” not test selection
  • Skipping the second coverage run reduces accuracy of reported improvement
  • The generated tests are not affected by this setting

βœ… Summary​

SettingDefaultEffect
--skip-coverage-afterfalseSkip post-generation coverage analysis
SKIP_COVERAGE_AFTERfalseEnvironment-based equivalent
AffectsReporting & runtimeNo impact on test generation logic

Use this option when speed matters more than coverage delta visibility, especially in large or time-constrained CI workflows.