5 Star 29 Fork 15

陈再兴 / jacoco

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
EPL-2.0

简介

最新版本支持自定义数据结构,如请求者IP,以IP划分探针数据,此版本暂时不考虑开源,需付费支持。

基于ray大佬的分支二开,感谢大佬的无私奉献。jacoco二开,增量覆盖率和不同时间节点的不同class代码覆盖率合并功能。 思路请参考博文https://blog.csdn.net/qq_34418450/article/details/135386280?spm=1001.2014.3001.5501 这里不再赘述。 如果大家不想编译,可以使用从发布版中下载我已经编译好的agent包和cli包

编译方法:已经去掉了一些不必要的模块和插件,直接执行mvn命令:mvn clean install -Dmaven.test.skip=true -Dmaven.javadoc.skip=true 使用方法:

--diffcode是增量统计,不带则统计全量。可以自己生成这个数据,或者使用ray开源的https://gitee.com/Dray/code-diff获取,支持传入文件参数--diffCodeFiles --onlyMergeExec=true 不生成报告,仅合并探针数据,生成合并后的exec文件 --mergeExecfilepath 需要合并的exec探针文件 --mergeClassfilepath 需要合并的class文件路径 --mergeExec 探针数据合并后生成新的exec文件路径

测试例子,请参考测试类 org.jacoco.cli.internal.commands.ReportTest.mytest4()

合并探针数据生成exec的例子,建议在项目中引入jacoco-cli包,在代码中直接执行命令模式: File html = new File("D:\home"); new Main().execute("report", "D:\jacoco_merge_test.exec", "--classfiles","D:\gitworkplace\luckframeweb\coverage\trunk\616788\classfiles\bbzx\com", "--classfiles","D:\gitworkplace\luckframeweb\coverage\trunk\616788\classfiles\common\com", "--classfiles","D:\gitworkplace\luckframeweb\coverage\trunk\616788\classfiles\reportsupport\com", "--classfiles","D:\gitworkplace\luckframeweb\coverage\trunk\616788\classfiles\reportview\com", "--classfiles","D:\gitworkplace\luckframeweb\coverage\trunk\616788\classfiles\website\com", "--mergeExecfilepath","D:\gitworkplace\luckframeweb\coverage\trunk\616785_616788\execfiles\jacoco20240109165235.exec", "--mergeClassfilepath","D:\gitworkplace\luckframeweb\coverage\trunk\616788\classfiles\bbzx\com", "--mergeClassfilepath","D:\gitworkplace\luckframeweb\coverage\trunk\616788\classfiles\reportview\com", "--mergeClassfilepath","D:\gitworkplace\luckframeweb\coverage\trunk\616788\classfiles\common\com", "--mergeClassfilepath","D:\gitworkplace\luckframeweb\coverage\trunk\616788\classfiles\reportsupport\com", "--mergeClassfilepath","D:\gitworkplace\luckframeweb\coverage\trunk\616788\classfiles\website\com", "--sourcefiles","D:\gitworkplace\luckframeweb\coverage\trunk\616788\sourcefiles", "--onlyMergeExec", "true", "--mergeExec", "D:\jacoco_merge_test.exec", "--html", html.getAbsolutePath()); 或者通过jacoco-cli.jar包调用方式,java -jar jacoco-cli.jar report --diffCode diff --classfiles classdir --args value等等

License ======= Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors The JaCoCo Java Code Coverage Library and all included documentation is made available by Mountainminds GmbH & Co. KG, Munich. Except indicated below, the Content is provided to you under the terms and conditions of the Eclipse Public License Version 2.0 ("EPL"). A copy of the EPL is available at [https://www.eclipse.org/legal/epl-2.0/](https://www.eclipse.org/legal/epl-2.0/). Please visit [http://www.jacoco.org/jacoco/trunk/doc/license.html](http://www.jacoco.org/jacoco/trunk/doc/license.html) for the complete license information including third party licenses and trademarks.

简介

基于jacoco二开,增量覆盖率合并和不同时间节点的不同class代码覆盖率合并 展开 收起
EPL-2.0
取消

发行版 (2)

全部

贡献者

全部

近期动态

加载更多
不能加载更多了
Java
1
https://gitee.com/chen_zai_xing/jacoco.git
git@gitee.com:chen_zai_xing/jacoco.git
chen_zai_xing
jacoco
jacoco
master

搜索帮助