How to achieve per-request code coverage for a Java Spring web app using OpenClover?

Quang Tiến
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 4, 2024
I'm working on an API testing project where I require continuous code coverage data for my Java Spring web app after each request. I've been using Jacoco in TCP mode with --address and --port options to gather overall coverage, exporting HTML reports to pinpoint the lines that haven't been executed. However, my goal is to obtain granular coverage information, specifically which lines are executed within each individual request. While I understand that Jacoco might not support this level of granularity, I've come across OpenClover as a potential alternative that may offer per-test coverage.

Unfortunately, I'm struggling to navigate the setup process and integrate OpenClover effectively to achieve continuous code coverage within my Java Spring web app. I'd greatly appreciate any guidance or best practices that the StackOverflow community can provide.

Here are some specific questions I have:

  1. Can OpenClover provide the per-request code coverage that I need? If so, what are the key configuration steps and considerations involved?
  2. What are the recommended approaches for integrating OpenClover with a Java Spring web app for continuous coverage collection? Are there any specific plugins or configurations that I should be aware of?
  3. Are there any alternative tools or strategies that I might explore for per-request coverage, considering the potential limitations of Jacoco? How can I effectively analyze and interpret the per-request coverage data generated by OpenClover or potentially other tools? Are there any tools or techniques that can streamline this process?

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events