Question 1
When applying logic criteria to programs, predicates are taken from which of the following statements.
for/while loops.
Variable assignment statements like a=5 or a=b+c.
Switch case statements.
If statements.
The IIT Madras BS Software Testing (Software Testing) Quiz 2 paper sat on 20 Nov 2022, in the September 2022 term: 12 questions for 75 marks in 120 minutes. Every question is below with its answer. Take it as a timed mock test to be marked, or read it through first.
When applying logic criteria to programs, predicates are taken from which of the following statements.
for/while loops.
Variable assignment statements like a=5 or a=b+c.
Switch case statements.
If statements.
Correct answers
for/while loops.
Switch case statements.
If statements.
Consider the following CFG.
Consider the following CFG.
What is the number of prime paths for the above CFG?
5
6
7
8
Correct answer
6
Consider a software system that computes the monthly electricity charges for domestic usage. The input to the system is an integer that represents the units of electricity consumed, and the output is the electricity bill amount (a real value that is computed as the units consumed X unit charges).
The charge per unit is as follows:
Consider a software system that computes the monthly electricity charges for domestic usage. The input to the system is an integer that represents the units of electricity consumed, and the output is the electricity bill amount (a real value that is computed as the units consumed X unit charges).
The charge per unit is as follows:
What is the minimum number of test cases to be prepared for testing the software system using equivalence class partitioning technique?
3
4
5
6
Correct answer
5
Match the following regarding data flow graphs.
Match the following regarding data flow graphs.
1-D, 2-C, 3-B, 4-A
1-B, 2-A, 3-C, 4-D
1-C, 2-D, 3-A, 4-B
1-B, 2-A, 3-D, 4-C
Correct answer
1-C, 2-D, 3-A, 4-B
Which of the integration testing approaches starts with the top-level modules as well as the lowest-level modules, followed by the middle-level modules?
Top-down approach
Bottom-up approach
Sandwich approach
Big bang approach
Correct answer
Sandwich approach
Consider an integration testing scenario where two units access the same data file. Identify the type of coupling based on the interfaces for this scenario.
Parameter coupling
Shared data coupling
External device coupling
Message-passing interfaces:
Correct answer
External device coupling
When it comes to partition-based testing with multiple inputs, which of the following techniques is better than the others?
Equivalence partitioning.
Boundary value analysis.
Partitions and functional testing.
Decision tables.
Correct answer
Decision tables.
For the given subquestions, consider a function called NextDate which takes as input a valid date in mm/dd/yyyy (month followed by date followed by year) format and computes the date of the next day. For example, given 06/14/1996, the NextDate function will return 06/15/1996> and when given 02/28/2019>, the NextDate function will return 03/01/2019. Answer the given subquestions regarding input space partitioning test cases for the NextDate function.
What are the variables involved in the NextDate function input?
Month, day and year.
Date containing month, day and year.
Today’s date.
Range of dates.
Correct answer
Date containing month, day and year.
For the given subquestions, consider a function called NextDate which takes as input a valid date in mm/dd/yyyy (month followed by date followed by year) format and computes the date of the next day. For example, given 06/14/1996, the NextDate function will return 06/15/1996> and when given 02/28/2019>, the NextDate function will return 03/01/2019. Answer the given subquestions regarding input space partitioning test cases for the NextDate function.
Which of the following are valid partitions for the day, as a part of the input to the NextDate function?
Only one partition: 1 ≤ day ≤ 31.
Two partitions: (1) day > 1 and (2) 30 ≤ day ≤ 31.
Three partitions: (1) 1 ≤ day ≤ 29, (2) day = 30 and (3) day = 31.
Four partitions: (1) 1 ≤ day ≤ 28, (2) day = 29, (3) day = 30 and (4) day = 31.
Correct answer
Four partitions: (1) 1 ≤ day ≤ 28, (2) day = 29, (3) day = 30 and (4) day = 31.
For the given subquestions, consider a function called NextDate which takes as input a valid date in mm/dd/yyyy (month followed by date followed by year) format and computes the date of the next day. For example, given 06/14/1996, the NextDate function will return 06/15/1996> and when given 02/28/2019>, the NextDate function will return 03/01/2019. Answer the given subquestions regarding input space partitioning test cases for the NextDate function.
State true or false: The partition
(1) {month: month has 30 days}, (2) {month: month has 31 days}, (3) {month: month is February}
is a valid partition for a month as a part of the input to the NextDate function?
True.
False.
Correct answer
True.
GACC (General Active Clause Coverage)
RACC (Restricted Active Clause Coverage)
RICC (Restricted Inactive Clause Coverage)
GICC (General Inactive Clause Coverage)
Correct answer
RICC (Restricted Inactive Clause Coverage)
Which rows in the given truth table will make the predicate p false?
Rows 5,7 and 8.
Rows 4,6 and 7.
Rows 5,6 and 8.
Rows 1,2,3 and 4.
Correct answer
Rows 5,6 and 8.