Generate WinMerge report file on CI server when running Approval tests

In our automation tests projects we heavily used Approval tests to assert on the output files. It could be for example JSON API responses or XML messages generated by integration services.

This approach worked very well for us, in local when framework asserted *.received files with *.approved files, WinMerge windows popped up and showed the difference. But it did not work on CI server, if some of tests failed the test report could only indicated that something was wrong, but to get the real failure one has to login to CI server and compare received and approved files using manual WinMerge run. WinMerge does provide the GUI for generating compare report, but until the WinMerge 2.15.2 it was not possible to use WinMerge CLI for this.

Generate diff report using CLI

Starting from WinMerge 2.15.2

"C:\Program Files\WinMerge\WinMergeU.exe" path_to_left_file path_to_right_file 
-minimize -noninteractive -u -or path_to_report_file

The output result:

You could attach this html report file to your test report system like Allure

This entry was posted in Uncategorized and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.