Forum Discussion

MB123FinD37's avatar
MB123FinD37
New Contributor
8 years ago
Solved

most efficient way to code file comparison checkpoints in large quantities

I'm looking for Suggestions/Tips/Tricks for an upcoming project.  I am attempting to do some very simple file comparisons, but I am attempting to do so for a very large number of files so I would like to find the most efficient method possible.  Efficiency is key given the number of files for the purposes of adding new test cases and for future maintenance.  I will be generating new files on a regular basis that will be compared to previously generated File Checkpoint baselines that will be maintained in the SmartBear store.  The generation of the new files will be handled by a separate automated process I've already configured, so all I need to do is automated the file comparisons in an efficient and easily maintainable way.

 

In other words, one newly generated file in a local directory will be compared against a SmartBear file Store file, and script will produce a warning if the comparison is above the AllowedDifference threshold, or will produce a Test Pass log entry if all is good. 

 

I would like to maintain some sort of list... this list will contain categories like these to identify the files that I'm referencing:

 

1. file directory

2. file name

3. Hash  % of "AllowedDifference" between the new/old files

5. Category of file

6. sub-Category of the file

4. name/location of the baseline file checkpoint in the SmartBear file Store that the newly generated file above file will be compared against.

 

I will iterate over the various test cases in the above list based on the Category/SubCategory supplied.

 

Any suggestions on how I may do this using SmartBear Scripts, keyword tests, File Checkpoints, etc.  I'm wondering if I can use some sort of variable list or a Database to store all the values and maintain them in this list, and some variation of the "Check" method with "AllowedDifference" parameter to verify if the file content of the new files is sufficient for a Test Pass.

 

Any help would be greatly appreciated.

 

Thanks,

K