Writing Tests

When you create a test program, stub code is inserted to help you code your first test case.

Some of the elements are optional, and you may not require them; review the Elements of a Test Case for information on which elements are mandatory and the types of content each should contain.

There are also code snippets templates available within the IDE editor that help you to create additional test cases.

If your test program is testing source code in another project, the stub code for the first test case created contains additional INITIALIZE and CALL statements, to allow you to call directly into the source under test. Use a similar structure when creating further tests.

The Micro Focus Unit Testing Framework also contains a number of library routines for making test assertions that determine the outcome of a test case.