Continuing our overview of the new features in TestComplete 8.10, today I’d like to tell you about improvements in file checkpoints. These checkpoints allow you to verify the contents of text and binary files, and this way verify that your tested application creates or modifies files correctly. To get started with file checkpoints, you can watch our Verifying Files short video tutorial.
TestComplete 8.10 adds some handy features to file checkpoints, including a visual file diff view and a command to adjust the allowed file content difference. Below is a quick overview of these new features.
Integrated file diff
First of all, we’ve improved the file checkpoint log and added a side-by-side diff view of the expected and actual files. It’s available under the Details link of the File Comparison Report log entry.
Here you can see the line and per-character differences between the two files (that is, changed, inserted and deleted lines) highlighted with different background colors. This is a great help in quickly identifying file changes that resulted in the checkpoint’s failure.
Automatic adjusting of acceptable file difference
Sometimes you need to verify files that contain dynamic elements, for example, timestamps. Such files will be different each time the test is run, so a direct byte-per-byte comparison of the expected and actual contents simply won’t work. To handle such files, you need to use the AllowedDifference parameter that specifies the maximum number of bytes that can vary.
To save you time on calculating the allowed byte difference for dynamic file contents, TestComplete 8.10 can do this for you automatically. The next time a file checkpoint in your test fails because of a few different bytes, simply open the checkpoint’s log and click Adjust checkpoint parameters to make the next comparison successful.
TestComplete will calculate the byte difference between the compared files and suggest the Allowed Difference parameter value that would enable the checkpoint to ignore this difference. For those of you who use keyword tests, TestComplete will also offer to automatically update the checkpoint parameters in your test.
If you haven’t done so already, be sure to download TestComplete 8.10 and try out these and other new features. As always, we’re looking forward to your feedback.