Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new metric for test/code ratio #4958

Closed
denniebouman opened this issue Dec 1, 2022 · 0 comments · Fixed by #5193
Closed

Add new metric for test/code ratio #4958

denniebouman opened this issue Dec 1, 2022 · 0 comments · Fixed by #5193
Assignees
Labels
Feature New, enhanced, or removed feature

Comments

@denniebouman
Copy link
Member

denniebouman commented Dec 1, 2022

Add new metric for test/code ratio (the ratio between the test code and the production code).

Describe the solution you'd like
This metric should give a ratio between the test code and the production code. Based on CLOC, see also #460
Sources should (or could) be:

  • CLOC output file for productioncode
  • CLOC output file for testcode

See also: https://github.com/AlDanial/cloc

Tasks:

  • New metric: "Test code ratio"
  • One supporting source: CLOC
  • When CLOC is used as source for test code ratio it should have two URL parameters, one for the JSON with the test code side and one for the JSON with the production code size. See Jenkins.py in the data model sources folder for an example of how to override the label and popup of the default URL parameter.
  • Add test code ratio collector for CLOC.
  • Update changelog
  • Check whether we can use SonarQube as well: it needs to give information per file: path, filename, size, and language: unfortunately SonarQube has no file size for test files, at least not in all languages, so SonarQube support is not possible.
@denniebouman denniebouman added the Feature New, enhanced, or removed feature label Dec 1, 2022
@fniessink fniessink self-assigned this Jan 3, 2023
@fniessink fniessink linked a pull request Jan 4, 2023 that will close this issue
fniessink added a commit that referenced this issue Jan 4, 2023
…report on the relative amount of test code. Closes #4958.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New, enhanced, or removed feature
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants