Exercises

Mutation Testing and Test Suite Effectiveness

Explore mutation testing, a fault-based technique for evaluating how effectively a test suite detects small changes in program behavior. This quiz covers mutant generation, killed and surviving mutants, mutation scores, equivalent mutants, strong and weak mutation, operator selection, subsumption, boundary testing, and practical CI optimization. Questions range from foundational concepts to code-based scenarios and interpretation of mutation testing results.

Answer the questions below and check the explanation for each answer.

0/20 answered

  1. 1

    In mutation testing, what is a mutant?

  2. 2

    The diagram shows that the original program passes every test, while one test fails when mutant M1 is executed. How should M1 be classified?

    Question 2
  3. 3

    What does it mean when a non-equivalent mutant survives?

  4. 4

    The report shows 120 generated mutants, 10 equivalent mutants, and 88 killed mutants. What is the mutation score when equivalent mutants are excluded?

    Question 4
  5. 5

    The image shows an original integer function returning x + 0 and its mutant returning x. How should this mutant generally be classified?

    Question 5
  6. 6

    Under strong mutation testing, what must happen for a mutant to be killed?

  7. 7

    Which change is an example of a relational operator replacement mutation?

  8. 8

    An original condition grants free admission when age < 18, while the mutant uses age <= 18. Which input most directly kills the mutant?

    Question 8
  9. 9

    What does the coupling effect suggest in mutation testing?

  10. 10

    How can mutation results support test case prioritization?

  11. 11

    Why are flaky tests especially problematic during mutation analysis?

  12. 12

    In the illustrated mutation workflow, which status belongs on the branch where at least one test fails for a mutant?

    Question 12
  13. 13

    A kill matrix shows that mutant M1 is killed by tests T1 and T2, while mutant M2 is killed only by T2. Which mutant is harder for this test suite to kill?

    Question 13
  14. 14

    What can validly be concluded from a 100% mutation score?

  15. 15

    What is the primary purpose of selective mutation?

  16. 16

    The original function returns a + b, while its mutant returns a - b. Which input kills this mutant?

    Question 16
  17. 17

    A mutant causes the test suite to exceed its timeout. What is the most responsible initial treatment?

  18. 18

    How does mutation testing differ from statement coverage?

  19. 19

    An original discount condition is isMember && cartTotal >= 50. A mutant changes && to ||. Which test input exposes the difference?

    Question 19
  20. 20

    Which approach most effectively reduces mutation testing time in a continuous integration pipeline while retaining useful feedback?

Video Courses

Courses related to this topic

See all video courses

Download the App now to have access to + 5000 free courses, exercises, certificates and lots of content without paying anything!

  • 100% free online courses from start to finish

    Thousands of online courses in video, ebooks and audiobooks.

  • More than 60 thousand free exercises

    To test your knowledge during online courses

  • Valid free Digital Certificate with QR Code

    Generated directly from your cell phone's photo gallery and sent to your email

Cursa app on the ebook screen, the video course screen and the course exercises screen, plus the course completion certificate