Ansicht
Dokumentation

RBAMTEST_AUNIT_TRACE - Test RBAM Trace

RBAMTEST_AUNIT_TRACE - Test RBAM Trace

SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up   General Data in Customer Master  
This documentation is copyright by SAP AG.
SAP E-Book

Purpose

The program controls the ABAP unit test for the RBAM trace. The aim of this test is to determine whether the expected number of trace entries are produced, and whether these are plausible for the triggering authorization checks (the effect is right, policy in use is right, and so on).

Process flow of the program

  • The unit test program RBAMTEST_INTEGRATION_MATRIX is started using SUMBIT. Special parameter setings ensure that only the operation RETRIEVE is tested, and that the RBAM trace is started in a special local mode. The trace settings therefore apply only for the internal mode that is currently active. Any other trace settings that may be in place are therefore unaffected. The processing of this program causes defined entries to be written in the RBAM trace, and you can check these later.
  • After the integration test, the trace automatically ends (end of the session). The trace entries are read from the database using the RBAM trace API method READ_LOG. When doing so, the RBAM test user "!RBAMxx" is explicitly used to select the trace entries.
  • In the next step, the trace entries are split up, and transferred to a structure that makes it easier to process them. Since the important data of a trace entry is stored in a long, formatted character string, the splitting process is based on this format. If changes are made to this format - and in particular, if keywords are changed - the splitting needs to be adjusted.
  • The splitting process produces two internal tables, one for the business object "Customer", and another for "Invoice".
  • Once both tables have been created, and all preparations are therefore complete, the actual unit test starts. The check is performed using the IAT Test Framework and the fixture class CL_RBAMTEST_TRACE_FIXTURE. As is usual with this frameworkä, tables in HTML format are required as test description objects. It would seem logical to reuse the tables that have already been used in the first step when processing the program RBAMTEST_INTEGRATION_MATRIX, since it is precisely these authorization checks that are to be used for the check. However, since the test description tables always contain the name of the fixture class, you need to create copies of the integration test tables with different names. Since only the operation RETRIEVE is included in the test, it is only necessary to copy these two tables. The name of the directory in the MIME repository is /SAP/BC/RBAM/Testdata/Runtime/Trace.
  • You can finally start the unit tests by calling the framework method CL_IAT_TESTRUNNER=>RUN( ).

Integration

The program is executed in the context of the verification process VER06359.

Prerequisites

The test is dependent on the previously-mentioned test description tables in the MIME repository directory /SAP/BC/RBAM/Testdata/Runtime/Trace and on the fixture class CL_RBAMTEST_TRACE_FIXTURE. The contents of the tables used for the trace test must be the same as the tables used for the integration test (see above).

Features

Selection

Standard Variants

Output

If the unit test finds errors, these are displayed in the ABAP unit browser.

Activities

Example






ROGBILLS - Synchronize billing plans   ROGBILLS - Synchronize billing plans  
This documentation is copyright by SAP AG.

Length: 3621 Date: 20240601 Time: 103519     sap01-206 ( 86 ms )