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