Analyzing File Verification Results

Applies to TestComplete 15.31, last modified on March 17, 2022

When testing applications, you may need to verify that a file stores expected data. Verification is done by file checkpoints that perform a byte-to-byte comparison of the actual file’s contents against the expected contents stored in your project.

If a checkpoint passes, TestComplete posts a successful checkpoint message to the test log.

If the checkpoint fails, it posts an error message and logs the verification result to the Details panel of the test log.

Details panel containing the file checkpoint verification results

If the files are slightly different, TestComplete automatically calculates the Allowed Difference parameter’s value that will allow treating the checked and the baseline files as equal and posts the value to the Details panel.

If the checkpoint was created from a keyword test, you can automatically apply the recommended value by clicking the Click here to change the parameter automatically link in the Details panel. If the checkpoint was created from script, change the value of the parameter manually. After you change the parameter value, the actual and the baseline files will be treated as equal during the next test run.

To obtain detailed verification results, click the Details link that is shown in the Link column of the test log or the Show comparison results link shown in the Details panel. TestComplete opens the File Comparison Result panel that contains a report that shows the differences between the baseline and actual files. The differences are highlighted with different colors.

The File Comparison Result panel

Below is a list of colors used for highlighting:

  • Transparent - Indicates that the corresponding lines are equal.
  • Light green - Indicates that the corresponding lines contain characters that are different.
  • Dark green - Indicates that the highlighted characters are different.
  • Light coral  - Indicates that the corresponding line is absent from the compared file.
  • Light blue   - Indicates that the corresponding line is absent from the baseline file.

Such a visual presentation helps you better analyze verification results and lets you save your time when searching for the cause of checkpoint failures.

Note: When the file is smaller than or equal to 50 Mb, TestComplete performs elaborate verification (ignoring whitespaces, character displacement, and so on) and reports the first 200 000 lines in the log. When the file is larger than 50 Mb, TestComplete uses a more simplified verification mechanism and reports only the first mismatch.

If TestComplete is configured to use a third-party tool for file verification, the file checkpoint also logs the comparison report generated by the tool. To view the results, click the Details link of the Files.Compare result message in the log.

See Also

File Checkpoints
About File Checkpoints
Working With Files From Scripts

Highlight search results