β±οΈ Skip Coverage After
By default, Early agents run coverage analysis twice during a test generation flow:
- Before test generation β to establish a baseline
- 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β
| Setting | Coverage Before | Coverage After | Web Reporting |
|---|---|---|---|
| false (default) | β Yes | β Yes | Before & After coverage shown |
| true | β Yes | β No | Only 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_TESTABLESCHANGED_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β
| Setting | Default | Effect |
|---|---|---|
--skip-coverage-after | false | Skip post-generation coverage analysis |
SKIP_COVERAGE_AFTER | false | Environment-based equivalent |
| Affects | Reporting & runtime | No impact on test generation logic |
Use this option when speed matters more than coverage delta visibility, especially in large or time-constrained CI workflows.