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.
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.
Creating a Go library that can verify
net/http handlers implement an OpenAPI contract, for use with testing.
Using abstract base classes to reduce risk of Spring context overall issues with Spring (Boot) integration tests.
Integration Testing Your Spring
WebClients with Wiremock (4 mins read).
How to write integration tests using Wiremock, for use with
How checked and unchecked exceptions may appear when testing your
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.)
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
Filters When using
WebMvcTest (1 mins read).
How to exclude specific
Filters from running when performing
How to write integration tests using
MockWebServer with Spring Boot, for use with
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.
How to write integration tests using
RestClientTest with Spring Boot, for use with
How to Create and Unit Test Java Bean Validation Annotations (12 mins read).
A guided example through what the different type of annotation
ElementTypes are, with respect to Bean Validation, and how to write unit tests for them.
How to use the Facade design pattern to more easily test classes that are more complex than our tests need to understand.
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.
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
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.
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 detailsit'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.
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.
How to improve the tests you've got to validate that Spring Boot's context is set up correctly.
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.
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 detailsOne 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
How to match Wiremock's stubs without running an HTTP Server.
You're currently viewing page 1 of 2, of 87 posts.