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 Mode 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.

Example:

You want to test the SD module transaction "Create Inquiry". The transactions "Create ordering party" and "Create Material" are prerequisites for "Create Inquiry". First, use the ABAP/3 Repository Information System to check whether some of these modules exist already. You can then use them in your test procedure. You must create test modules for the other transactions. Finally, include all three test modules in 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 you already created the test modules "Create ordering party" and "Create Material" for the first step, you only need to create 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.