abap-unit-testing SKILL.md skillA
abap-unit-testing from likweitan/abap-skills is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add likweitan/abap-skills/abap-unit-testing@git:20260916.c1b7d5ePins git:20260916.c1b7d5e in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- likweitan/abap-skills
- Path
skills/abap-unit-testing/SKILL.md- Versions recorded
- 3
- Latest version
- git:20260916.c1b7d5e, committed Sep 16, 2026
- First version recorded
- Apr 17, 2026
- Size
- 12,649 bytes
- Repository stars
- 72
- License
- MIT
Help with ABAP Unit testing including test class setup, assertions, test doubles, mocking frameworks, dependency injection, CDS test environments, SQL test environments, RAP BO test doubles, and test fixtures. Use when users ask about ABAP unit tests, test classes, test methods, CL_ABAP_UNIT_ASSERT, test doubles, mocking, CDS test environment, SQL test environment, RAP testing, ABAP test injection, test seams, behavior-driven testing, TDD in ABAP, test isolation, or writing automated tests for…
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# ABAP Unit Testing
Guide for writing effective ABAP Unit tests including test class setup, assertions, test doubles, mocking frameworks, and test environments for CDS, SQL, and RAP.
## Workflow
1. **Determine the testing goal**:
- Testing business logic in a class method
- Testing a CDS view entity
- Testing a RAP BO behavior implementation
- Testing database-dependent logic with SQL test doubles
- Setting up test doubles for external dependencies
2. **Choose the right approach**:
- Direct unit test for pure logic (no dependencies)
- Constructor/setter injection for mockable dependencies
- CDS test environment for CDS view tests
- OSQL test environment for SQL-dependent code
- RAP BO test doubles for RAP behavior tests
3. **Follow the AAA pattern**: Arrange → Act → Assert
4. **Ensure test isolation**: Tests must not depend on persistent data or external systems
## Test Class Fundamentals
### Test Class Definition
```abap
"! Test class for ZCL_MY_CLASS
CLASS ltc_my_class DEFINITION FINAL FOR TESTING
DURATION SHORT
RISK LEVEL HARMLESS.
PRIVATE SECTION.
DATA cut TYPE REF TO zcl_my_class. "Class Under Test
…Read the whole file at its exact version.
How to install
mdr add likweitan/abap-skills/abap-unit-testing@sha256:8cba1a00565ed1b2The line at the top of this page pins the label git:20260916.c1b7d5e, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_gmxlzqjm2f5pwv6x)
2 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 3 versions of this file, between Apr 17, 2026 and Sep 16, 2026, about one every 76 days.
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| git:20260916.c1b7d5e latest | 2026-09-16 | c1b7d5e | 12,649 B | A | view · diff |
| git:20260417.412f529 | 2026-04-17 | 412f529 | 12,398 B | A | view · diff |
| git:20260417.5860c24 | 2026-04-17 | 5860c24 | 18,208 B | A | view |
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (12649 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
likweitan/abap-skills · 72 stars · license MIT · pushed 2026-11-03 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_gmxlzqjm2f5pwv6x GET https://markdownregistry.com/api/v1/resolve?ref=likweitan/abap-skills/abap-unit-testing GET https://markdownregistry.com/api/v1/blob/8cba1a00565ed1b2f1437299796459e6f5b32fd151019d03dfc2cfea2fb41cfc
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.