Previous Topic Next topic Print topic


Tutorial: Running Unit Tests in the IDE

Note: This tutorial is applicable to Windows platforms only.

This tutorial utilizes the native AirportDemo sample that is supplied with Visual COBOL.

The project contains two programs: main.cbl is the main program that contains the user interface code, but aircode.cbl is the program that contains the main application logic, and it is this program that we want to put under test.

In this tutorial, you will create a unit test project and test fixture file that directly calls into aircode.cbl and tests the logic within it. You will create a test case that directly runs one of the functions of the demo (calculating the distance between two airports), and code some test assertions that check for the correct answer. You will also debug the test case, to troubleshoot any problems.

Previous Topic Next topic Print topic