SAP NetWeaver AS ABAP Release 740, ©Copyright 2014 SAP AG. All rights reserved.
ABAP Keyword Documentation → ABAP − Reference → program editing → Testing and Checking Programs →ABAP Unit
ABAP Unit is a test framework for unit tests. ABAP Unit can be used to:
Single texts can be started directly in the tool for the program in question. More comprehensive test runs are executed from ABAP Unit Browser in ABAP Workbench or by using ABAP Test Cockpit. ABAP Unit is closely associated with Coverage Analyzer, enabling test coverage to be measured as well.
In ABAP programs, unit tests are performed as test methods in local test classes. They are not part of the production code of a program, but are transported in the same way. Test methods of this type are executed and evaluated using ABAP Unit Framework. The test methods generally call the tested units of the production code and then check the results using methods of the class CL_ABAP_UNIT_ASSERT. Test classes and test methods are defined using the following language elements. Special test includes are used to define test classes in class pools and function groups.
If test classes implement interfaces, then not all interface methods generally need to be implemented there. The error message or warning that otherwise occurs can be hidden in test classes by using an addition of the statement INTERFACES.
Notes