Show TOC

Starting Unit Tests in the ABAP Workbench and Its ToolsLocate this document in the navigation structure

Procedure

The ABAP Workbench and its tools offer standardized menu paths for running ABAP Unit tests:

  • From context menus in the ABAP Workbench (transaction SE80): Start of the navigation path Execute Next navigation step Unit Test End of the navigation path. Or Start of the navigation path Execute Next navigation step Unit Tests with End of the navigation path for unit tests with code coverage measurement or for scheduling of unit tests.

  • From <object> menus (in the ABAP Editor, Class Builder, and Function Builder, whether in the Workbench or as standalone transactions): Start of the navigation path <Object> Next navigation step Execute Next navigation step Unit Test End of the navigation path or Start of the navigation path <Object> Next navigation step Execute Next navigation step Unit Tests with End of the navigation path. Scheduling of unit tests via Unit Tests with is available only in the Workbench.

Multiple selection:.In SE80, you can select multiple repository objects and then run the ABAP Unit tests of these objects. For example, you can select several classes, function modules, and programs from the object name tree. You can then run the ABAP Unit tests for all of the selected objects.

You can also run ABAP Unit tests by development package. And you can specify that subpackages in a package hierarchy should also be considered. That is, you can include tests in the objects in sub-packages in the ABAP Unit test run.

Code coverage: With Start of the navigation path Execute Next navigation step Unit Tests with Next navigation step Coverage Measurement End of the navigation path, you can have the code coverage of your ABAP Unit tests measured as the tests run. The system displays both the ABAP Unit test results and the code coverage in a tabbed display.

The Coverage Analyzer (transaction SCOV) does not need to be switched on for this code coverage measurement.

Scheduling: With Start of the navigation path Execute Next navigation step Unit Tests with Next navigation step Scheduling End of the navigation path in SE80, you can schedule execution of ABAP Unit tests. You can specify sets of repository objects for which unit test should run. (And you can save these specifications in variants for reuse). You can then run the ABAP Unit tests of these objects either as a background job or directly, in your dialog session.

If you run the ABAP Unit tests in the background, then you can have the results mailed to one or more Internet E-Mail addresses.