Unit Testing in the IDE

The Micro Focus Unit Testing Framework is an xUnit-style testing framework, available from the shell prompt, or from the IDE. It supports native COBOL applications, and procedural applications compiled to JVM COBOL.

Within the IDE, group your tests inside a unit test project, which can either be located in the same workspace as the application under test, or you can have a standalone test project. Integrating your test cases into the same workspace as the application that you plan to test enables you to directly call into the source code of the application. For stand-alone unit test projects, you need to import a copy of the source code into the project in order to test it.

Each test case is capable of performing a setup, running the test case, and then performing a test teardown. You can also apply certain test metadata to the tests, which in certain cases affects how the test case runs.

The Micro Focus Unit Testing view is the control panel where you run, debug and rerun your test cases. It also shows an overview of the number of successful and failed test cases that you have.