ExamGecko
Question list
Search
Search

Related questions











Question 21 - CTFL-2018 discussion

Report
Export

Why is measurement of code coverage Important?

A.
Because 100% code coverage implies 100% coverage of requirements
Answers
A.
Because 100% code coverage implies 100% coverage of requirements
B.
Because 100% code coverage guarantees that there are no coding errors
Answers
B.
Because 100% code coverage guarantees that there are no coding errors
C.
Because code coverage can be used to ensure that all code is exercised by tests
Answers
C.
Because code coverage can be used to ensure that all code is exercised by tests
D.
Because code coverage can ensure that all decisions are correctly implemented in the code
Answers
D.
Because code coverage can ensure that all decisions are correctly implemented in the code
Suggested answer: C

Explanation:

Code coverage can be used to ensure that all code is exercised by tests, because it measures how much of the code or functionality of the software under test has been exercised by the test cases . Code coverage can help to identify untested or dead code, improve test design, and assess test quality . The other options are not true statements about code coverage. Option A is false, because 100% code coverage does not imply 100% coverage of requirements, as there may be defects or gaps in the requirements or in the mapping between requirements and code . Option B is false, because 100% code coverage does not guarantee that there are no coding errors, as there may be logical or functional errors that are not detected by code coverage . Option D is false, because code coverage does not ensure that all decisions are correctly implemented in the code, as it only measures whether the decisions are executed or not, but not whether they produce the correct results .

asked 18/09/2024
Francesco Gallo
33 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first