Question
Download Solution PDFGiven the two statements S1 and S2 for software engineering :
S1 : Statement coverage cannot guarantee execution of loops in program under test.
S2 : Use of independent path testing criterion guarantees execution of each loop in a program under test more than once.
Then which among the following is true ?
Answer (Detailed Solution Below)
Detailed Solution
Download Solution PDFThe correct answer is Option 1.
- S1: Statement coverage cannot guarantee execution of loops in program under test.
- Statement coverage ensures that each statement in the code is executed at least once. However, it does not ensure that all possible paths through a loop are executed, especially if the loop can execute multiple times.
- S2: Use of independent path testing criterion guarantees execution of each loop in a program under test more than once.
- Independent path testing involves testing all possible paths through the code, which includes ensuring that loops are executed enough times to cover all independent paths. This means that each loop will be executed more than once, if necessary, to cover those paths.
- Statement coverage is a basic testing criterion, but it does not account for the complexity of loops and conditional paths in the code.
- Independent path testing is a more thorough approach as it ensures that all possible execution paths, including those within loops, are tested.
- Both S1 and S2 are true, making Option 1 the correct answer.
Last updated on Feb 20, 2025
-> A total number of 113 revised vacancies have been announced for the post of Scientific Assistant in Computer Science (CS), Information Technology (IT), and Electronics & Communication (EC) streams.
-> Online application form, last date has been extended up to from 17th April 2025.
->The NIELT has revised the Essential Qualifications for the post of Scientific Assistant. Candidates must possess (M.Sc.)/ (MS)/ (MCA) / (B.E.)/ (B.Tech) in relevant disciplines.
-> The NIELIT Scientific Assistant 2025 Notification has been released by the National Institute of Electronics and Information Technology (NIELIT).