Post details
How do you test a database without a database? Don't worry, this isn't one of those Zen puzzles. I have something more practical, but equally enlightening, in mind. Let’s use the adapter pattern to solve the riddle.
How do you test a database without a database? Don't worry, this isn't one of those Zen puzzles. I have something more practical, but equally enlightening, in mind. Let’s use the adapter pattern to solve the riddle.
Retrofitting OpenAPI documentation to your Rails codebase (12 mins read).
How to take a Rails codebase and introduce OpenAPI documentation and contract tests, in a test-driven manner.
Gotcha: testable examples in Go need an output
comment (2 mins read).
Beware that your Go Example
tests may not actually be running.
Converting HTTP requests to Wiremock stubs, with Go (2 mins read).
How to take an HTTP request and convert it into a Wiremock JSON mapping, on the command-line, in Go.
Running Go tests in Parallel (2 mins read).
How to get Go tests to run in parallel for speed.
Ignoring slow-running tests in Go (1 mins read).
How to use Go's -short
testing mode to avoid running slower tests.
Mutation testing for Go source code. Contribute to zimmski/go-mutesting development by creating an account on GitHub.
Setting up OpenAPI Contract Tests with a Rails and RSpec codebase (2 mins read).
How to run OpenAPI-driven contract tests against a Rails API.
Only testing your public API in a Go package (3 mins read).
How to test only exported parts of a package in Go.
Introducing a library for OpenAPI contract testing with Go's net/http
package (2 mins read).
Creating a Go library that can verify net/http
handlers implement an OpenAPI contract, for use with testing.
Documenting my experiences and learnings, with the goal of helping other software engineers on their journey
Some really great posts here that have made it much easier for me to get started with Go!
Avoiding Spring context issues when parallelising @Nested
Spring integration tests (3 mins read).
Using abstract base classes to reduce risk of Spring context overall issues with Spring (Boot) integration tests.
Integration Testing Your Spring WebClient
s with Wiremock (4 mins read).
How to write integration tests using Wiremock, for use with WebClient
s.
Gotcha: checked and unchecked exception handling from Spring WebFlux WebClient
(2 mins read).
How checked and unchecked exceptions may appear when testing your WebClient
code.
It was only a few years ago that I did a gig at a financial company and when I asked about writing tests I was told “we don’t have time!”. My response of “how will I know it works?” was met with silence. (I wrote tests and finished well ahead of schedule. Then left.)Post details
I cannot possibly comprehend how anyone, anywhere in business, in finance, in engineering, in software does not use a test driven development model in 2022. My mind is blown.Simon Wardley (@swardley)Tue, 08 Feb 2022 22:12 GMT
Chris Oldwood (@chrisoldwood)Wed, 09 Feb 2022 13:18 GMT
Excluding Filter
s When using WebMvcTest
(1 mins read).
How to exclude specific Filter
s from running when performing WebMvcTest
s.
Integration Testing Your Spring WebClient
s with okhttp's MockWebServer
(5 mins read).
How to write integration tests using MockWebServer
with Spring Boot, for use with WebClient
s.
Validating a MockMvc
Response Has No Content Type (1 mins read).
How to validate, in a MockMvc
test, whether the response has no content-type
nor a body.
Integration Testing Your Spring RestTemplate
s with RestClientTest
, using spring-test (8 mins read).
How to write integration tests using RestClientTest
with Spring Boot, for use with RestTemplate
and RestTemplateBuilder
s.
How to Create and Unit Test Java Bean Validation Annotations (12 mins read).
A guided example through what the different type of annotation ElementType
s are, with respect to Bean Validation, and how to write unit tests for them.
Using the Facade Pattern to More Easily Test static
or Complex Classes (2 mins read).
How to use the Facade design pattern to more easily test classes that are more complex than our tests need to understand.
Testing Data Serialisation/Deserialization in Java (with Gson) (3 mins read).
How to validate your JSON types correctly serialise/deserialise when using the Gson library.
Announcing a new package: @jamietanna/spectral-test-harness
(1 mins read).
Announcing a new NPM package for easier testing of Spectral API linting.
Test Driven Development for Your Spectral Rules, using Jest (7 mins read).
How to write unit tests for Spectral API linting, in a test-driven development fashion.
It’s very hard to add tests to code which hasn’t been written to aid testing
Richard Startin (@richardstartin)Wed, 08 Dec 2021 14:45 GMT
Writing more than the min amount of code to make your test pass damages the specificity and sensitivity of your overall test suite. Specificity: bug in your code = RED tests Sensitivity: feature is working = GREEN test (protects against regressions) codingitwrong.com/2020/12/23/why…arkangelofkaos (@arkangelofkaos)Wed, 08 Dec 2021 09:20 GMT
Testing Data Serialisation/Deserialization in Java (with Moshi) (3 mins read).
How to validate your JSON types correctly serialise/deserialise when using the Moshi library.
Shift Your Testing Left with Spring Boot Controllers (5 mins read).
How to break down your tests for Spring Boot controllers, which could be used when performing Test Driven Development.
Love when my test fails and I go look at the code properly and the code is wrong. I’m always like: good test, pat pat 😌 [yes, I talk to my code]Carol 🌻 (@CarolSaysThings)Fri, 19 Nov 2021 15:17 GMT
Same with automated testing prior to deployment. This is a good thing though. Those hard problems were always there, you just never had time to look for them due to all the simpler issues taking up all your time.Post details
it's a bit counterintuitive, but the better-instrumented and the more mature your systems are, the fewer problems you'll find with automated alerting and the more you'll have to find by sifting around in production by hand. twitter.com/arclight/statu…Charity Majors (@mipsytipsy)Tue, 09 Nov 2021 22:13 GMT
Tom Binns (@fullstacktester)Wed, 10 Nov 2021 16:08 GMT
Creating More Descriptive and Fluent Assertion Helpers (4 mins read).
How to improve test readability, and developer experience, using assertion helpers.
Testing Data Serialisation/Deserialization in Java (with Jackson) (4 mins read).
How to validate your JSON types correctly serialise/deserialise.
Using Abstract Test Classes To Reduce Duplication in Java (4 mins read).
How to use Java's abstract classes to reduce duplication of code across unit tests with common functionality.
Testing that your Spring Boot Application Context is Correctly Configured (2 mins read).
How to improve the tests you've got to validate that Spring Boot's context is set up correctly.
Testing Data Serialisation/Deserialization using JsonTest
with Spring Boot (3 mins read).
How to use the @JsonTest
test type in Spring Boot to validate your JSON types correctly serialise/deserialise.
Default Your Tests to run in Parallel (2 mins read).
Discussing the benefits you can achieve by having parallel-by-default.
Writing Better Wiremock Stubs (3 mins read).
How to improve the specificity of Wiremock tests to allow for not clobbering other scenarios, and enabling scalable test runs.
Writing Better Tests (1 mins read).
Announcing a new series of posts about improving the way we write tests.
Avoiding NoClassDefFoundError
errors when using slf4j-test with Logback and Maven (2 mins read).
How to exclude Logback from the classpath when testing your logs using slf4j-test and Maven.
Unit testing requires significantly less skill, time investment, and infrastructure than any other form of testing and almost any other form of verification. So anybody can pick it up and apply it to any project. That's why it's the go-to technique
Post details
One thing I've wondered about is why software folks so often use unit testing as their go-to testing technique. When I've worked at companies that ship few enough bugs that it would be considered a failure to have one serious bug in a year, unit testing has been a last resort.Dan Luu (@danluu)Tue, 11 May 2021 17:42 +0000
Hillel (@hillelogram)Tue, 11 May 2021 18:48 +0000
Server-less Wiremock, or Using Wiremock Without an HTTP Server (3 mins read).
How to match Wiremock's stubs without running an HTTP Server.
You're currently viewing page 1 of 2, of 87 posts.