NPTEL Software Testing Week 1 And 2 Assignment Answers 2025

NPTEL Software Testing Week 1 And 2 Assignment Answers 2025

1. Which of the following statements describe a failure of a software?


a. A programmer misunderstood a part of the specification
b. A user notices that the results produced do not match with what it should be
c. An expression in C code uses the operator ‘-‘, was used by oversight in place of ‘+’
d. A program crashes when a tester enters a valid input
e. A reviewer reports that he/she has found a defect in the code

βœ… Answer: b, d
πŸ“ Explanation:

  • Failures are observable deviations of the software from expected behavior.
  • (b) and (d) describe symptoms experienced during execution.

2. About half the effort of development is spent on testing, but it takes only 10% of time. Why?


a. A team has too many coders as compared to testers
b. Testing permits many parallel activities
c. A team has too many designers as compared to coders
d. Testers are more proficient than developers
e. Managers force testers to work overtime

βœ… Answer: b
πŸ“ Explanation:
Testing often allows multiple test cases, scripts, and tools to run in parallel, especially in automated environments.

3. Which of the following are true concerning verification in waterfall model?


a. Carried out by the testers
b. Carried out by the developers
c. Involves both static and dynamic activities
d. Involves only static activities
e. Involves only dynamic activities

βœ… Answer: b, c
πŸ“ Explanation:

  • Verification checks if the product is being built correctly and includes reviews, walkthroughs, inspections, etc.
  • While primarily static, some dynamic analysis might also be involved.

4. Which one of the following statements is true concerning unit testing?


a. Carried out by the developers
b. Involves testing the system as a whole
c. Often carried out by a separate testing team
d. Carried out by the customers
e. Concerns validation of system functions

βœ… Answer: a
πŸ“ Explanation:
Unit testing involves testing individual modules/components and is typically done by developers.

5. Which of the following statements are NOT implied by the pesticide paradox?


a. A software can be tested by repeated application of a testing methodology
b. A software should be tested by successive application of a wide range of testing methodologies
c. The best testing methodology should be used towards the end of the testing phase
d. A software should be tested by deploying the best among all the testing methodologies
e. Any testing methodology is effective only for certain types of errors

βœ… Answer: a, c, d
πŸ“ Explanation:
The pesticide paradox says repeating the same tests won’t find new bugs. Therefore, test approaches must evolve.

6. Which one of the following is true concerning integration testing?

Options:
a. Carried out by the developers
b. Involves testing the system as a whole
c. Often carried out by a separate testing team
d. Carried out by the customers
e. Concerns validation of system functions

βœ… Answer: c
πŸ“ Explanation:
Integration testing is often conducted by a specialized testing team to ensure interaction between components.

7. What is the purpose of smoke testing?


a. Check sanity of the developed system
b. Carry out a final round of testing of the software after black-box and white-box test are over
c. Carry out performance testing
d. Carry out monkey testing
e. Try multiple test cases concurrently to singe the system

βœ… Answer: a
πŸ“ Explanation:
Smoke testing is a quick, basic test to check if the build is stable enough for further testing.

8. Which of the following should NOT normally be an objective of a test team?


a. To find faults in the software
b. To assess whether the software is ready for release
c. To crash the software using negative test cases
d. To demonstrate that the software doesn’t work
e. To prove that the software is correct

βœ… Answer: e
πŸ“ Explanation:
Testing can reveal the presence of defects, not their absence. So the goal is not to prove it’s correct.

9. Which one of the following activities is a validation activity?


a. Design inspection
b. Acceptance testing
c. Code inspection
d. Simulation
e. Unit testing

βœ… Answer: b
πŸ“ Explanation:
Validation checks if you’re building the right product. Acceptance testing is validation done from a user/customer perspective.

10. Which of the following are not true of the V model?


a. During requirements specification phase, system test cases are designed
b. During design phase, integration test cases are designed
c. During coding phase, unit test cases are designed
d. During design phase, unit test cases are designed
e. During requirements specification phase, integration test cases are designed

βœ… Answer: c, e
πŸ“ Explanation:

  • Unit test cases are not designed during coding; they are often planned earlier.
  • Integration test cases are designed during architectural design, not during requirement specification.

NPTEL Software Testing Week 2 Assignment Answers

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

Options:
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: a

2.

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


a. 3
b. 6
c. 8
d. 9
e. 12

βœ… Answer: b

4.

5. Consider the following code snippet:

cCopyEditif(i > j)
   if(i > k)
      max = i;
   else
      max = k;
else if(j > 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: b

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: a, c, e, f
πŸ“ Explanation:

  • White-box testing = test internal logic, paths, and statements.
  • (b) and (d) are black-box techniques.

7. Consider a function solver(a, b, c) solving axΒ² + bx + c = 0. How many test cases are needed for equivalence class testing (only valid inputs)?


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

βœ… Answer: b
πŸ“ Explanation:
Valid classes:

  • Two real & distinct roots
  • Two equal real roots
  • No real roots (complex)

8. Consider a function compute-grade(attendance, marks). Based on the described grading logic, how many test cases are needed for decision table testing?


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

βœ… Answer: c
πŸ“ Explanation:

  • 1 test case for attendance < 80%
  • 7 test cases for attendance β‰₯ 80% and marks in different ranges = 1 + 7 = 8

9. If a user interface has two checkboxes, how many test cases are required for pair-wise coverage?


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

βœ… Answer: b
πŸ“ Explanation:
Two binary options (Yes/No or Checked/Unchecked):
2 Γ— 2 = 4 combinations

10. Consider find-intersection(m1, c1, m2, c2) for y = mx + c lines. For valid input, how many equivalence classes can be defined?


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

βœ… Answer: c
πŸ“ Explanation:
Valid input cases:

  1. Intersecting lines (m1 β‰  m2)
  2. Parallel lines (m1 = m2, c1 β‰  c2)
  3. Coincident lines (m1 = m2, c1 = c2)

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top