{"id":25776999,"url":"https://github.com/didi/super-jacoco","last_synced_at":"2025-06-15T17:11:00.658Z","repository":{"id":37450798,"uuid":"308536110","full_name":"didi/super-jacoco","owner":"didi","description":null,"archived":false,"fork":false,"pushed_at":"2023-10-13T08:36:53.000Z","size":2621,"stargazers_count":498,"open_issues_count":39,"forks_count":219,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-02-27T06:07:05.537Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/didi.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-10-30T05:43:02.000Z","updated_at":"2025-02-26T05:40:42.000Z","dependencies_parsed_at":"2024-01-26T03:12:16.372Z","dependency_job_id":null,"html_url":"https://github.com/didi/super-jacoco","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/didi/super-jacoco","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/didi%2Fsuper-jacoco","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/didi%2Fsuper-jacoco/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/didi%2Fsuper-jacoco/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/didi%2Fsuper-jacoco/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/didi","download_url":"https://codeload.github.com/didi/super-jacoco/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/didi%2Fsuper-jacoco/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260016055,"owners_count":22946321,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-27T06:01:34.123Z","updated_at":"2025-06-15T17:11:00.624Z","avatar_url":"https://github.com/didi.png","language":"Java","funding_links":[],"categories":["代码覆盖率"],"sub_categories":[],"readme":"### 简介\n+ Super-Jacoco是基于Jacoco、git二次开发打造的一站式JAVA代码全量/diff覆盖率收集平台，能够低成本、无侵入的收集代码覆盖率数据。Super-Jacoco除了支持JVM运行时间段的覆盖率收集外；还能够和环境无缝对接，收集服务端自定义时间段代码全量/增量覆盖率。并提供可视化的html覆盖率报表，协助覆盖情况精准分析，支撑精准测试落地。\n\n### 产品特性：\n+ 通用：既支持单元测试覆盖率收集，也支持手工测试覆盖率收集；既支持全量覆盖率收集，也支持diff覆盖率收集；\n+ 无侵入：采用on-the-fly模式，无需对开发代码做任何改造，即可收集覆盖率数据；\n+ 高可用：分布式架构，任务机可无限扩展，避免任务机down机或者任务过多时出现性能瓶颈；\n+ 可视化：提供html格式的覆盖率报告，可读性高。\n\n### 使用方法\n#### 1、数据库安装和初始化\n\t安装mysql数据库，创建数据库后执行sql/db.sql文件中的建表SQL\n#### 2、编译打包\n\t 2.1 安装JDK1.8、mavan3\n\t 2.2 clone代码，更改application.properties文件中的数据库和gitlab配置：\n\t\t spring.datasource.url=jdbc:mysql://IP:端口/数据库名?useUnicode=true\u0026amp;characterEncoding=utf8\n\t\t spring.datasource.username=\n\t\t pring.datasource.password=\n\t\t gitlab.username=\n\t\t gitlab.password=\n\t 2.3 执行mvn package -Dmaven.test.skip=true生成super-jacoco.jar\n#### 3、部署\n\t 3.1 执行“nohup java -jar super-jacoco.jar \u0026”启动代码覆盖率服务，默认端口为8899\n#### 4、覆盖率收集接口\n##### 4.1 单测覆盖率接口\n###### 1、启动覆盖率收集\n\t URL：/cov/triggerUnitCover\n\t 调用方法：POST\n\t 参数（body方式传入）：{\"uuid\":\"uuid\",\"type\":1,\"gitUrl\":\"git@git\",\"subModule\":\"\",\"baseVersion\":\"master\",\"nowVersion\":\"feature\",\"envType\":\"-Ptest\"}\n\t 返回：{\"code\":200,\"data\":true,\"msg\":\"msg\"}\n\t 备注：\n###### 2、获取覆盖率结果\n\t URL：/cov/getUnitCoverResult\n\t 调用方法：GET\n\t 参数：uuid(String)\n\t 返回：{\"code\":200,\"data\":{\"coverStatus\":1,\"errMsg\":\"msg\",\"lineCoverage\":100.0,\"branchCoverage\":100.0,\"logFile\":\"file content\",\"reportUrl\":\"http://\"},\"msg\":\"msg\"}\n\t 备注：\n##### 4.2 环境覆盖率接口\n###### 1、启动覆盖率收集\n\t URL：/cov/triggerEnvCov\n\t 调用方法：POST\n\t 参数（body方式传入）：{\"uuid\":\"uuid\",\"type\":1,\"gitUrl\":\"git@git\",\"subModule\":\"\",\"baseVersion\":\"master\",\"nowVersion\":\"feature\"，\"address\":\"127.0.0.1\",\"port\":\"8088\"}\n\t 返回：{\"code\":200,\"data\":true,\"msg\":\"msg\"}\n\t 备注：IP和port为模块部署服务器的IP和端口，在dump jacoco.exec时使用，需要提前把org.jacoco.agent-0.8.5-runtime.jar包拷贝到服务器:/home/xxx/目录，服务启动时需要添加启动参数： -javaagent:/home/xxx/org.jacoco.agent-0.8.5-runtime.jar=includes=*,output=tcpserver,address=*,port=18513\n###### 2、获取覆盖率结果\n\t URL：/cov/getEnvCoverResult\n\t 调用方法：GET\n\t 参数：uuid(String)\n\t 返回：{\"code\":200,\"data\":{\"coverStatus\":1,\"errMsg\":\"msg\",\"lineCoverage\":100.0,\"branchCoverage\":100.0,\"logFile\":\"file content\",\"reportUrl\":\"http://\"},\"msg\":\"msg\"}\n\t 备注：\n\n### 联系我们\n#### 微信群：super-jacoco技术支持群(添加管理员二维码邀请进群)\n![image](https://dpubstatic.udache.com/static/dpubimg/31985204-6e7f-47ed-bd73-ec69b8ef63bf.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdidi%2Fsuper-jacoco","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdidi%2Fsuper-jacoco","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdidi%2Fsuper-jacoco/lists"}