Tracetest — Assertions, Versioning & CI/CD

Tracetest — Assertions, Versioning & CI/CD
Jun 8, 2022
6 min
read
Ken Hamric
Founder
Tracetest

Tracetest released v0.5 w/new capabilities to enable you to create trace-based tests. The release includes better assertions, versioning, & CI/CD capability.

Share on Twitter
Share on LinkedIn
Share on Reddit
Share on HackerNews
Copy URL

Table of Contents

Get started with Tracetest!

Try Managed Tracetest Today!

The [beta version 0.5.0 of Tracetest](https://kubeshop.github.io/tracetest/) is officially released!  In our [last product blog post](https://kubeshop.io/blog/tracetest-is-released-whats-next), we discussed how the [first release on April 26th](https://kubeshop.io/blog/introducing-tracetest-trace-based-testing-with-opentelemetry) was more of a Minimum Viable Prototype than a MVProduct.  These version is a true Minimal Viable Product, with the key new features to enable end-to-end tests based on your OpenTelemetry traces improving on the previous versions.

Check out the improvements and new features to Tracetest that our team focused on over the last six weeks:

Improving Assertions & Filters

The key capability of Tracetest is the ability to **specify assertions against the various spans in your trace** - this is what empowers Tracetest’s deep integration tests.

There are two parts to this: *specifying what spans to test* and *the actual check*. The check is fairly standard if you have a background in software testing: You specify the attribute to verify, the comparison operator, and the expected value. The filter, however, is more complex. The filter allows you to specify one or more spans in your trace that you want to apply checks against. The problem set of identifying one or more spans in a trace is similar to that of identifying one or more HTML elements in a web page when performing web testing, and has several of the same challenges. Recognizing these similarities, we implemented a selector language based loosely on CSS selectors. You can read more about the underlying selector language [here](https://kubeshop.github.io/tracetest/advanced-selectors/). We then took this selector language and created a graphical flow which makes it simple to specify the filter via the UI. This will be a continued area of focus for the tool.

Versioning Your Test Definitions

We have added the **ability to have versions of your test**. When you change a test by adding or removing assertions or changing selectors, you will create a working draft. You can publish the draft, create a new version of the test, or revert your changes. This allows you the freedom to apply new assertions when viewing a result, view how they would impact the test, and, ultimately, decide whether to retain the changes.

In addition, each test run is associated with the version of the test it was based on, which will allow future capability to rollback to a previous version, along with other capabilities.

Running the Tests in CI/CD

You can now **run tests as part of your CI/CD flow**. There were several pieces of work that enabled this. We defined a YAML format to describe Tracetest tests, leveraging the selector language specified above. This text-based version of your Tracetests will enable GitOps flows, as you can save your tests directly in your repo. We created a CLI from which you can load, run, and save tests and retrieve test results and are distributing this CLI across a number of platforms.

And the UX!

We spend a lot of time working on the UX of Tracetest – making it easier to **visualize the trace** and **see the details from each span**. In this release, we moved the test results to a bottom tray, leaving the top of the screen to show the trace generated from your test. As we move forward, we will continue to work on UX improvements, making it easier to look at a trace and quickly absorb important information.

We have a very experienced team and I have been impressed by how quickly they were able to transform the prototype into a product.

Here are some stats showing what has been accomplished since our first release on April 26th:

- Created [138 new issues](https://github.com/kubeshop/tracetest/issues?q=is%3Aissue+created%3A%3E2022-04-26+)

- Closed [154 tasks / issues](https://github.com/kubeshop/tracetest/issues?q=is%3Aissue+closed%3A%3E2022-04-26+).

- Went from 8 Github stars to 114 stars ⭐

- Added 2 more members to the Tracetest team

What’s Next?

In a word - **YOU**! We are looking for groups using OpenTelemetry tracing that want to take advantage of trace-based testing to increase their test coverage. We are ready to help teams that try Tracetest, making sure they are successful and adding product functionality based on needs identified.

To get started:

Install Tracetest! We have instructions in our [Documentation under Getting Started]( https://docs.tracetest.io/getting-started/installation).

Communicate via our [Slack community](https://dub.sh/tracetest-community). Get help installing or using the product, tell us what you would like to see added or changed, and help set the future direction of the product.

Want to try it before installing? We have a public demo at [demo.tracetest.io](https://demo.tracetest.io/) to do just that. The demo has an example microservice installed alongside which will allow you to create your own tests and try out Tracetest.

Talk to us directly. I am available on the Tracetest Community Slack, in addition to the CNCF and o11y Slack Channels (Search for Ken Hamric). I will also be attending the [OTel Community Day](https://events.linuxfoundation.org/open-telemetry-community-day/) in Austin on June 20th - hope to see you there!

Thanks for your interest, and please give our Open Source project a star on [Github](https://github.com/kubeshop/tracetest).