简体   繁体   中英

A customizable diff tool that can produce report (in XML, HTML)

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.

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.

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

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've already read stuff about diff tools in stackoverflow but I don't find the stuff I'm looking for.

Many Thanks

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

Pretty Diff在Web浏览器的屏幕上提供HTML报告,或者作为HTML格式的文本提供,可以保存为HTML文件。

I don't know such library from top of my head but if Google search doesn't bring anything relevant back, I would take a look at Eclipse sources. Eclipse has very good text diff tool which you might be able to reuse, unless it's tied up pretty badly to their UI stuff, which I hope is not the case.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM