Testing and Coverage Tiles
This page documents tiles that provide testing framework configurations and code coverage reporting for NGSS projects.
JaCoCo Coverage Tiles
The NGSS tiles provide a comprehensive JaCoCo-based code coverage solution with modular configurations for different testing scenarios.
jacoco-base-tile
Foundation tile for JaCoCo configuration that provides basic code coverage enforcement.
- Purpose
-
Establishes fundamental JaCoCo coverage thresholds and validation rules that can be inherited by other tiles.
- Features
-
-
JaCoCo coverage threshold configuration
-
Line and branch coverage enforcement
-
Configurable coverage limits via properties
-
Basic coverage validation rules
-
- Key Properties
-
-
jacoco.coverage.line.threshold: Minimum line coverage percentage -
jacoco.coverage.branch.threshold: Minimum branch coverage percentage
-
- Coverage Enforcement
-
-
Line coverage validation
-
Branch coverage validation
-
Build failure on coverage threshold violations
-
- Usage
-
-
Can be used directly for basic coverage needs
-
Inherited by aggregate coverage tiles
-
Foundation for more complex coverage scenarios
-
jacoco-integration-tests-tile
This tile is deprecated. Its configurations have been rolled into skaffold-tile.
|
Extends jacoco-base-tile with integration test coverage for Kubernetes/Skaffold environments.
- Purpose
-
Configures JaCoCo agent for containerized integration tests with coverage dumping and Kubernetes integration.
- Features
-
-
JaCoCo agent configuration for containerized tests
-
Remote coverage data collection
-
Integration with Skaffold development workflow
-
Multiple profile support (skaffold-dev, jenkins, with-jacoco-agent)
-
- Migration
-
Use
skaffold-tilewhich includes these configurations along with comprehensive Kubernetes development workflow support.
jacoco-aggregate-tests-tile
Comprehensive JaCoCo reporting with unit and integration test aggregation.
- Purpose
-
Combines unit test and integration test coverage into complete aggregate reports with full lifecycle management.
- Features
-
-
Complete JaCoCo lifecycle management (prepare-agent, report, merge, check)
-
Unit and integration test coverage aggregation
-
SonarQube integration support
-
Comprehensive coverage metrics across all test types
-
- Coverage Types
-
-
Instruction coverage metrics
-
Branch coverage analysis
-
Complexity measurement
-
Line coverage tracking
-
Method coverage validation
-
Class coverage reporting
-
- Key Capabilities
-
-
Merges coverage data from multiple test phases
-
Generates unified coverage reports
-
Enforces comprehensive coverage standards
-
Integrates with CI/CD quality gates
-
- Usage
-
-
Recommended for projects requiring complete coverage reporting
-
Essential for SonarQube integration
-
Ideal for projects with both unit and integration tests
-
jacoco-aggregate-tile
Simplified JaCoCo aggregation that inherits from other JaCoCo tiles.
- Purpose
-
Provides merge and report capabilities by combining configurations from unit and integration test tiles.
- Features
-
-
Inherits from
jacoco-unit-tests-tileandjacoco-integration-tests-tile -
Coverage data merging
-
Aggregate report generation
-
Simplified configuration
-
- Dependencies
-
-
Uses
jacoco-unit-tests-tile(external dependency) -
Uses
jacoco-integration-tests-tile(deprecated)
-
- Usage
-
-
Use
jacoco-aggregate-tests-tilefor more comprehensive coverage -
Suitable for simpler aggregation needs
-
Coverage Tile Selection Guide
Choose jacoco-base-tile when:
- You need basic coverage enforcement
- Working with simple projects without integration tests
- Want minimal JaCoCo configuration
Choose jacoco-aggregate-tests-tile when:
- You have both unit and integration tests
- Need comprehensive coverage reporting
- Integrating with SonarQube or quality gates
- Want complete JaCoCo lifecycle management
Choose jacoco-aggregate-tile when:
- You need simpler aggregation
- Working with external JaCoCo tile dependencies
- Want basic merge and report functionality