See the challenges faced & approach taken in designing a CI pipeline to run integration tests against an actual Tracetest deployment using Cypress & Tracetest.
At Tracetest we care a lot about software quality, and that applies to Tracetest itself, obviously.
We were working with a basic CI pipeline, running some unit tests before merging PRs. But that wasn’t enough. We want to be able to deliver the best possible quality software, and that requires more.
We need a way to deploy and run integration tests over new code, and we have the perfect tool to run those tests: Tracetest. Our goal is to test Tracetest using Tracetest!
Probably the hardest part of any design process is defining the goals. Setting a CI pipeline is not an exception.
We wanted to set up a GitHub Actions pipeline so that we can run Tracetest tests in that CI environment. So, we created a tentative step-by-step recipe for that:
While it sounds simple to do that, in practice it has its nuances.
We already have developed most of the tools needed to solve the problems listed above:
This is what our final pipeline looks like:
You can see it in action here.
It is divided into 3 main stages:
After those steps are completed, the output of the tests is persisted with the GitHub Action, and we can safely remove the created Helm release and namespace.
We are currently working on actually testing Tracetest with trace test. The pipeline right now is only "ready" to support this, but we will move our tests in the following days.
You can see the actual pipeline definition here:
While Tracetest is still in its early stage, it has all the tools needed to easily integrate into a CI/CD pipeline. Creating end-to-end and integration tests is usually not an easy task, but we found that doing it with Tracetest and Kubernetes was straightforward.
We are eager to hear your 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. Have an idea to improve it? Please create an issue, give us a star on GitHub, and join our community on Discord.
Tracetest is supported by Kubeshop (Open-Source Accelerator).
OpenTelemetry collector now supports filtering without needing tail sampling. See how Tracetest uses this to filter based on trace state to allow a second pipeline to route span info to Tracetest.
Today you’ll learn how to contribute to the OpenTelemetry Demo repo safely, by learning to write OpenTelemetry code instrumentation and testing your contributions by writing trace-based tests.