Given 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 ? 

This question was previously asked in
NIELIT Scientific Assistant CS 5 Dec 2021 Official Paper
View all NIELIT Scientific Assistant Papers >
  1. S1 is True, S2 is True
  2. S1 is True, S2 is False
  3. S1 is False, S2 is True 
  4. S1 is False, S2 is False

Answer (Detailed Solution Below)

Option 1 : S1 is True, S2 is True
Free
NIELIT Scientific Assistant Quantitative Aptitude Mock Test
0.5 K Users
20 Questions 20 Marks 30 Mins

Detailed Solution

Download Solution PDF

The correct answer is Option 1.

key-point-image Key Points
  • 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.
additional-information-image Additional Information
  • 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.
Latest NIELIT Scientific Assistant Updates

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).

More Software Testing Questions

Get Free Access Now
Hot Links: teen patti master purana teen patti joy vip teen patti plus teen patti wink