Running Unit Tests

To display unit tests in the Micro Focus Unit Testing view, you must first run the unit test project that contains them. Only then will you see the test fixtures (the .cbl files within the project), and test cases within them.
Note: The first time you run or debug a test fixture, you may be prompted with a Windows security alert, informing you that the Windows firewall has blocked the process. You need to allow Eclipse access to your network before you can continue; this should only be a one-off process.
  1. In the Micro Focus Unit Testing view, do one of the following:
    • To run all test cases in the test fixture file, click GUID-EBBAE910-5DB3-494B-BD0E-C2F479A60A6C-low.png (Run All).
    • To run a single test case, right-click it, then select Run.
    • To run multiple test cases, hold down Ctrl and click each required test case, right-click, then select Run.
      Note: The selected test cases can belong to different test fixtures, if required.
    • To re-run the selection of test cases that last ran, click GUID-A4B28D20-7C9D-4513-A75A-A97646269FDB-low.png (Rerun Last); all other test cases are marked as skipped.
    • To re-run all failed tests, click GUID-689439CA-A240-4D62-8B50-658E12A2E7CC-low.png (Run Failed); all other test cases are marked as skipped.

    The selected test cases are run. The red indicator bar shows the progress of the test run; when complete, a breakdown of the completed test cases, including number of errors and failures is displayed.

    GUID-C26875C0-20E0-48E7-81AF-B46A2ED45C85-low.png

  2. To view any messages that a particular test generated, select it from the hierarchy.

    The results appear in the Test Results pane.