
In the ABAP Unit Browser in the Object Navigator (transaction SE80), use favorites to do the following:
Group a set of unit tests together
Execute a group of tests
Define additional options for running ABAP Unit tests.
These options include enabling coverage measurement during the execution of your unit tests.
Creating a Favorite
To create a new favorite, choose Favorite as the value of the Chose Selection Criteria field in the left panel of the ABAP Unit Browser. .
Select Display to open the list of your favorites in the left panel of the ABAP Unit Browser.
Choose Create Favorite from the tool bar above the list of favorites.
Assign a name and a description to the new favorite.
Starting the Favorite Editor
To start the Favorite Editor in the ABAP Unit Browser, double-click a favorite.
Use the tool bars, context menu, and screen menu to switch to and from edit mode, to add and remove test classes, to execute the favorite, and to change the execution options.
Adding a Test Class to a Favorite
To add a test class to a favorite, start the favorite editor as above.
Switch to edit mode, if you have not already done so.
Choose Add elements in the editor tool bar.
On the following screen, choose the programs, function groups, and classes whose ABAP Unit tests should be added to the favorite.
The repository objects that you choose are added to the favorite. If they contain unit tests, then these can be run as part of the favorite.
Setting Options and Enabling Coverage Measurement
After you have started the favorites editor, you can choose Show / Edit Options to control how favorites are run.
You can control which Unit Tests in a favorite are run by the risk level and the duration category of each test.
You can also enable coverage measurement of the favorite as a whole. With this option, any program that is invoked by your tests directly or indirectly is measured for coverage.
After the test task is completed, the ABAP Unit result display appears and includes a message reporting that coverage results are available. From the detail display of a message, you can start a display of the coverage results.
In the code coverage display you can access the coverage results for programs and modularization units. By double clicking on a modularization unit, the source code is displayed and statements that are not executed are highlighted.