@abapify/adt-aunit
v0.3.6
Published
ABAP Unit Test CLI plugin for adt-cli with JUnit XML output for GitLab CI
Maintainers
Readme
@abapify/adt-aunit
ABAP Unit Test CLI plugin for adt-cli.
Runs AUnit test runs against an SAP system via ADT and prints results to the
console or serialises them as JUnit XML (for GitLab CI / Jenkins),
SonarQube generic test reports, or JaCoCo / sonar-generic coverage.
Install
npm i @abapify/adt-aunit
# or
bun add @abapify/adt-aunitUsage
Register the command in your adt.config.ts so adt-cli picks it up:
// adt.config.ts
export default {
commands: ['@abapify/adt-aunit/commands/aunit'],
};Then run tests against a package, class, transport, or arbitrary object URI:
adt aunit -p ZMY_PACKAGE
adt aunit -c ZCL_MY_CLASS
adt aunit --transport NPLK900042 --format junit --output aunit-report.xmlExample GitLab CI job:
abap-unit:
script:
- npx adt aunit -p $PACKAGE --format junit --output aunit-report.xml
artifacts:
when: always
reports:
junit: aunit-report.xmlThe package also exports helpers for embedding AUnit in custom tooling:
import { toJunitXml, type AunitResult } from '@abapify/adt-aunit';
const xml = toJunitXml(result satisfies AunitResult);Role in the monorepo
- CLI plugin loaded by
@abapify/adt-clivia thecommandsentry inadt.config.ts; ships both theaunitcommand and result formatters. - Depends on
@abapify/adt-contracts/@abapify/adt-schemasfor the AUnit ADT endpoint and on@abapify/adt-plugin-abapgitto resolve object names discovered from transports and packages. - Focused on AUnit only; ATC checks, coverage orchestration outside AUnit, and generic test runners live elsewhere.
Related
License
MIT
