Software Testing Assignment
1.Which one of the following types of program models is normally used to design the
integration test plan? (Remembering)
a) CFG
b) DFD
c) Structure chart
d) State chart
2. After a program has been modified, which one of the following options characterizes the
regression test cases: (Remembering)
a) All test cases
b) Test cases that execute the modified statements
c) Test cases that execute the affected or modified statements
d) Test cases that execute the unaffected statements
3.Suppose in order to estimate the number of latent errors in a program, you seed it with 100
errors of different kinds. After testing the software using its full test suite, you discover only
80 of the introduced errors. You discover 16 other errors also. Estimate the number of latent
errors in the software. (Creating)
a) 4
b) 8
c) 16
d) 20
● Explanation: Using the formula n * [(S − s) / s] for latent errors i.e.
where n = 16, S = 100 and s = 80, we get the answer as 4.
4. A function named compute-electricity-bill was written to compute the electricity bill by an
electricity distribution company. This function takes two parameters, the number of units
consumed by a customer and the corresponding customer type. The customer type is an
integer value in the range 1 to 5 indicating whether the customer is domestic, industrial,
commercial establishment, etc. The tariff depends not only the customer type, but also on the
number of units consumed. The slabs for different charges based on the units consumed are 0
to 100 units, 100 to 200 units, 200 to 500 units, and 500 units and above. How many test
cases are required for weak equivalence class test testing of the function
compute-electricity-bill ? (Remembering)
a) 4
b) 5
c) 8
d) 10
Explanation: There are many possible ways to find the test cases.
4. For the function compute-electricity-bill described in question 4 above, at least how many
test cases are required for strong equivalence class testing of the function ? (Remembering)
a) 10
b) 11
c) 20
d) 21
Explanation: All the 20 cells describe a test case required for strong
equivalence class testing.
5. For the function compute-electricity-bill described in question 4 above, at least how many
test cases are required for strong robust equivalence class testing?
a) 25
b) 26
c) 30
d) 31
Explanation: Similar to the above
6. Suppose a certain function takes 5 Integer input parameters. The valid values for each
parameter forms a range of integer values. What is the minimum number of test cases
required for boundary value testing?
a) 10
b) 11
c) 20
d) 21
Explanation: Using the formula (4n + 1) for n independent variables,
where n = 5, we get 21.
7.Consider a function implementing the following policy for awarding merit cum means
scholarship to the students. No students would be considered for the scholarship if he is in
receipt of any other scholarship or if he is having a backlog in any subject. Further, the
parental income must be less than 1Lakh rupees per year and the student’s current CGPA
must be at least 7. However, a student with parental income upto Rs. 2 Lakhs may be awarded
the scholarship, if his/her current CGPA is at least 8. At least how many test cases are required
for conditional testing?
a) 6
b) 7
c) 8
d) 9
Explanation:
The given 7 test cases are enough for condition testing.
The first column shows that if a student is a recipient of any other
scholarship then he will not will be considered for scholarship
irrespective of any other condition. Similarly, the second column says
that if a student is having a backlog then irrespective of other values,
he will not be considered for scholarship. Thus, all the 7 test cases are
generated using the similar approach. The dashes can be considered to
be don't cares and Y represent true and N represent false.
8. If a user interface has three checkboxes, at least how many test cases are required to achieve
Pairwise coverage?
a) 3
b) 4
c) 5
d) 6
Explanation: If we use the following test cases:
(000), (010), (101), (111) , all pairs of check boxes can be covered.
9. Consider the function find-intersection(m1,c1,m2,c2) that computes the point of
intersection of two straight lines of the form y=mx+c. For equivalence class testing, at the first
level of the equivalent class hierarchy the valid and invalid equivalence classes can be formed.
The valid set of input values can be further divided into how many equivalence classes?
a) 1
b) 2
c) 3
d) 4
Explanation: The three equivalence classes are the following:
• Parallel lines (m1=m2, c1≠c2)
• Intersecting lines (m1≠m2)
• Coincident lines (m1=m2, c1=c2)