Today, we're happily announcing that Tracetest now works with k6, a modern load-testing tool used by thousands of developers worldwide. The combination of k6 and Tracetest allows your load tests to check across your entire microservice, FaaS, or Kubernetes-based applications.
This checks that not only the top surface of the application returns the correct information and remains performant, but allows you to test and verify across the full distributed application, making sure none of the many services involve begin failing or taking too long under load.
Load Testing Across a Distributed Application
Oscar, one of the developers of the k6-tracetest extension, shows why the combo is so potent:
What is k6?
What is Tracetest?
Tracetest is an open-source CNCF project. It allows you to quickly build integration and end-to-end tests, supercharged by your existing distributed traces. The use of your existing distributed traces as part of the test enables assertions to be created across multiple microservices or parts of your distributed application.
Tracetest makes it possible to:
- Define tests and assertions against every single microservice that a request goes through.
- Work with your existing distributed tracing solution, allowing you to build tests based on your already instrumented system.
- Define multiple transaction triggers, such as a GET against an API endpoint, a gRPC request, etc.
- Return both the response data and a full trace.
- Define assertions against both the response and trace data, ensuring both your response and the underlying processes worked correctly, quickly, and without errors.
- Save tests.
- Run the tests manually or, via CI, build jobs with the Tracetest CLI.
Tracetest Now Works with k6!
Tracetest now works with k6, allowing you to conduct load tests that verify your entire distributed application.
Most load-testing tools will trigger your application and apply tests against the response from the call. As you scale up the number of tests running concurrently, the system under test will be exercised. Assertions can be defined against any of the response data, whether it is the status codes, parts of the response body, or expected timing.
By including Tracetest in the k6 load test, you can test against both the response AND the information contained in the trace. This allows you to define powerful assertions against all the processes involved in servicing the call invoked by a load test. Some examples of checks it enables include:
- Checking the microservices on “the other side” of a message queue to verify it can handle the load. Typically when load-testing complex systems with message queues you cannot easily assert against the entire system, particularly when it has asynchronous calls.
- In one assertion, assert that all database queries across all microservices should return in less than 100ms, and verify this under load.
- Or that every gRPC process in the entire stack continues returning status codes of zero as the load increases.
- Showing you graphically, via the trace, where any detected failures occur across any of the runs.
The ability to observe and assert against the entire system under load, empowered by your current APM or observability platform, makes Tracetest and k6 a powerful combination.
Try Tracetest with k6
Tracetest is open-source and easy to install. First, install Tracetest CLI. Check out the download page for more info. From here, follow the official documentation to install the Tracetest server.
Once the server is installed, open up Tracetest Web UI in the browser and define where Tracetest gets the traces from, whether Jaeger, Lightstep, Elastic, or any trace vendor. You can even send traces to Tracetest via the OpenTelemetry collector. Check out the Configuration Overview for help!
Once you have Tracetest working and can run trace-based tests against your distributed system, you will want to create a load test with k6. Use the excellent k6 docs to get started. You can then utilize the k6-tracetest extension to run deep load tests. We have full documentation on how to use k6 and Tracetest together at https://docs.tracetest.io/tools-and-integrations/k6.
The Tracetest team recently discussed the integration during the k6 Office Hours:
This is the first version of the integration between k6 and Tracetest. Have any ideas for improving it? Interested in enabling trace-based testing for other load testing tools? Let us know by creating an issue in Github, or start a conversation with the team behind Tracetest in our Discord community. You can also reach out to us to schedule a call to discuss your particular needs or get assistance.
Excited about the Tracetest project and trace-based testing? Give Tracetest a star on GitHub!
Top comments (0)