Contributions
Re: most efficient way to code file comparison checkpoints in large quantities
I have it mostly figured out. One more question... One thing that is not working however is I'm unableto call the FileObj.Check if I'm using a variable from the DDT Driver. when I attempt to pass a variable to the 1st parameter of the File Check method : # Creates a driver Driver = DDT.ExcelDriver("C:\\SmartBear-DDTDrivers\\BulkCustody.xlsx", "Sheet1") OBFile = aqString.Concat(DDT.CurrentDriver.Value[0], DDT.CurrentDriver.Value[1]) Baseline = DDT.CurrentDriver.Value[2] AllowableDiff = StrToInt(DDT.CurrentDriver.Value[3]) # Perform file comparison for each entry in the Excel file if (Files.Baseline.Check(OBFile, AllowableDiff) == False): Log.Warning("For BaselineFileName" + ": " + aqConvert.VarToStr(DDT.CurrentDriver.Value[2]) + "the file HashCompare is beyond acceptable threshold - Please review OB file and compare against baseline file in SmartBear Repository.", pmHighest)# highest priority else: Log.Message(aqConvert.VarToStr(DDT.CurrentDriver.Value[2]) + "file was verified and is either identical or within acceptable threshold - No further actoin is needed.") It fails with error on the "if (Files.Baseline.Check(OBFile, AllowableDiff) == False):" line : Python runtime error. AttributeError the object does not support this property or method I just need a way to pass in the File Object names - I am storing these names in the DDT.ExcelDriver as well since there are so many and they need to correspond with the Files I am comparing against. Just need a way to represent this as an Object in the script. Any ideas?2.8KViews0likes2CommentsRe: most efficient way to code file comparison checkpoints in large quantities
Thanks NisHera. Various text file formats, so yes I'll be attempting to use File Vericiation Checkpoints so I can see what has changed. I'll be attempting to use hash to allow files to pass if there is an acceptable % of difference in certain cases. Anyway, I think the DDT drivers may be the answer I need. I need multiple different rows of values in the Excel or CSV driver though, so I may need to load to an Array in the script/keyword test in order to access the various columns/rows of data to get the values I'm after. A little concerned about the performance if I have thousands of rows/columns in the spreadsheet... have you used this with a large spreadsheet or CSV before, and if so any latency/issues with scripts running to completion. In other words, is the loading of the DDT Driver content fast?2.8KViews0likes0Commentsmost 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 doso fora 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 generatingnew 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 Storethat 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, KSolved2.9KViews0likes5Comments