Question 1
Which of the following represents the order in which artifacts are written in test driven development?
Code followed by test cases.
Test cases followed by code.
The IIT Madras BS Software Testing (Software Testing) Quiz 1 paper sat on 16 Oct 2022, in the September 2022 term, set QPG3: 13 questions for 63 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.
Which of the following represents the order in which artifacts are written in test driven development?
Code followed by test cases.
Test cases followed by code.
Correct answer
Test cases followed by code.
1-B, 2-C, 3-A
1-C, 2-A, 3-B
1-C, 2-B, 3-A
1-B, 2-A, 3-C
Correct answer
1-C, 2-A, 3-B
A test case is said to have passed when which of the following holds?
The actual output is different from expected output but there is no error
The actual output is the same as the expected output.
The software produces an output successfully upon giving an input.
There is a message that there is no error from the program
Correct answer
The actual output is the same as the expected output.
Which of the following represents the correct order of subsumption amongst data-flow coverage criteria in graphs? Read the symbol → below as “subsumes”.
All-defs-coverage → all-du-paths-coverage → all-uses-coverage
All-defs-coverage → all-uses-coverage → all-du-paths-coverage.
All-du-paths-coverage → all-uses-coverage → all-defs-coverage
All-du-paths-coverage → all-defs-coverage → all-uses-coverage
Correct answer
All-du-paths-coverage → all-uses-coverage → all-defs-coverage
It accepts all the binary strings that have an odd number of 0s.
It accepts all the binary strings that have an odd number of 1s.
It accepts all the binary strings that have an odd number of 0s and an oddnumber of 1s.
It accepts all the binary strings that have an even number of 0s and an evennumber of 1s.
Correct answer
It accepts all the binary strings that have an odd number of 0s and an oddnumber of 1s.
For a tester to observe an error or a fault in a particular location of a program, which of the following should be true together?
The location of the program should be reachable by the test case given by thetester.
The state of the program must be incorrect at that location of the program.
The final state of the program should be incorrect.
The tester should see the error in the program.
Correct answers
The location of the program should be reachable by the test case given by thetester.
The state of the program must be incorrect at that location of the program.
The final state of the program should be incorrect.
a=5, b=7
a=5, b=5
a=8, b=7
a=0, b=1
Correct answers
a=5, b=7
a=0, b=1
Correct answer: 3
Consider the annotated CFG (for dataflow coverage) given below and answer the given subquestions.
Consider the annotated CFG (for dataflow coverage) given below and answer the given subquestions.
How many du-pairs are there for the variable n?
6
7
8
9
Correct answer
6
Consider the annotated CFG (for dataflow coverage) given below and answer the given subquestions.
Consider the annotated CFG (for dataflow coverage) given below and answer the given subquestions.
How many unique du-paths are there for the variable n?
5
6
7
8
Correct answer
6
Consider the CFG given below and answer the given subquestions.
Consider the CFG given below and answer the given subquestions.
How many test requirements are there for edge-pair coverage?
10
11
12
13
Correct answer
10
Consider the CFG given below and answer the given subquestions.
Consider the CFG given below and answer the given subquestions.
How many simple paths are present in the given CFG?
25
27
29
31
Correct answer
27
Consider the CFG given below and answer the given subquestions.
Consider the CFG given below and answer the given subquestions.
How many test requirements are there for prime path coverage?
8
9
10
11
Correct answer
10