How to write an ATC Check (SAP_BASIS=7.52)
How to write an ATC Check
A brief introduction.
PUBLIC
A brief introduction.
PUBLIC
The ATC is an important framework for carrying out static checks of ABAP source code and ABAP
dictionary objects.
A major use case is to carry out these static checks remotely: The checks are supposed to run on a
central test system that gathers all necessary information remotely from the systems on which the
objects to be tested are located. The remote scenario allows a check system running the newest
release to run its checks against a system running an older release.
In the following, you will learn how to write your own check to analyze source code and how to
ensure it is able to be carried out remotely.
TABLE OF CONTENTS
Preliminaries .................................................................................................................................................................. 4
Creating a check class ................................................................................................................................................. 4
1. Checks based on CL_CI_TEST_ABAP_COMP_PROCS ...................................................................... 5
2. Checks based on CL_CI_TEST_ROOT .............................................................................................. 5
3. Checks based on CL_CI_TEST_SCAN .............................................................................................. 5
Implementing your check .......................................................................................................................................... 6
Setting up attributes of your check ................................................................................................................... 6
Registering checked object types ...................................................................................................................... 7
Defining the messages of your check ................................................................................................................ 7
Statically unknown T100 messages ................................................................................................................... 8
The RUN method ................................................................................................................................................ 9
The ANALYZE_PROC method .......................................................................................................................... 10
Reporting a finding .......................................................................................................................................... 11
Reporting a finding directly via INFORM.......................................................................................................... 12
Reporting a finding for statically unknown T100 messages ............................................................................ 14
Verification of test prerequisites ..................................................................................................................... 14
Activating your check ...................................................................................................................................... 15
Allowing configurable settings for your check ................................................................................................ 15
Results and result classES ........................................................................................................................................ 17
Short texts and long texts ................................................................................................................................ 17
dictionary objects.
A major use case is to carry out these static checks remotely: The checks are supposed to run on a
central test system that gathers all necessary information remotely from the systems on which the
objects to be tested are located. The remote scenario allows a check system running the newest
release to run its checks against a system running an older release.
In the following, you will learn how to write your own check to analyze source code and how to
ensure it is able to be carried out remotely.
TABLE OF CONTENTS
Preliminaries .................................................................................................................................................................. 4
Creating a check class ................................................................................................................................................. 4
1. Checks based on CL_CI_TEST_ABAP_COMP_PROCS ...................................................................... 5
2. Checks based on CL_CI_TEST_ROOT .............................................................................................. 5
3. Checks based on CL_CI_TEST_SCAN .............................................................................................. 5
Implementing your check .......................................................................................................................................... 6
Setting up attributes of your check ................................................................................................................... 6
Registering checked object types ...................................................................................................................... 7
Defining the messages of your check ................................................................................................................ 7
Statically unknown T100 messages ................................................................................................................... 8
The RUN method ................................................................................................................................................ 9
The ANALYZE_PROC method .......................................................................................................................... 10
Reporting a finding .......................................................................................................................................... 11
Reporting a finding directly via INFORM.......................................................................................................... 12
Reporting a finding for statically unknown T100 messages ............................................................................ 14
Verification of test prerequisites ..................................................................................................................... 14
Activating your check ...................................................................................................................................... 15
Allowing configurable settings for your check ................................................................................................ 15
Results and result classES ........................................................................................................................................ 17
Short texts and long texts ................................................................................................................................ 17