Product Information > JADE Developer’s Reference > Chapter 17 - Using the JADE Testing Framework > Loading Code Coverage Files
Loading Code Coverage Files

To load a code coverage file into the Code Coverage Results Browser

The Load submenu is then displayed. For details, see the following subsections.

Loading and Merging Coverage for Methods

To load a code coverage file and merge it into the Code Coverage Results Browser

  1. Select the Load command from the File menu.

  2. Select the Load and Merge Coverage for Methods command from the Load submenu that is then displayed.

  3. In the Open common dialog that is then displayed, specify the name in the File name combo box of the coverage file (that is, a .ccd file) that you want to load from the directory selected in the Look in combo box and then click the Open button. (Alternatively, click the Cancel button to abandon your selection.)

During the load operation, progress information is displayed in the status bar. You can abort the load process by clicking the Cancel button that is displayed at the right of the status bar.

The information in the specified file is merged with the currently loaded information in the Code Coverage Results Browser (assuming that there is some). If no information is currently loaded, the file is loaded to create a new session.

When merging a file (that is, loading a file into a non-empty session), coverage information may be loaded for methods for which there is already coverage information (in the current session). In such cases, method editions are used to determine which has the latest coverage information; that is, the current session or the file being loaded.

If the current session already has coverage information for a method and the method editions are the same, the new coverage information for the method is merged with the existing information.

Loading and Replacing Coverage for Methods

To load a code coverage file and replace existing coverage

  1. Select the Load command from the File menu.

  2. Select the Load and Replace Coverage for Methods command from the Load submenu that is then displayed.

  3. In the Open common dialog that is then displayed, specify the name in the File name combo box of the coverage file (that is, a .ccd file) that you want to load from the directory selected in the Look in combo box and then click the Open button. (Alternatively, click the Cancel button to abandon your selection.)

During the load operation, progress information is displayed in the status bar. You can abort the load process by clicking the Cancel button that is displayed at the right of the status bar.

If no information is currently loaded, the file is loaded to create a new session.

When loading a file into a non-empty session, coverage information may be loaded for methods for which there is already coverage information (in the current session). In such cases, method editions are used to determine which has the latest coverage information; that is, the current session or the file being loaded.

If the method edition in the currently loaded information is greater than the method edition in the file, the assumption is that the current session already has the latest coverage information and the data in the file (for this method only) is ignored.

If the method edition in the file is greater than or equal to the edition of the method in the current session, the assumption is that the file contains later information, so the current session information (for this method only) is discarded and recreated from the file being loaded.