Forum Discussion
AlexKaras
12 years agoCommunity Hero
Hi,
> The difference in files displays in bytes [...]
If you are talking about native TestComplete's files comparison function, than this is the only functionality available.
You are trying to compare files that has very complex internal structure and thus it is very difficult to create a universal comparison function because it is not clear what properties you are interested in and what may be ignored during comparison.
For the complex files, four options are available:
a) Compare files as a binary stream to figure-out if files binary equal or not (this is what TestComplete does);
b) Use the file's object structure provided by the file creation software and use this structure to iterate through the file, decide what properties you are interested in and compare them (this is what is done by the extension I mentioned previously);
c) Use some third-party software that provides the comparison you need and use it;
d) Decide what you need to compare and consider if some alternative approach is possible. E.g. if you are interested to compare text only, you may open file in the native software, use OCR to get the text from the screen and compare it with the existing master data.
Obviously, options b), c) and d) must be implemented by you as only you know what and how you need to compare.
> The difference in files displays in bytes [...]
If you are talking about native TestComplete's files comparison function, than this is the only functionality available.
You are trying to compare files that has very complex internal structure and thus it is very difficult to create a universal comparison function because it is not clear what properties you are interested in and what may be ignored during comparison.
For the complex files, four options are available:
a) Compare files as a binary stream to figure-out if files binary equal or not (this is what TestComplete does);
b) Use the file's object structure provided by the file creation software and use this structure to iterate through the file, decide what properties you are interested in and compare them (this is what is done by the extension I mentioned previously);
c) Use some third-party software that provides the comparison you need and use it;
d) Decide what you need to compare and consider if some alternative approach is possible. E.g. if you are interested to compare text only, you may open file in the native software, use OCR to get the text from the screen and compare it with the existing master data.
Obviously, options b), c) and d) must be implemented by you as only you know what and how you need to compare.