Geek Culture
Published in

Geek Culture

Writing a GOOD Test in TDD

Lets recap Test Driven Development or TDD process.

RED- A new test will initially fail.

GREEN- We work to get the test to pass. In other words we write minimum code/business logic required to pass the test.

REFACTOR- We finally optimize our code/ business logic and run tests again.

So what should we consider when we write a test?

Rule #1

Each test should test one item of functionality only. This means test methods should normally have a single assert…




A new tech publication by Start it up (

Recommended from Medium

DFU — Using the native USB on ESP32-S2 for flashing the firmware

Downsides of Microservices Development

Exploring GCP Cloud Function 2nd Gen

Open-source Machine Learning Database OpenMLDB v0 4.0 Product Introduction

Install Ghost on Linode as a Second Website using Server Blocks

cs373p-fall2021: Christian Pichardo Week 3

Steps to create thumbnails from video in python using moviepy

The Fearless Enemies- Game Dev Series 47

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ishan Liyanage

Ishan Liyanage

Passionate Technical Lead, Senior Software Developer and free and open source software advocate. Based in Singapore.

More from Medium

Writing Clean and Consistent Code with Static Analysis using PMD and Apex

How Does Sequence Diagram Help in Software Development?

Guide to rock solid, bug free, quality software.

Understanding Unit Test