I am trying to automate the file comparison which are available in different formats. Is there any tool which can be helpful for this scenario?
Since comparing different file formats doesn't seems like a straightforward task, and possibly requires some logic, I believe the best answer would be to code it yourself.
There plenty of libraries to make reading and parsing easy in many of the popular (and less popular) programming languages, but anyway csv and text files are the easiest even if you have to start from scratch.
Yes, there are several tools available and my favourite one is WinMerge ( http://winmerge.org ). You can download the entire package and start using it through the User Interface so that you can be confident with the available features, then you can use it programmatically in two ways:
- using the plugins ( http://manual.winmerge.org/Plugins.html ); or
- executing it with command line ( http://manual.winmerge.org/Command_line.html ).
WinMerge is an Open Source software released under the GNU General Public License.
I believe you can use Apache JMeter for it.
- JMeter can read the files with its HTTP Request Sampler (just specify
filein "Protocol" input and full path to your file in
- JMeter can apply Assertions to conditionally mark tests as passed or failed
- JMeter can parse binary formats like MS Word, Excel, PDF, etc. so supported formats will be not limited only to txt and CSV. See How to Extract Data From Files With JMeter guide for comprehensive information on how this could be done.