Speeding up testing for local development

In this section, we will be covering a couple of approaches to accelerating testing when working locally. Just to clarify, I am assuming that you already have a proper CI infrastructure in place; no matter what shortcuts we will be taking here, the CI will always run all the tests.

The first item on our agenda is slow versus fast tests. For the sake of argument, say that we find ourselves in a situation where we are writing a fully-fledged, pure CPU ray tracer implementation in Go. To ensure correctness and avoid regressions while we are tweaking our implementation, we have introduced a test suite that renders a sequence of example scenes and compares the ray tracer output to a series of prerendered ...

Get Hands-On Software Engineering with Golang now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.