1

I want to force the developers to write unit tests for all new code they wrote. The code is written in python. I want to do it in the Jenkins pipeline. And here is a question. Is there any available Jenkins plugin that can do that? Or python library? I want to avoid sonar qube because I think, it's a little bit complex solution for the problem. I was thinking about a solution, that will detect changed files and check their code coverage percentage in generating a report.

1

I found a solution to my problem. There is a library diff-cover which does exactly what i need. Here is a link -> https://diff-cover.readthedocs.io/en/latest/README.html

0

Many Python packages exist for that purpose, one of them is the popular coverage package.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.