{"id":18888950,"url":"https://github.com/naver/cover-checker","last_synced_at":"2025-04-14T23:21:51.117Z","repository":{"id":54624750,"uuid":"160304314","full_name":"naver/cover-checker","owner":"naver","description":"Check your pull request code coverage","archived":false,"fork":false,"pushed_at":"2023-06-27T01:31:28.000Z","size":276,"stargazers_count":65,"open_issues_count":3,"forks_count":15,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-03-28T11:21:18.611Z","etag":null,"topics":["cobertura","code-coverage","jacoco","java"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/naver.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-12-04T05:35:37.000Z","updated_at":"2025-02-12T20:54:03.000Z","dependencies_parsed_at":"2024-11-08T07:47:01.679Z","dependency_job_id":"055afe8c-7207-430a-a4e5-9c0ea4b33a1f","html_url":"https://github.com/naver/cover-checker","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naver%2Fcover-checker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naver%2Fcover-checker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naver%2Fcover-checker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naver%2Fcover-checker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/naver","download_url":"https://codeload.github.com/naver/cover-checker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248975716,"owners_count":21192275,"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":["cobertura","code-coverage","jacoco","java"],"created_at":"2024-11-08T07:46:46.466Z","updated_at":"2025-04-14T23:21:51.084Z","avatar_url":"https://github.com/naver.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Coverage Checker [![Build Status](https://travis-ci.org/naver/cover-checker.svg?branch=master)](https://travis-ci.org/naver/cover-checker)\n\nCoverChecker provides a test coverage for new added lines of code.\nIf you create new pull request, CoverChecker would give feedback regarding how much of the new lines your test code has covered.\n\nGood Test code makes people find bug more efficiently before service release and prevents service from being disabled.\nTo check the test code quality, most of developers refer the code coverage status as an important index.\nThis is why most of them spend their resources to update their test code to achieve more code coverage whenever they add new lines of code.\nHowever, it has been hard to check and improve the code coverage as there are lots of old legacy codes which is not within the scope of the current test code.\n\n\u003e [Spring REST doc](https://spring.io/projects/spring-restdocs) is one of spring component. it makes api document from test code.\n\nCoverChecker provides a feature to check the code coverage for new added code, not a whole code.\nIt will reduce the pressure to cover the whole and help you to achieve more coverage steadly and efficiently.\nMakes your code more durable!\n\n# CoverChecker do...\n\n![example](doc/example.png)\n\n- Find new code line from pull request\n- Get test coverage each file from coverage report\n- Combine information and check test code cover new code line\n- Write report on pull request\n- CoverChecker will fail when coverage doesn't satisfy your goal\n\n# Run with jenkins\n\n1. Install jdk 8 on your ci\n2. Build CoverChecker\n3. Fix your project to generate test coverage report(CoverChecker only Jacoco or Cobertura)\n4. Execute CoverChecker in you build job\n\n# How to build\n\nUse maven wrapper\n\n```sh\n./gradlew clean build jar\n```\n\nthen maven would make jar `cover-checker-console/build/libs/cover-checker-${version}-all.jar`\n\n# Create access token\n\nCreate an [access token](https://github.com/settings/tokens/new?scopes=repo\u0026description=cover-checker)\n\n# Execute with parameter\n\n```sh\njava -jar cover-checker-console/build/libs/cover-checker-${version}-all.jar \\\n    --cover ${coverageReportPath} \\\n    [--cover ${otherCoverageReportPath}] \\\n    --github-token ${githubAccessToken} \\\n    --repo ${githubRepositoryPath} \\\n    --threshold ${coverageThreshold} \\\n    --github-url ${githubHost} \\\n    --pr ${pullrequestNo} \\\n    [-type (jacoco | cobertura)]\n```\n\nNote that both the `--cover` and `-type` parameters can be specified multiple times and are associated positionally.\n\nFor example, if you have two coverage reports in different formats, you can specify them like this:\n\n```sh\njava -jar cover-checker-console/build/libs/cover-checker-${version}-all.jar \\\n    -type jacoco --cover jacoco.xml \\\n    -type cobertura --cover cobertura.xml \\\n    ... # other parameters\n```\n\n### Parameter\n\n```sh\nusage: coverchecker.jar -c \u003carg\u003e [-d \u003carg\u003e] [-dt \u003carg\u003e] [-ft \u003carg\u003e] [-g \u003carg\u003e]\n       [-p \u003carg\u003e] [-r \u003carg\u003e] -t \u003carg\u003e [-type \u003carg\u003e] [-u \u003carg\u003e]\n-c,--cover \u003carg\u003e          coverage report paths(absolute recommend), coverage\n                          report path can take multiple paths for multi-module\n                          project\n-d,--diff \u003carg\u003e           diff file path(absolute recommend)\n-dt,--diff-type \u003carg\u003e     diff type (github | file)\n-ft,--file-threshold \u003carg\u003ecoverage report type (jacoco | cobertura) default is\n                          jacoco\n-g,--github-token \u003carg\u003e   github oauth token\n-p,--pr \u003carg\u003e             github pr number\n-r,--repo \u003carg\u003e           github repo\n-t,--threshold \u003carg\u003e      coverage pass threshold\n-type \u003carg\u003e               coverage report type (jacoco | cobertura) default is\n                          jacoco\n-u,--github-url \u003carg\u003e     The url when you working on github enterprise url.\n                          default is api.github.com\n```\n\n## License\n\n```\nCopyright 2018 NAVER Corp.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaver%2Fcover-checker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnaver%2Fcover-checker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaver%2Fcover-checker/lists"}