Best practice for unit and integration tests coverage

jacoco
java
coverage

(Roy Sela) #1

Hi guys, can you share the best practice for evaluating both unit and integration code coverage during CI?
Am I right to understand I need to wait for both test cycles to complete before scanning with the two coverage results, all in one command?
Can/should we separate the reporting of these the two test cycles coverages? it’s just that the integration cycle takes longer to complete…


(G Ann Campbell) #2

Hi,

This is something of a perennial topic. As it stands today, you cannot update an already-reported analysis with additional data. Specifically, you cannot analyze with the unit test coverage and then amend that analysis with the integration test report.

Unfortunately, yes. You have to wait for both to complete and feed them in at the same time.

Ann


(Roy Sela) #3

Thought so… can the two be reported together but separately from the code scan itself? so I can provide non-coverage metrics first and then later add the coverage on top of it?


(Nicolas Bontoux) #4

Negative. All project data is updated together as part of the analysis process (scanner execution + background task).


(Roy Sela) #5

Thought so too :frowning:

Thanks for the information!