NPTEL Software Testing Week 2 Assignment Answers 2025

NPTEL Software Testing Week 2 Assignment Answers 2025

1. Which one of the following is an implicit assumption made in equivalence class testing?

a. A program behaves in similar ways to every input value belonging to an equivalence class.
b. Different equivalence classes of a program contain similar bugs
c. Different equivalence classes of a program contain dissimilar bugs
d. Equivalence classes define the behaviorally similar components of a program
e. Equivalence classes define the behaviorally similar code segments of a program

Answer :- For Answers Click Here 

2.

Answer :- 

3. For the function compute-interest-rate of Q. 2, at least how many test cases are needed for strong equivalence testing?

а. 3
b. 6
C. 8
d. 9
e. 12

Answer :- 

4.

Answer :- 

5. Consider the following code snippet.
if(i>j) then
if(i>k) then max=i;
else max=k;
else ifj>k) max=j
else max=k;
What would be the basic condition coverage achieved, for a test case with the input values i=5, j=6, k=7?

a. 20%
b. 33.3%
C. 40%
d. 66.6%
e. 100%

Answer :- 

6. Which of the following are white-box testing techniques?

a. Statement coverage
b. Cause-effect graphing
c. MC/DC
d. Pair-wise testing
e. Mutation testing
f. Data flow testing

Answer :- For Answers Click Here 

7. Consider a function named solver that solves a quadratic equation of the form ax2+bx+e=0, where a, b, and e are floating point numbers. At least how many test cases are needed for equivalence class testing of the function solver considering only valid equivalence classes?

a. 2
b. 3
c. 4
d. 5
e. 9

Answer :- 

8. Consider a function named compute-grade that computes the grade of a student based on his
attendance and the total marks obtained out of 100. If the attendance is below 80%, the student is assigned “F” grade irrespective of the marks scored. If the attendance of a student is 80% or more, the student with mark M is assigned a grade from EX, A, B, C, D, P, F depending upon whether M>89%, 90%>M>79%, 80%>M>69%, 70%>M>59%, 60%>M>49%, 50%>M>29%, ог
M<30%. If the decision making about the grade computation is represented in the form of a
decision table, how many test cases are needed for decision table testing?

a. 6
b. 7
с. 8
d. 10
e. 12

Answer :- 

9. If a user interface has two check boxes, at least how many test cases are required to achieve pair- wise coverage?

а. 3
b. 4
c. 5
d. 6
e. 7

Answer :- 

10. Consider the function find-intersection(m1,c1,m2,c2) that computes the point of intersection of two straight lines of the form y=mxte. 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?

а. 1
b. 2
c. 3
d. 4
e. 5

Answer :- For Answers Click Here 
Scroll to Top