Tracetest Documentation
website·Indexed 34 days ago
https://docs.tracetest.io/A testing tool based on OpenTelemetry for creating trace-based and response-based tests. Tracetest provides a CLI, server, and Web UI to configure trace ingestion via OTLP endpoints, define assertions, and automate test runs using synthetic monitors. It integrates with tools such as k6, Artillery, Playwright, and Testkube.
What's inside Tracetest
- Tracetest enhances standard Playwright UI tests by adding trace-based testing capabilities. While Playwright is limited to validating the user interface and frontend flows, the Tracetest integration allows developers to trigger backend trace-based validations directly from within their Playwright test definitions.
Overview of Tracetest trigger types
To create a test in Tracetest, you must define a
trigger, which is the action executed against your system. Supported trigger types include:- HTTP
- gRPC
- GraphQL
- Kafka
- Playwright (used for true end-to-end testing by starting from the Web UI and tracing the request through the backend, database, and external services).
Overview of Tracetest Run Groups
Run Groups are containers that encapsulate one or more test runs. They are used to logically group runs that share context, such as all tests triggered by a single CI pipeline or a specific integration (e.g., k6, Playwright, Cypress, Artillery).
Key characteristics include:
- Parallel Execution: Unlike Test Suites, tests within a Run Group execute in parallel, significantly reducing total execution time.
- Unified Status: Run Groups track the status of all contained test suites and runs to provide a single aggregate result.
- Composition: Run Groups can contain both individual tests and entire test suites.
- Availability: This is a commercial feature available in Cloud-based Managed Tracetest and Enterprise Self-hosted Tracetest.
Overview of Tracetest Artillery Integration
Theartillery-engine-tracetestpackage allows developers to use Tracetest as the main engine for Artillery performance tests. Unlike standard Artillery tests that only validate the immediate server response, this integration fetches generated OpenTelemetry telemetry data to run trace-based assertions against the entire distributed request flow. This integration is compatible with Artillery v2.0.10 and above.Overview of Tracetest Deployment Options
Tracetest consists of two primary components: a Control Plane (Dashboard, Database, Storage, RBAC) and an Agent (test execution and trace ingestion). Users can choose between two deployment models:
- Enterprise Self-hosted: Both the Control Plane and Agent are deployed on the user's own infrastructure.
- Cloud-based Managed: Only the Agent is deployed on the user's infrastructure, while the Control Plane is managed by Tracetest.
Overview of the Tracetest Trace Analyzer
The Trace Analyzer is a plugin-based framework designed to analyze OpenTelemetry traces. It helps teams improve instrumentation data, identify potential problems, and provides guidance on how to fix them. In the Tracetest Web UI, analyzer results are located in the 'Analyzer Results' pane on the 'Trace' tab.Overview of Tracetest x Cypress Frontend Instrumentation
The@tracetest/cypressnpm package is a Cypress plugin that enables trace-based testing. It acts as a wrapper around the Tracetest API, allowing developers to configure, orchestrate, and run tests from within Cypress. This integration allows users to validate backend behavior (via OpenTelemetry traces) triggered by frontend user interactions simulated by Cypress.Overview of k6 Tracetest Extension
The k6 Tracetest extension allows developers to combine k6's performance testing capabilities with Tracetest's trace-based validation. While standard k6 tests only validate the immediate response from a service, this extension leverages OpenTelemetry traces and spans to run deeper assertions against the internal behavior of distributed services across different checkpoints.Overview of @tracetest/client for TypeScript
The@tracetest/clientNPM package allows developers to integrate Tracetest's trace-based testing directly into JavaScript and TypeScript code. This enables running tests at any point during application development or execution, rather than only at the end of a test run, by leveraging OpenTelemetry traces and spans to validate application behavior.Overview of Tracetest Playwright Engine
The Tracetest Playwright Engine trigger allows developers to combine end-to-end (E2E) tests with trace-based testing. It captures full distributed traces from OpenTelemetry-instrumented systems, enabling trace-based assertions across the entire application flow. This approach helps reduce Mean Time to Recovery (MTTR) for performance failures and allows validation of backend system components even when frontend E2E tests pass.Overview of artillery-plugin-tracetest
Theartillery-plugin-tracetestNPM package extends the Artillery HTTP engine to enable trace-based testing during performance tests. It uses Artillery's plugin system to intercept requests and attach trace IDs to request headers, allowing developers to run validations against distributed traces via the Tracetest API. This overcomes the limitation of standard load testing tools that only validate the immediate client-server response.Overview of Tracetest trace-based testing
Tracetest is a tool for integration and end-to-end testing that leverages OpenTelemetry traces as test specifications. Unlike browser-based tools (e.g., Cypress or Selenium), Tracetest uses existing distributed tracing instrumentation to verify transactions and side-effects across microservices and event-driven apps. Key capabilities include:
- Asserting against both the response and trace data at any point in a request transaction.
- Asserting on the timing of trace spans (e.g., ensuring a database span executes within 100ms).
- Using wildcard assertions across common activity types (e.g., ensuring all gRPC return codes are 0).
- Verifying side-effects in distributed systems such as message queues, async API calls, and external APIs.
- Integrating with existing distributed tracing solutions.
- Supporting multiple test triggers, including HTTP requests, gRPC requests, and Trace IDs.
- Running tests manually or via CI build jobs.
- Analyzing OpenTelemetry instrumentation quality to enforce standards.