Session

Advanced Code Coverage with Jenkins and API Mocking

In 2015-2018, I talked about how to use the Jenkins Pipeline and custom libraries to do advanced integration tests and analyze code coverage. Coverage plugins were rather weak, and one needed some scripts and hacks to make it work, and to DIY for distributed testing. In 2021 the situation has changed significantly thanks to the Code Coverage and Checks API plugins. Distributed integration testing also became easier thanks to better coverage collectors and integrations with API mocking tools. So, good time to be alive… and use Jenkins!

We will talk about how modern Jenkins allows you to improve and analyze code coverage. We will talk about unit and integration testing with WireMock, Code Coverage API Plugin, support for standard formats (Cobertura, JaCoCo, gcov, JUnit, etc.), parallelization for heavy integration tests and API mocking, and integration with GitHub Checks API. How can you analyze code coverage in Jenkins and when do you need to create your own libraries? And what’s the fuzz about Testcontainers and WireMock for integration testing?

I will talk about how modern Jenkins supports code coverage analysis. We will talk about Jenkins Pipeline, Code Coverage API Plugin, support for standard formats (Cobertura, JaCoCo, gcov, etc.), test parallelization, and integration with GitHub Checks API.

Outline:
- Introduction into code coverage in CI
- How was it in Jenkins before?
- Code Coverage API, and modern integrations and reporting
- GitHub integrations through GitHub Checks for “shift left” reporting
- Live Demo for a Java project
- Going further with Integration tests. How do WireMock and Testcontainers help?
- Live Demos

Public Abstract Google Doc: https://docs.google.com/document/d/1RyKhKIjiOMVOsNk386xUUD9yBCNLQyhQ3LKnRK1_SNE/edit?usp=sharing

Oleg Nenashev

Community Builder, CNCF Ambassador, Jenkins core maintainer

Neuchâtel, Switzerland

View Speaker Profile

Please note that Sessionize is not responsible for the accuracy or validity of the data provided by speakers. If you suspect this profile to be fake or spam, please let us know.

Jump to top