@abapify/adt-aunit 0.3.5 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +74 -0
- package/package.json +5 -5
package/README.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# @abapify/adt-aunit
|
|
2
|
+
|
|
3
|
+
ABAP Unit Test CLI plugin for [`adt-cli`](https://github.com/abapify/adt-cli).
|
|
4
|
+
Runs AUnit test runs against an SAP system via ADT and prints results to the
|
|
5
|
+
console or serialises them as JUnit XML (for GitLab CI / Jenkins),
|
|
6
|
+
SonarQube generic test reports, or JaCoCo / sonar-generic coverage.
|
|
7
|
+
|
|
8
|
+
[](https://www.npmjs.com/package/@abapify/adt-aunit)
|
|
9
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm i @abapify/adt-aunit
|
|
14
|
+
# or
|
|
15
|
+
bun add @abapify/adt-aunit
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
Register the command in your `adt.config.ts` so `adt-cli` picks it up:
|
|
21
|
+
|
|
22
|
+
```ts
|
|
23
|
+
// adt.config.ts
|
|
24
|
+
export default {
|
|
25
|
+
commands: ['@abapify/adt-aunit/commands/aunit'],
|
|
26
|
+
};
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Then run tests against a package, class, transport, or arbitrary object URI:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
adt aunit -p ZMY_PACKAGE
|
|
33
|
+
adt aunit -c ZCL_MY_CLASS
|
|
34
|
+
adt aunit --transport NPLK900042 --format junit --output aunit-report.xml
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Example GitLab CI job:
|
|
38
|
+
|
|
39
|
+
```yaml
|
|
40
|
+
abap-unit:
|
|
41
|
+
script:
|
|
42
|
+
- npx adt aunit -p $PACKAGE --format junit --output aunit-report.xml
|
|
43
|
+
artifacts:
|
|
44
|
+
when: always
|
|
45
|
+
reports:
|
|
46
|
+
junit: aunit-report.xml
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
The package also exports helpers for embedding AUnit in custom tooling:
|
|
50
|
+
|
|
51
|
+
```ts
|
|
52
|
+
import { toJunitXml, type AunitResult } from '@abapify/adt-aunit';
|
|
53
|
+
|
|
54
|
+
const xml = toJunitXml(result satisfies AunitResult);
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Role in the monorepo
|
|
58
|
+
|
|
59
|
+
- CLI plugin loaded by `@abapify/adt-cli` via the `commands` entry in
|
|
60
|
+
`adt.config.ts`; ships both the `aunit` command and result formatters.
|
|
61
|
+
- Depends on `@abapify/adt-contracts` / `@abapify/adt-schemas` for the
|
|
62
|
+
AUnit ADT endpoint and on `@abapify/adt-plugin-abapgit` to resolve object
|
|
63
|
+
names discovered from transports and packages.
|
|
64
|
+
- Focused on AUnit only; ATC checks, coverage orchestration outside AUnit,
|
|
65
|
+
and generic test runners live elsewhere.
|
|
66
|
+
|
|
67
|
+
## Related
|
|
68
|
+
|
|
69
|
+
- [abapify/adt-cli monorepo](https://github.com/abapify/adt-cli)
|
|
70
|
+
- [Full docs](https://adt-cli.netlify.app)
|
|
71
|
+
|
|
72
|
+
## License
|
|
73
|
+
|
|
74
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abapify/adt-aunit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "ABAP Unit Test CLI plugin for adt-cli with JUnit XML output for GitLab CI",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
"gitlab-ci"
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@abapify/adt-plugin": "0.
|
|
33
|
-
"@abapify/adt-schemas": "0.
|
|
34
|
-
"@abapify/adt-contracts": "0.
|
|
35
|
-
"@abapify/adt-plugin-abapgit": "0.
|
|
32
|
+
"@abapify/adt-plugin": "0.4.0",
|
|
33
|
+
"@abapify/adt-schemas": "0.4.0",
|
|
34
|
+
"@abapify/adt-contracts": "0.4.0",
|
|
35
|
+
"@abapify/adt-plugin-abapgit": "0.4.0"
|
|
36
36
|
},
|
|
37
37
|
"module": "./dist/index.mjs",
|
|
38
38
|
"repository": {
|