AUNIT

ABAP Unit Test Plugin for the ABAP Build Framework

The plugin executes ABAP Unit Tests on a defined set of development packages.

This documentation refers to Release 2025/06 (SAP Note 3615638) of the ABAP Build Framework 750+.
If you’re using a different release, please note that the plugin may have undergone slight changes, and some parameters could differ from what is described here.
For an overview of the releases, please refer to Note 3141309 – ABAP Build Framework overview of released TCIs.

ABAP Class

/BUILD/CL_AUNIT_LIB_PLUGIN

Build Script Configuration Parameters

The parameters listed below should be maintained in Section AUNIT of the configuration area in the build script.

ParameterDescription
criticalitySeverity levels: Harmless; Dangerous (includes Harmless); or Critical (includes both Harmless and Dangerous).
durationDuration categories: Short; Medium (includes Short); or Long (includes both Short and Medium).
include_foreign_testsTRUE or FALSE
with_coverageTRUE or FALSE
with_evaluationTRUE or FALSE: If set to TRUE, the task will result in an ‘erroneous’ state if any findings are detected; otherwise, it will result in a ‘successful’ state. This allows for evaluation, such as during the post-stage of a pipeline.

minimum_statement_coverage
A value between 0 and 100 will set the task result state to ‘Warning’ if the criteria are not met (only applicable when executed with coverage = true).
minimum_branch_coverageA value between 0 and 100 will set the task result state to ‘Warning’ if the criteria are not met (only applicable when executed with coverage = true).
minimum_procedure_coverageA value between 0 and 100 will set the task result state to ‘Warning’ if the criteria are not met (only applicable when executed with coverage = true).
only_transportTRUE or FALSE: If set to TRUE, only the objects from the original source transport (specifically, the subset of objects associated with the current build task) will be used as the object set, rather than the complete package, including subpackages. If the build was not started with a transport, this parameter has no effect.
Note: This parameter is considered preliminary and will be removed in a future version once the framework supports this functionality.
coverageevaluationstartdateDate in YYYYMMDD format. Objects older than the specified date will not be included in coverage processing.

Runtime Values

DirectionParameterDescription
OutputAUNIT_AGGREGATES_<TASK_ID>Aggregated results in JSON format.

Results

  • One XML file per build task in Cobertura format containing unit test coverage data.
  • One XML file per build task in JUnit format containing the results of the unit tests.

Example

The AUNIT configuration can be defined in the build script as follows: