Tracetest blog

Introducing Tracetest - Trace-based Testing w/OTel

April 26, 2022
Est. reading time: 
2 min
Introducing Tracetest, a tool which allows easy creation of end-to-end tests via a simple user interface. Leverages your current investment in OpenTelemetry based tracing to make deep testing simple.
Ken Hamric

Table of Contents

# An Open Source User Interface for Integration and End-to-End Testing

Kubeshop, a Kubernetes project accelerator, is proud to introduce Tracetest, a tool that allows you to quickly create of integration and end-to-end tests via a simple User Interface. Tracetest allows you to increase the pace and coverage of your test suites by leveraging your current investment into open-source-based tracing. Comprehensive testing across systems becomes easy.  Before explaining further, let's cover a little background.

# Challenges in Troubleshooting Microservice Architecture

Troubleshooting a microservice architecture is inherently difficult.  As many as 30 to 100 services may be involved in a single flow.  An application is often written in multiple languages, could have several backend data stores, multiple message buses, different technologies, etc. Understanding a particular flow is hard. Having enough experience and wide-ranging knowledge to troubleshoot and diagnose issues for any single developer or tester is daunting. And, if troubleshooting operational issues is hard, then attempting to create tests to verify the proper operation of the system is almost impossible.

# OpenTelemetry: The Industry's Answer to Troubleshooting Complex Systems

Luckily – and purposefully – the industry has been developing tools to help visualize and troubleshoot the flow through a complex system. The effort has coalesced around a Cloud Native Computing Foundation (CNCF) project called OpenTelemetry. 

# What is OpenTelemetry?

OpenTelemetry (OTEL) is an open-source, standards-based approach to provide visibility and observability for your application. It is composed of three major parts: tracing, metrics, and logs.

For the visualization of the flow through a system, OTEL tracing is most relevant. It is being used and supported by leading companies around the world such as Google, Shopify, AWS, Datadog, and Microsoft. OTEL tracing provides a map showing the exact steps a transaction takes through the system, capturing relevant data, such as the calling information, response codes, and timing for each step in a transaction's journey.

But – what about testing?  It is WONDERFUL to have tracing enabled for troubleshooting as it provides a roadmap of exactly what occurred for each execution of a transaction. It is a shame that the same roadmap showing exactly what happens in an execution cannot be leveraged to build tests. 

Now, with Tracetest, it can!

# Introducing Tracetest: Building Tests for Your OpenTelemetry Instrumented Microservice Applications

Tracetest is the first visual tool that allows users to easily build and run integration and E2E tests against any system that is OTEL instrumented.

This makes Tracetest an ideal tool no matter your OpenTelemetry protocol, code, open source projects, etc. It can highlight key metrics across open-source projects, give insight into application performance, and do much more.

To see how it works, you can see a walkthrough of a real use case on YouTube. Of course, this would apply to any OpenTelemetry Project as well.

## The Tracetest User Interface on an OpenTelemetry Project

This diagram shows how Tracetest works:

Tracetest system flow

Tracetest is simple to install: only a couple lines of configuration is needed to tell it how to access your OTEL trace data. You can find more details about it on our Github page.

Once installed, you can open your browser to the Tracetest instance and begin creating tests.

Want to ‘try it out’?  We have a live demo which we use to test our sophisticated PMA (Pokemon Microservice Application).  Give it a whirl!

# Get Involved in Improving Testing for OpenTelemetry Applications

We are eager for feedback and to talk to you.  Please share your thoughts on how trace-based testing can help you and what we should do next to improve Tracetest.  We are in the early days with the project, and need your help to make it a success. Have an idea to improve it? Please create an issue or join our community on Discord.

Tracetest is supported by Kubeshop (Open-Source Accelerator)