Skip to main content

@abapify/adt-aunit

CLI command plugin that runs ABAP Unit tests via /sap/bc/adt/abapunit/testruns and emits JUnit XML (consumable by GitLab CI, Jenkins, etc.) plus optional JaCoCo coverage reports for SonarQube.

Install

bun add @abapify/adt-aunit
// adt.config.ts
export default {
commands: ['@abapify/adt-aunit/commands/aunit'],
};

Public API

export { aunitCommand } from '@abapify/adt-aunit';
export { toJunitXml, outputJunitReport } from '@abapify/adt-aunit';
// JaCoCo formatter subpath:
// import { ... } from '@abapify/adt-aunit/formatters/jacoco';

Usage

adt aunit -p ZMY_PACKAGE --format junit --output aunit-report.xml

GitLab CI snippet:

abap-unit:
script:
- adt aunit -p $PACKAGE --format junit --output aunit-report.xml
artifacts:
when: always
reports:
junit: aunit-report.xml

Dependencies

  • @abapify/adt-plugin, @abapify/adt-client, @abapify/adt-contracts

See also