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.
-
Ensure that you already have a unit test project open.
-
To create a new test program:
-
Right-click the project in Solution Explorer and click
.
The
Add New Item dialog box appears.
-
Select
, and then select
Test Program.
-
In the Name field, type a name for the test program and click
Add.
-
To add an existing test program:
-
Right-click the project in
Solution Explorer and click
.
The
Add Existing Item dialog box appears.
-
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.