Modular test cases 

SAP recommends that complex test cases (test procedures) be assembled modularly from simple test cases (test modules). One test module usually tests one transaction.

Test modules are test cases for a transaction, and test procedures are test cases for a process.

Create test modules using the recording function. You can use the easy transaction or the Expert transaction. You can make test cases flexible by subsequently replacing the values input when recording by parameters. You pass the test module result (e.g. a customer number) in an export parameter.

After these steps, you have created a test module with an import and export interface, to which you can now refer in test procedures. The test procedure provides the import interface values and reads the export interface. The values read can, e.g. be passed to the import interface of a following test module.

This concept has the following advantages:

 

Example:

You want to test the SD transaction "Create Inquiry". The transactions "Create ordering party" and "Create Material" are prerequisites for "Create Inquiry". First check the ABAP/3 Repository Information System for the existence of these modules. You can then use them in your test procedure. You must create test modules for the other transactions. The three test modules are then assembled into a test procedure.

In a second step you want to test the transaction "Create Quotation". This transaction also requires the transactions "Create ordering party" and "Create Material". Since, for the first step, you already created the test modules "Create ordering party" and "Create Material", you must create only the test module "Create Quotation".

The only technical difference between a test procedure and a test module is that test procedures can have a test status.

The term test case is used in the documentation for both test procedures and test modules, except where they need to be distinguished.