Add a Test Program

Use this process if you are adding an existing test program to a unit test project or you are creating a test program from scratch. If you are writing tests for existing COBOL code, you may find that the process outlined in Create a Unit Test Project and Test Program for Existing Code is a better approach.
  1. Ensure that you already have a unit test project open.
  2. To create a new test program:
    1. Right-click the project in Solution Explorer and click Add > New Item. The Add New Item dialog box appears.
    2. Select Installed > COBOL Item > Test, and then select Test Program.
    3. In the Name field, type a name for the test program and click Add.
  3. To add an existing test program:
    1. Right-click the project in Solution Explorer and click Add > Existing Item. The Add Existing Item dialog box appears.
    2. Navigate to the existing test program file, and then click Add.
    The test program appears in Solution Explorer.
If you created a new test program, some stub code is added to the program, to help you get started with writing test cases.