开发者

Is there a maven plugin that can diff files and output the result to file?

开发者 https://www.devze.com 2023-01-09 09:53 出处:网络
I\'ve been working on integration-tests for a Java web service. The integration test n开发者_StackOverflowow sends SOAP-requests to the server which are asserted via the SoapUI-plugin and for each of

I've been working on integration-tests for a Java web service. The integration test n开发者_StackOverflowow sends SOAP-requests to the server which are asserted via the SoapUI-plugin and for each of the SOAP-requests an xml file is produced and saved (a part of the integration-test phase).

Is there a plugin that allows me to diff the xml files that has been output and saved against a similar set of xml files that were produced in an earlier run? The idea is to diff xml files output from the previous release version with the current version to make sure the expected changes have been made to the xml files.

I hope my question is clear enough. Thanks in advance

EDIT: The xml files that I would like to compare against will be copied in to a directory (lets say, target/compare_against) by the person that is running the test. They are not under SCM.


The only plugin that will do diffs “natively” is the scm plugin, and that only if you've got the other version of the file committed to a repository. (I say “natively” because it probably just runs the diff in a subprocess internally anyway.) I mention this because your question wasn't really clear about how you were keeping around the data from the previous runs.

If that doesn't fit, you'll find the antrun plugin easiest.


I haven't seen any Maven plugins that will do it. You might be able to find an Ant Task (maybe this one?) to do it and use the antrun plugin to run the task. I did see some stuff about xmldiff and Maven/Ant integration but, it's kind of bare.

0

精彩评论

暂无评论...
验证码 换一张
取 消