Module · 5 lessons

Writing Quality, Tested Code

Clean code practices, the testing pyramid, behaviour-driven development, and the Gherkin language, all verified for real against Ledgerly, a small invoicing app.

At a glance

Level
Intermediate
Lessons
5 lessons
Time to complete
1 week
Cost
Free forever · no sign-up

Welcome to Writing Quality, Tested Code, the third module of the Software Engineering Fundamentals course. Good architecture from Module 2 only pays off if the code inside it stays readable and correct as it changes. You’ll start with clean code: naming, function size, and error handling, turning a tangled invoice-total function from Ledgerly into five small, well-named pieces.

From there, you’ll build a real automated safety net. You’ll learn the testing pyramid, write unit tests with test doubles instead of hitting a real payment gateway, and see what test coverage does and doesn’t guarantee. The module then adds behaviour-driven development: writing scenarios in a shared language business and engineering both understand, and the Gherkin syntax — Feature, Scenario, Background, Scenario Outline — that makes those scenarios executable. A guided project closes the module by cleaning, testing, and specifying a real subscription-pause feature end to end.

Every test in this module runs for real and passes for real. Start with Lesson 1, where you’ll clean up Ledgerly’s messiest function.

Lessons in this module

Achievement

Complete all 5 lessons to finish the Writing Quality, Tested Code module.

Start module
Sponsor

Keep DATATWEETS free. Help fund practical data, AI, and engineering lessons for learners worldwide.

Buy Me a Coffee at ko-fi.com