Previous Topic Next topic Print topic


Unit Testing in the IDE

The Micro Focus Unit Testing Framework is an xUnit-style testing framework, available from the Enterprise Developer command line prompt, or from the IDE. It supports native COBOL applications, and if you are using the command line version, procedural applications compiled to managed COBOL.

Within the IDE, group your tests into a unit test library (a project of type 'unit test library'), which can either be located in the same solution as the application under test, or you can have a standalone test library. Integrating your test cases into the same solution 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 libraries, you need to import a copy of the source code into the library 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. Running test cases in conjunction with Code Coverage adds an extra dimension to your code analysis: a breakdown of the code covered when your tests run helps you to troubleshoot failing tests.

The Micro Focus Unit Testing window 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.

Previous Topic Next topic Print topic