This page showcases opening the Tracetest Web UI regardless if you used the Tracetest CLI, Docker, Kubernetes, or Helm to install Tracetest Server.
By following the installation guide your Tracetest Core instance will have a
demo Pokeshop app installed that generates distributed traces when triggered.
Creating Trace-based Tests
You can create tests in two ways:
- Visually, in the Web UI
- Programmatically, in YAML
Creating Trace-based Tests Visually
This guide will show how to create end-to-end and integration tests in less than 5 minutes via the Web UI.
To view the in-depth guide on creating tests visually, check out this docs page.
On the top right, click the Create button and select Create New Test in the drop down.
Select an HTTP Request as the test trigger, and choose the Pokeshop - Import example.
This will populate a sample API test against a POST endpoint in the Pokeshop app demo. Clicking Create & Run will save and trigger the test.
Running a test against
localhost will resolve as
127.0.0.1 inside the Tracetest Core container. To run tests against apps running on your local machine, add them to the same network and use service name mapping instead. Example: Instead of running an app on
localhost:8080, add it to your Docker Compose file, connect it to the same network as your Tracetest service, and use
service-name:8080 in the URL field when creating an app.
You can reach services running on your local machine using:
- Linux (docker version < 20.10.0):
- MacOS (docker version >= 18.03) and Linux (docker version >= 20.10.0):
You'll be redirected to the test page where you can see four tabs and depending on which one you select you'll get access to:
- Test trigger and results
- The entire distributed trace and trace analysis
- Test specification and assertions
- How to automate the test
To view the in-depth guide on test results, check out this docs page
The Trigger tab shows how the test was triggered and what the API response was.
The Trace tab shows the entire distributed trace for debugging and a trace analysis score.
The Test tab shows span attributes. Here you add test specs and assertions on attribute values. You also get a test snippets out-of-the-box for common test cases.
In the sample below, you see how to assert that all database spans return in less than
The Automate tab shows how to automate the test run with the Tracetest CLI and other automation options.
From here you can download a YAML file test definition and run it with the CLI.
Creating Trace-based Tests Programatically
The test definition will contain:
- The Trigger for the test in the
- The Test Specifications in the
You can either download the YAML file test definition, or write one from scratch.
Using the sample from above, create the Trace-based Test programatically.
name: Pokeshop - Import
description: Import a Pokemon
- key: Content-Type
- name: 'All Database Spans: Processing time is less than 100ms'
- attr:tracetest.span.duration < 100ms
Using the CLI, trigger a test run.
tracetest run test -f pokeshop_import.yaml -o pretty
The test run will complete and show a result.
✔ Pokeshop - Import (http://localhost:11633/test/Yg9sN-94g/run/3/test)
✔ All Database Spans: Processing time is less than 100ms
The provided link in the test output will open the test run in the Tracetest Web UI.