Hochfrequenz / Hochfrequenz/Z_ABAPGIT_PULL_MCP_SHORTCUT
Pull does not deploy class test includes (*.clas.testclasses.abap) into SAP
- Dominant language
- ABAP
- Stars
- 0
- Forks
- 0
- Avg merge
- 1h 3m
- Merged PRs (30d)
- 1
Description
# Pull does not deploy class test includes (`*.clas.testclasses.abap`) into SAP
## Summary
When pulling an online repo via the shortcut (driven from `sapgui.mcp`'s
`sap_abapgit_pull`), the **main** class/interface source is deployed correctly,
but the **test-class include** part of a class (`*.clas.testclasses.abap`,
i.e. the `…========CCAU` include) is **not** written into SAP. As a result
ABAP Unit finds 0 tests for the class. In one observed case, a `CCAU` include
that had been populated via ADT was **empty again after a subsequent pull** —
i.e. the pull appears to have cleared it. (Observed once; the skipped-deploy
behaviour below was seen on two distinct classes.)
Main source round-trips fine; only the test-include part is affected.
## Environment
- Pull path: `sapgui.mcp` `sap_abapgit_pull(repo, trkorr=…)` → `Z_ABAPGIT_PULL_MCP_SHORTCUT`.
- System: S/4HANA. Online repo; sources under `src/` (abapGit standard layout).
## Steps to reproduce
1. Repo contains, for a class, both files (valid abapGit serialization):
- `src/zcl_x.clas.abap`
- `src/zcl_x.clas.testclasses.abap` (a `FOR TESTING` class)
2. `sap_abapgit_pull(repo="…", trkorr="…")` → reports success.
3. `run_unit_tests` on `ZCL_X` → **0 tests** (Passed=0, Failed=0).
4. Reading the include: `ZCL_X==========CCAU does not have any inactive version` /
empty — the test source did not land in SAP, although `zcl_x.clas.abap` did.
5. If `CCAU` was first populated via ADT (`create_test_include` +
`set_include_source`) and then a pull runs, the `CCAU` content is cleared.
## Expected
A `*.clas.testclasses.abap` file committed to the repo should be deployed as the
class's test include, so that ABAP Unit finds the tests after a pull (and an
existing populated test include should not be cleared when git has content for it).
## Actual
Only the main class source is deployed; the test-class include is skipped
(and cleared if previously present).
## Impact
Test code can be version-controlled in git but cannot be deployed/run in SAP
through this pull path. Workaround: re-apply the test include via ADT
(`create_test_include` + `set_include_source`) after every pull.
## Notes / possible cause (unverified)
Possibly the pull uses a serialization/deserialization mode or object-part
filter that excludes test-class includes, or only deploys the "main" part of a
`CLAS`. Maintainers can confirm whether the shortcut restricts which class
sub-objects are deserialized. I have observed this consistently for two
distinct classes; I have not inspected the shortcut's internals.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the sap_abapgit_pull path and Z_ABAPGIT_PULL_MCP_SHORTCUT, then trace how src/zcl_x.clas.abap and src/zcl_x.clas.testclasses.abap are deserialized and deployed. Reproduce the pull with both files, inspect the class-part or object-part handling, and run_unit_tests on ZCL_X; done means the CCAU include retains the test source and ABAP Unit finds the tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100