abap-offstack-aunit
An AI coding-agent skill that bootstraps off-stack ABAP Unit testing plus
an abaplint static-analysis gate onto an abapGit-serialised ABAP repository —
running entirely in CI (GitHub Actions) with no live SAP system.
It is structured for registration with the SAP AI Skills
Library (SAP/ai-skills-library,
bring-your-own-repo model).
What it does
The skill transpiles serialised ABAP to JavaScript with the abaplint
transpiler and open-abap-core, then runs the repo's existing ABAP Unit tests
on Node. It covers dialect pinning, breaking a class-under-test free of heavy DDIC
drag (shim vs factory), minimal DDIC fixtures, a reproducible npm ci setup, and
wiring the off-stack job beside the abaplint lint job in GitHub Actions.
It is grounded entirely in open-source tooling (abaplint and open-abap are MIT, by
Lars Hvam and the open-abap organisation) plus GitHub Actions. Nothing requires a
provisioned SAP system.
Two layers: the skill vs the scaffold
This is an AI-agent skill, not a standalone CLI. Two things are distinct:
- The skill (
SKILL.md + references/ + assets/) is guidance for a coding
agent. You install it into the agent.
- The scaffold (
test-offstack/, the workflow, abaplint.json) is what the
agent copies into your ABAP repository. That is what actually runs the tests.
The agent is the consumer; your abapGit repo is the target.
Requirements
- Your ABAP is abapGit-serialised into a Git repository (
.clas.abap etc.).
- Node.js 22+ and npm available locally and in CI.
- CI is GitHub Actions.
Skills in this repository
| Slug | Description |
|---|
abap-offstack-aunit | Bootstrap off-stack ABAP Unit + an abaplint CI gate onto an abapGit repo, with no live SAP system. |
Install
Once this repository is public on GitHub, install the skill into a coding agent
(Claude Code, Cursor, Codex, OpenCode, and others) with the
skills CLI:
npx skills add alokm3hta-star/abap-offstack-testing --skill abap-offstack-aunit
Using it once installed
You do not call a command. You ask your agent, in natural language, from inside
your ABAP repo:
"Set up off-stack ABAP Unit tests and an abaplint gate in CI for this repo,
targeting S/4HANA 2025."
The skill's description triggers, the agent loads SKILL.md, and it:
- Detects greenfield vs existing CI and copies the right assets into the repo.
- Makes the three judgement calls, asking you where it cannot infer them:
the dialect (
syntax_version, e.g. v816); shim vs factory for each
class-under-test that drags in a database / BAPI / HTTP adapter; and the minimal
DDIC fixtures (discovered iteratively via compileError).
- Runs
npm ci && npm test locally to prove the harness is green before handing
back.
After that the harness stands on its own, no agent required:
- Locally:
cd test-offstack && npm test (exit 0 = all passed).
- In CI: every push and pull request runs abaplint, then the identical
off-stack tests (
needs: lint); a red job blocks the PR.
Scope boundary (important): this verifies orchestration and pure-ABAP logic
only. Any class calling the database, classic BAPIs, or HTTP is shimmed out and
stays an on-stack ATC + ABAP Unit concern. An off-stack green is CI-grade
provenance, not an in-system pass. See
skills/abap-offstack-aunit/SKILL.md for
the full agent-facing detail.
Layout
skills/
└── abap-offstack-aunit/
├── SKILL.md # the skill (name + description frontmatter)
├── references/ # deep-dive guidance
│ ├── setup-and-dialect-pinning.md
│ ├── cut-isolation-shim-vs-factory.md
│ ├── ddic-fixtures.md
│ └── ci-wiring.md
└── assets/ # copyable scaffold
├── test-offstack/ # runner, config, package + lockfile, README
├── workflows/ # greenfield workflow + mergeable off-stack job
├── abaplint.json # greenfield root abaplint config
└── gitignore-snippet
Author
Alok Mehta.
Provenance
This skill was authored with AI assistance and reviewed by a human maintainer, who
takes responsibility for its content. It is grounded in open, publicly documented
tooling (the abaplint / open-abap ecosystem and GitHub Actions) and contains no
proprietary, customer-specific, or SAP-internal material. Disclosed in line with
SAP's guidance on AI-generated contributions.
Licence
Apache-2.0. See LICENSE. This repository is REUSE-compliant.
The bundled scaffold depends on third-party open-source tools that are not
redistributed here (fetched at build time): the abaplint toolchain
(@abaplint/core, @abaplint/transpiler, @abaplint/runtime, @abaplint/cli)
and open-abap-core, all MIT-licensed. The transitive npm dependencies are all
permissive (MIT / ISC / BSD-3-Clause / BlueOak-1.0.0); there is no copyleft. See
NOTICE for provenance and third-party attributions.
Trademarks
SAP and ABAP are trademarks or registered trademarks of SAP SE (or an SAP
affiliate). "abaplint" is an independent open-source project. These names are used
here nominatively to describe interoperability only. This skill is an independent
work and is not affiliated with, sponsored by, or endorsed by SAP SE or the
abaplint project.