Four Pillars of a Good Test (Khorikov) (2024)

In his book “Unit Testing Principles, Practices and Patterns”, Vladimir Khorikov outlines four pillars of unit test design. This learning hour introduces them.

Summary

  • 5 min connect: test design principles
  • 10 min concept: Four pillars
  • 15 min concrete: Review sample tests
  • 20 min concrete: Write tests for WordWrap
  • 5 min conclusions: discuss which pillar your tests have most trouble with

Connect - web hunt test design principles

What test design principles do you know already?

For example people might talk about the test pyramid, or white box testing, or “don’t mock what you don’t own”.

Concept - Four pillars of a good test

Vladimir Khorikov describes these pillars of a good test in his book “Unit Testing Principles, Practices and Patterns”:

  • Protection against regressions
  • Resistance to refactoring
  • Fast feedback
  • Maintainability

Explain them.

Concrete - examine sample tests

Have them review the example test cases for MessageRenderer. For each one, which pillar(s) are in trouble?

Concrete - write tests for WordWrap

One of the pillars is “Resistance to refactoring”. That means the design of the code could change without the test needing to change. Take a look at WordWrap-TestDesign-Kata. In this exercise there are several designs for the same functionality. Write some test cases that work for any of the implementations. Aim to cover all the interesting functionality and edge cases.

Evaluate your tests against all the four pillars. In particular, “Resistance to refactoring”. What is it about this code that makes it easy to score well on that pillar?

Conclusions - how about your test code?

In your team, which of these test design pillars do you have the most trouble with? Discuss in pairs. Look for examples in your sourcecode that are particularly bad.

Four Pillars of a Good Test (Khorikov) (2024)
Top Articles
Amending Your Income Tax Return
What are the Best Budgeting Apps in Canada in 2024?
Td Youth Account
What Dinosaurs Are Scavengers In Jurassic World Evolution 2 - Stunningdino.com
Frankfurt Airport Map: Guide to FRA's Terminals
Https://Cbdwarehousestore.com/Product-Category/Liquid-Herbal-Incense/
Edgenuity Spanish 1 Semester 1 Final Exam Answers
SunTrust Shareholders Approve Merger with BB&T to Form Truist
Patriot Ledger Obits Today
El Croquis 111 - MVRDV 1997-2002.pdf - PDFCOFFEE.COM
Ari Tapio Nikki
Barbra Jane Dovey
Fighter Thrall Locations and Uses - Conan Exiles | Gamer ...
Die eID-Karte für Bürgerinnen und Bürger der EU und des EWR
Lima Crime Stoppers
Bobby Fairchild Gamefarm Prices
Goodwill Fairport
Cabelas Des Moines
Panther volleyball returns to McLeod Center for home opening weekend - UNI Athletics
Celebrity Gues Tape
Decree Of Spite Poe
Unraid Delete Share
Devil May Cry 3: Dante's Awakening walkthrough/SM04
Costco Gas Foster City
Cellabsorbv
Craigslist West Valley
Ernesto Deleon Fox
5 Things You Didn’t Know About Your Belly Button
Trumbull County Jail Commissary
Black Panther 2 Showtimes Near Epic Theatres Of Palm Coast
Airsculpt Roseville Photos
10154 W Pq Ave, Mattawan, MI 49071 | Estately 🧡 | MLS# 24049154
Excludes Notes A Symbol Used To Denote All Exclusion Notes
Young Snapchat Leaks
Marketplace Palm Coast
24 Hours Body Massage Near Me
Halloween showing of Hocus Pocus on Thirsks Outdoor cinema, Station Road,Thirsk,YO7 1QL,GB, Northallerton, 11 October 2024
Oreillys O Reilly Auto Parts
Office Truvy Login
Mychart Kki
No Hard Feelings Showtimes Near Malta Drive-In
Margate – Travel guide at Wikivoyage
Klay Thompson Finals Stats
Philipe Argillier
Chipotle Digital Kitchen Briggs Chaney
Eragon Bücher in der richtigen Reihenfolge
Dfps Provider Portal And Training Hub
Walking the Grænagil-Laugavegur loop - I Am a Polar Bear
Salmon Fest 2023 Lineup
Ixl Jobcorps
Nyu Salary Bands
Soulbound (Return of the Elves, #1)
Latest Posts
Article information

Author: Amb. Frankie Simonis

Last Updated:

Views: 6234

Rating: 4.6 / 5 (56 voted)

Reviews: 95% of readers found this page helpful

Author information

Name: Amb. Frankie Simonis

Birthday: 1998-02-19

Address: 64841 Delmar Isle, North Wiley, OR 74073

Phone: +17844167847676

Job: Forward IT Agent

Hobby: LARPing, Kitesurfing, Sewing, Digital arts, Sand art, Gardening, Dance

Introduction: My name is Amb. Frankie Simonis, I am a hilarious, enchanting, energetic, cooperative, innocent, cute, joyous person who loves writing and wants to share my knowledge and understanding with you.