Tap Compare Testing

Lucas Campos
2 min readFeb 26, 2019

--

Have you ever heard about Tap Compare Testing?!

# TL;DR:

Tap compare is a good test technique to add to your toolbox in order to validate that there are no regressions on a new version of a service, without having to curate and maintain a test script. You can either capture existing production traffic and replay it later, or you use the mirroring traffic technique which clones the request and sends this to both your old and new service version.

# About it

The tap compare approach does not require that a developer create complex test scripts, as is often the case with other kinds of tests, such as integration tests or end-to-end tests.
It is important to say that tap compare is not something that attempts to act as a direct substitute for any other testing technique — you will still need to write other kinds of tests such as unit tests, component tests or contract tests. However, it can help you to detect regressions so that you can feel more confident about the quality of the new version of the developed service. One important thing about tap compare is that it provides a new layer of quality around your service. With unit tests, integration tests, and contract tests, the tests verify functionality based on your understanding (as a developer) of the system, so the inputs and outputs are provided by you during test development. In the case of tap compare, this is something totally different.

# How?

You can implement it in lots of different ways and of course, there are libraries which can help you. From my search, I read about Diferencia and Diffy. More important than the library is to known the concept behind it.

# Source

Google and InfoQ

--

--