Create a JVM COBOL Test Fixture

Use this process to create a JVM COBOL test fixture file in a COBOL JVM unit test project. Populate it directly with your test code.
  1. While in the COBOL perspective, select the COBOL JVM unit test project in the COBOL Explorer pane.
  2. Click File > New > COBOL Unit Test.

    The New COBOL Unit Test dialog box appears.

  3. In the Source folder field, ensure it states the name of the source folder of your JVM unit test project.
  4. In the Package field, we recommend that you specify a package name with which to organize the test cases; otherwise, the default package is used.
  5. In the Name filed, type the name of your test fixture program.
  6. Click Finish.

    The test fixture file is created within the JVM COBOL unit test project.

    Remember: If you call into external JVM COBOL code, it must not be contained within classes; it must be procedural code.
The additional code and configuration as part of a linked fixture file is as follows:
  • The two copybooks required by the Micro Focus Unit Testing Framework are copied into the project.

    Copybooks for JVM test fixture

  • A test setup, test case, and teardown have been created, and includes some default metadata.

    JVM COBOL stub code for test fixture