views:

33

answers:

2

Hi.

I've been working on integration-tests for a Java web service. The integration test now 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.

+2  A: 

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.

Corv1nus
+1  A: 

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.

Donal Fellows
FWIW, I *know* that the scm plugin runs svn queries in a subprocess; I get a problem in Eclipse because of it...
Donal Fellows
Thanks for the tip. I have decided to go with this solution as I might just as well commit the xml files on every release. Accepted.
John