Skip to content
Ameen Abozaid
Planned lessonJNR-054-L04

From bug to regression test

  • Lesson 4 of 6
  • Junior
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

lock in the fix with a test.

Planned topics

  • First write a test that reproduces the bug and fails.
  • Then fix the code until the test passes.
  • Choose the lowest test level that reproduces it: unit if possible, integration if it depends on the database.
  • The test name describes the behavior: acceptsOrderWithoutCoupon.
  • A short bug report records symptom, root cause, fix, and the test.
Draft outline details

Demonstration

a bug report template: Symptom, Steps to reproduce, Root cause, Fix, Regression test, Prevention.

Check your understanding

When do you write the regression test?

Show answer

Before the fix, so you see it fail.

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.