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

Check Unit Test with code coverage #859

Open
creyj opened this issue Nov 12, 2019 · 7 comments
Open

Check Unit Test with code coverage #859

creyj opened this issue Nov 12, 2019 · 7 comments

Comments

@creyj
Copy link

creyj commented Nov 12, 2019

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?

@larshp
Copy link
Owner

larshp commented Nov 12, 2019

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

@creyj
Copy link
Author

creyj commented Nov 12, 2019

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.

@larshp
Copy link
Owner

larshp commented Nov 14, 2019

okay, cool

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

@creyj
Copy link
Author

creyj commented Nov 14, 2019

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

@g-back
Copy link
Contributor

g-back commented Nov 14, 2019

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

@DennstedtB
Copy link
Contributor

this is also mentioned in issue #582

@larshp
Copy link
Owner

larshp commented Nov 27, 2019

also #450 is relevant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants