Recall & Review
beginner
What is a code coverage report in Jenkins?
A code coverage report shows how much of your source code is tested by automated tests. It helps find untested parts to improve quality.
Click to reveal answer
beginner
Which Jenkins plugin is commonly used to generate code coverage reports?
The 'JaCoCo' plugin is commonly used in Jenkins to collect and display Java code coverage reports.
Click to reveal answer
intermediate
How do you publish a JaCoCo code coverage report in a Jenkins pipeline?
Use the 'jacoco' step in your Jenkinsfile after tests run, for example:
jacoco execPattern: '**/jacoco.exec'This publishes the coverage report in Jenkins UI.
Click to reveal answer
beginner
What does a high code coverage percentage mean?
It means most of your code is tested by automated tests, which usually leads to fewer bugs and better software quality.
Click to reveal answer
intermediate
Can code coverage reports guarantee bug-free software?
No, code coverage shows tested code parts but does not guarantee no bugs. Tests must be well written and cover important cases.
Click to reveal answer
What is the main purpose of code coverage reports in Jenkins?
✗ Incorrect
Code coverage reports help identify which parts of the code are tested, improving test completeness.
Which plugin is typically used in Jenkins for Java code coverage?
✗ Incorrect
JaCoCo plugin collects and displays Java code coverage reports in Jenkins.
In a Jenkins pipeline, where should the code coverage step be placed?
✗ Incorrect
Code coverage is collected after tests run to analyze which code was executed.
What does a low code coverage percentage indicate?
✗ Incorrect
Low coverage means many code parts lack automated tests.
Does 100% code coverage guarantee no bugs?
✗ Incorrect
Even full coverage can't guarantee no bugs if tests don't check all scenarios.
Explain what a code coverage report is and why it is useful in Jenkins pipelines.
Think about how tests relate to code parts.
You got /3 concepts.
Describe how to set up and publish a JaCoCo code coverage report in a Jenkins pipeline.
Focus on the pipeline steps and plugin usage.
You got /4 concepts.