是否有一个可以比较文件并将结果输出到文件的Maven插件? [英] Is there a maven plugin that can diff files and output the result to file?

查看:93
本文介绍了是否有一个可以比较文件并将结果输出到文件的Maven插件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在为Java Web服务进行集成测试.集成测试现在将通过SoapUI插件声明的SOAP请求发送到服务器,并且为每个SOAP请求生成并保存一个xml文件(集成测试阶段的一部分).

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).

是否有一个插件,可以使我将已输出并保存的xml文件与早期运行中生成的一组类似的xml文件进行比较?这样做的目的是将先前发行版的xml文件输出与当前版本进行比较,以确保对xml文件进行了预期的更改.

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 :运行测试的人员会将我要比较的xml文件复制到目录中(例如,target/compare_against).他们不在SCM之下.

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.

如果不合适,您会找到 antrun 插件最简单.

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

这篇关于是否有一个可以比较文件并将结果输出到文件的Maven插件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆