Jens Happe

Write tests you love, not hate

How can you refactor code without breaking all your tests? Learn to decouple tests from implementation by organizing them around use cases.

Write tests you love, not hate
#1about 9 minutes

Identifying the common pains of software testing

Traditional testing approaches often lead to excessive boilerplate code, fragile tests that break on refactoring, and slow execution times that disrupt developer flow.

#2about 5 minutes

Improving test readability with the given-when-then pattern

Structuring tests using the given-when-then pattern and explicit constants makes the setup, action, and verification steps clear and easy to follow.

#3about 8 minutes

Reducing boilerplate with entity builders and trainers

The entity builder pattern simplifies test data creation, while trainer classes encapsulate the configuration of mock objects to reduce repetitive setup code.

#4about 12 minutes

Decoupling tests from implementation details

Avoid fragile tests by testing broader use cases instead of individual classes, which allows for refactoring the implementation without breaking the tests.

#5about 4 minutes

How to speed up slow test execution

Isolate tests from slow external dependencies like databases and frameworks by using clean architecture principles to focus on testing core logic.

#6about 2 minutes

The evolution of testing practices at Chrono24

A look at how Chrono24 moved from minimal automated testing to a sophisticated system with thousands of fast, use-case-driven tests.

#7about 3 minutes

Summary of key principles for better testing

A recap of the core strategies for writing useful tests, including clear structure, simplified setup, decoupling from implementation, and isolating external dependencies.

#8about 12 minutes

Q&A on testing strategies and team adoption

Answering audience questions about integration testing challenges, code abstraction, introducing new testing methods to a team, and the role of testing for junior developers.

Related jobs
Jobs that call for the skills explored in this talk.

d

Saby Company
Delebio, Italy

Junior

asasd

Expire

Remote
Junior

test

Milly
Vienna, Austria

Intermediate

Featured Partners

Related Articles

View all articles
AD
Andrew Dego
Test article 1
Test article Content Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pel...
Test article 1
BB
Benedikt Bischof
Get Old, go Slow, Write Code!
Welcome to the newest series of the WeAreDevelopers Magazine – Dev Talk Recap. This article recaps an interesting talk by Tobias Modig who gave advice about getting old(er) as a developer and slowing down. What you will learn:Thoughts of the speaker ...
Get Old, go Slow, Write Code!
DC
Daniel Cranney
The real reason we document our code
The world of software development moves fast. Technology is constantly changing, as are the tools we use with it, and even the role of a programmer is itself constantly in flux. However, some aspects of software engineering are so foundational that w...
The real reason we document our code
CH
Chris Heilmann
WeAreDevelopers LIVE days are changing - get ready to take part
Starting with this week's Web Dev Day edition of WeAreDevelopers LIVE Days, we changed the the way we run these online conferences. The main differences are:Shorter talks (half an hour tops)More interaction in Q&AA tips and tricks "Did you know" sect...
WeAreDevelopers LIVE days are changing - get ready to take part

From learning to earning

Jobs that call for the skills explored in this talk.

Test Engineer

Test Engineer

Acrolinx
Berlin, Germany

Senior
Java
Linux
Maven
PostgreSQL
Manual Testing
+2