Daniel Raniz Raneland
Three-and-a-half Ways of Testing your Repositories
#1about 5 minutes
Introduction to repositories in domain-driven design
Repositories act as an abstraction layer between the domain and infrastructure, separating business logic from data persistence concerns.
#2about 9 minutes
Mocking the client API for fast and isolated tests
The first method involves replacing the backend client, like an S3 client, with a mock object to verify that the correct methods are called.
#3about 8 minutes
Mocking the backend service for client-agnostic tests
Instead of mocking the client library, you can intercept and mock the HTTP requests it makes to the backend service, like DynamoDB.
#4about 3 minutes
The brittleness of mocking SQL statements directly
Asserting on exact SQL strings is a fragile approach because minor refactoring, like adding parameters, will break the tests.
#5about 6 minutes
Testing against a real, persistent database service
Using a shared development or staging database provides a realistic environment but introduces significant challenges with state management and cleanup.
#6about 7 minutes
Using temporary services with Testcontainers for reliable tests
Testcontainers allows you to programmatically spin up ephemeral database instances in Docker, enabling realistic and isolated roundtrip testing.
#7about 4 minutes
Comparing the pros and cons of each testing method
A final summary compares the speed, complexity, and implementation coupling of client mocking, service mocking, and testing against real or temporary services.
#8about 15 minutes
Q&A on testing strategies and CI/CD integration
The Q&A covers choosing mocking frameworks, balancing unit and integration tests, handling data migrations, and integrating repository tests into CI/CD pipelines.
Related jobs
Jobs that call for the skills explored in this talk.
Matching moments
02:36 MIN
Understanding the principles of test-driven development
Test-Driven Development: It's easier than you think!
Unlock Moments
Create a free account to watch a limited number of Moments each month.
Upgrade to PRO for unlimited access to the full archive.
Upgrade to PRO for unlimited access to the full archive.
You have an account? Log in
02:02 MIN
Practical strategies for testing legacy applications
Testing .NET applications a Tool box for every developer
Unlock Moments
Create a free account to watch a limited number of Moments each month.
Upgrade to PRO for unlimited access to the full archive.
Upgrade to PRO for unlimited access to the full archive.
You have an account? Log in
05:26 MIN
Understanding the Test-Driven Development workflow
Yes, You Need to Unit Test your JavaScript. Here's How.
Unlock Moments
Create a free account to watch a limited number of Moments each month.
Upgrade to PRO for unlimited access to the full archive.
Upgrade to PRO for unlimited access to the full archive.
You have an account? Log in
02:14 MIN
Key lessons learned from this testing approach
Using code generation for test automation – the fancy way
Unlock Moments
Create a free account to watch a limited number of Moments each month.
Upgrade to PRO for unlimited access to the full archive.
Upgrade to PRO for unlimited access to the full archive.
You have an account? Log in
01:05 MIN
Implementing the Panache repository to pass tests
Test-Driven Development: It's easier than you think!
Unlock Moments
Create a free account to watch a limited number of Moments each month.
Upgrade to PRO for unlimited access to the full archive.
Upgrade to PRO for unlimited access to the full archive.
You have an account? Log in
01:53 MIN
Q&A: Mocking external service dependencies in tests
Using code generation for test automation – the fancy way
Unlock Moments
Create a free account to watch a limited number of Moments each month.
Upgrade to PRO for unlimited access to the full archive.
Upgrade to PRO for unlimited access to the full archive.
You have an account? Log in
01:25 MIN
Implementing unit, integration, and data quality tests
Modern Data Architectures need Software Engineering
Unlock Moments
Create a free account to watch a limited number of Moments each month.
Upgrade to PRO for unlimited access to the full archive.
Upgrade to PRO for unlimited access to the full archive.
You have an account? Log in
04:26 MIN
How TDD builds a strong foundation of unit tests
Treat yourself - A tale about dog training and test-driven development
Unlock Moments
Create a free account to watch a limited number of Moments each month.
Upgrade to PRO for unlimited access to the full archive.
Upgrade to PRO for unlimited access to the full archive.
You have an account? Log in
Featured Partners
Related Videos
Why you must use TDD now!
Alex Banul
How not to test
Golo Roden
Continuous testing - run automated tests for every change!
Christian Kühn
How To Test A Ball of Mud
Ryan Latta
Contract Testing - How do you tame an external API that constantly breaks your tests
Vincent Hennig & Anupam Krishnamurthy
Test Driven Development with JavaScript
Sascha Depold & Parinaz Roghany
Write tests you love, not hate
Jens Happe
Test-Driven Development: It's easier than you think!
Eric Deandrea
Related Articles
View all articles



From learning to earning
Jobs that call for the skills explored in this talk.




CONTIAMO GMBH
Berlin, Germany
Senior
Python
Docker
TypeScript
PostgreSQL

SYSKRON GmbH
Regensburg, Germany
Intermediate
Senior
.NET
Python
Kubernetes



