COBOL Check is a unit testing framework for COBOL created to help COBOL programmers who have difficulties with contemporary development methods such as test driven development.

COBOL Check is intended to support legacy COBOL application maintenance and application modernization on IBM zSeries systems by enabling developers to work either on-platform (directly on the mainframe) or off-platform (on a Windows, Unix, Linux, or OS X instance not connected to a mainframe) and to enjoy the benefits of fine-grained “microtest”-driven development at the level of individual Cobol paragraphs.

How COBOL Check works:

COBOL Check runs as a precompiler. It merges the source code of the program under test with one or more test suites and test case management logic to produce a copy of the program under test that has all the test code embedded in it. The copy is then compiled and executed.

Test case management code is inserted at the top of the Procedure Division of the program under test. It executes selected paragraphs within the program under test, as called-for in the test cases. In that way, cobol-check is able to exercise individual paragraphs without running the entire program.

Test suites are coded in a Cobol-like DSL (domain-specific language) that is meant to be intuitive for Cobol programmers. Thus, test case syntax looks different from test cases written for xUnit-style frameworks in other programming languages. This is not an xUnit-style framework, as that approach will not work for mainframe-based procedural languages.

How to learn COBOL Check:

Some programmers who use Cobol Check will be experienced in object-oriented or functional languages, but new to the mainframe platform and the Cobol language. Others will be experienced mainframe Cobol programmers who are new to development techniques like unit testing and test-driven development.

Here we suggest a few self-guided learning resources for Cobol Check, the Cobol language, IBM z/OS, unit testing, and TDD.

How COBOL Check works with other Open Mainframe Projects like the COBOL Working Group and the COBOL Programming Course: 

COBOL Check is one projects focusing on the future of COBOL, which also includes the COBOL Programming Course and COBOL Working Group. These projects ensure COBOL developers can use the developer tools they have today to build and maintain COBOL applications.