abapOpenChecks
abapOpenChecks copied to clipboard
Check Unit Test with code coverage
I worked a little bit on the topic unit test with code coverage and would implement this in a test. How do you see the topic?
There is already https://docs.abapopenchecks.org/checks/64/ which runs the unit tests for a class with coverage, if the unit test does not run any of the code in the class it reports an error
Yes, I saw this once. But we started to think about a defined required coverage (e.g. 70% statement coverage) on transport release. I checked RFC function GET_COVERAGE_FOR_OBJECT_LIST - but at least with our release, it does not work correctly. I assume it is bound to a running SCOV. So I used the internal test runner, that returned the correct results. I think we could do a check with parameters vor Branch, Statement or Procedure Coverage and the required percentage.
okay, cool
I think we should extend check 64 with the possibility to require a percentage covered
@larshp well I made the change, how can I stage/pull it? Via an own repository? The class is still the old one and therefore bound to you repo. is there a docu for dummies?
https://opensource.guide/how-to-contribute/#opening-a-pull-request
- fork project
- create branch for changes
- commit and push your changes to that branch
- open a pull request, reference the issue number in the PR
this is also mentioned in issue #582
also #450 is relevant