abapOpenChecks icon indicating copy to clipboard operation
abapOpenChecks copied to clipboard

Check Unit Test with code coverage

Open creyj opened this issue 5 years ago • 7 comments

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?

creyj avatar Nov 12 '19 10:11 creyj

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

larshp avatar Nov 12 '19 10:11 larshp

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.

creyj avatar Nov 12 '19 23:11 creyj

okay, cool

I think we should extend check 64 with the possibility to require a percentage covered

larshp avatar Nov 14 '19 06:11 larshp

@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?

creyj avatar Nov 14 '19 16:11 creyj

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

g-back avatar Nov 14 '19 18:11 g-back

this is also mentioned in issue #582

DennstedtB avatar Nov 27 '19 08:11 DennstedtB

also #450 is relevant

larshp avatar Nov 27 '19 15:11 larshp