Skip to content
Ameen Abozaid
Planned lessonMID-072-L04

Generating tests worth keeping

  • Lesson 4 of 6
  • Mid-level
On This Lesson 4 topics

This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.

In this lesson

keep valuable tests and discard the rest.

Planned topics

  • Ask for edge cases, error paths, boundaries, and a regression test for a known bug.
  • Tests that mirror the implementation line by line add no protection.
  • A generated test that asserts a current bug cements it; check the expected value against the requirement.
  • Use mutation testing (verify the tool and version, such as PIT, before recording) to see if new tests catch changes.
  • Delete flaky or redundant tests.
Draft outline details

Demonstration

a mutation report where generated tests kill 40% of mutants and a better edge-case test adds more.

Check your understanding

What does a surviving mutant tell you?

Show answer

No test noticed that changed behavior.

Practice

Apply this lesson with the module's lab, exercises and quiz.

Lab and exercises Quiz

Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.

Continue to next lesson

Type to search levels, phases, modules and lessons.