Show TOC

Implementing ABAP Unit Test ClassesLocate this document in the navigation structure

Context

Tip

You can switch to test code for ABAP classes by choosing the Test Classes tab at the bottom of the ABAP editor. That's good, but even better would be to be able to edit source code and test code side-by-side. Here is how to do this, using the multiple editor support of the ABAP Developer Tools.

For documentation in the languages and at the release level installed in your ABAP servers, choose Start of the navigation path Help Next navigation step SAP Library End of the navigation path using the integrated SAP GUI front end program.

Procedure

  1. Open your ABAP object source code in the ABAP editor.
  2. Select the class name tab at the top of the editor. From the context menu, choose New Editor.

    The ADT opens a second editor for your class. You can switch to the test class code in this instance of the editor, while the other editor displays the source code of the class.

    Leave split-screen mode by pulling one of the split-screen class-name tabs back up to the row of class name tabs at the top of the editor screen.

  3. Do you want to edit the source code and test code side-by-side in the same ADT window? Then pull the class name tab of the new editor to the right side of the ADT window.
    The ADT splits the screen to show the source code and test code side by side. You can also pull the editor to the bottom of the ADT window to split the screen horizontally.
  4. If you want to edit the source code and test code in separate ADT windows, choose Start of the navigation path Window Next navigation step New Window End of the navigation path from the ADT tool bar.

    The ADT responds by opening a second window.

    Note This is convenient if you happen to have your computer set up to display on two separate monitors.
  5. Then pull the class-name tab of one of your editors to the new ADT window.

Results

The editor is embedded in the new window. You can now work with your source code and test code displayed side-by-side in separate windows.