Skip to content

Latest commit

 

History

History
27 lines (15 loc) · 1.17 KB

external-call-in-ut.md

File metadata and controls

27 lines (15 loc) · 1.17 KB

code pal for ABAP > Documentation > External Call in Unit Tests Check

External Call in Unit Tests-Check

What is the intent of the check?

This check searches test classes for statements that change the current main program or cause parallel sessions to spawn. Test code should not change the control flow to other main programs or directly call GUI elements.

How does the check work?

The check searches for SUBMIT statements, remote function calls of any kind (CALL FUNCTION ... DESTINATION) and calls to CL_GUI_* classes.

How to solve the issue?

Remove these external calls and/or mock them with a proper dependency isolation technique.

What to do in case of exception?

In exceptional cases, you can suppress this finding by using the pseudo comment “#EC EXT_CALL_UT which should be placed right after the statement itself:

SUBMIT program.       “#EC EXT_CALL_UT

Further Readings & Knowledge