可定制的差异工具,可以生成报告(XML,HTML) [英] A customizable diff tool that can produce report (in XML, HTML)

查看:128
本文介绍了可定制的差异工具,可以生成报告(XML,HTML)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想为非回归测试提供差异报告。
我的程序是基于Java的,但是没有找到满足我需要的API。

I want to provide a diff report for a non regression test. My program is Java based but I did not found any API filling my needs.

所以我正在使用一个外部工具(CSDiff),该文件需要2个文件作为参数并返回HTML报告。
很好并且易于设置。

So I'm using an external tool (CSDiff) that take 2 files as arguments and return an HTML report. That's nice and easy to setup.

现在我唯一的问题是HTML报告需要一些调整才能使用,而我正在弄乱报告,尝试将其转换为其他内容(隐藏某些部分,更改样式,...)

Now the only problem I have is that the HTML report needs some tweaks to be used and I am messing around with the report, trying to transform it into something different (hidding some parts, changing the style, ...)

有人知道具有强大命令行支持的diff工具吗? ,允许生成自定义报告?
不错的报告选项是2窗格视图,正则表达式过滤,简单的样式选项...类似html中的vim diff视图将是很棒的。

Does someone know a diff tools that has a powerful command line support, allowing custom report to be generated ? Nice report options would be 2 panes view, regexp filtering, easy styling options... something like the vim diff view in html would be great.

I已经在stackoverflow中阅读了有关差异工具的内容,但我找不到所需的内容。

I've already read stuff about diff tools in stackoverflow but I don't find the stuff I'm looking for.

  • https://stackoverflow.com/questions/12625/best-diff-tool
  • Free diff tool that is configurable?
  • Need a Java and Javascript diff tool written in Java

非常感谢

推荐答案

我建议 google-diff-match-patch 。这提供了HTML或基本的diff组件,您可以对其进行样式设置和转换。

I would recommend google-diff-match-patch. This provides HTML or the basic diff components which you could style and transform yourself.

这篇关于可定制的差异工具,可以生成报告(XML,HTML)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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