The Micro Focus Unit Testing Framework includes a stackable preprocessor (MFUPP) that enables you to instrument a COBOL program during unit test creation without the need to edit the original source code.
It provides the following functionality:
The preprocessor enables you to test on a more granular level than a typical unit test: without the preprocessor, the smallest piece of the COBOL source code that can be tested is either a program or an entry-point; using the preprocessor, code can access and test paragraphs and sections.
When compiling using this preprocessor, the program being compiled must have a program-id defined in order that the testing framework can insert the correct copybooks into the code under test, as strict naming conventions for these copybooks is required; see Inserting Test Code into Source Code.
The preprocessor is enabled just as you would any other preprocessor (for example: on the command line, project properties, etc...) and includes a number of directives used to configure its behavior.