Create a Response-based Test
To create a test, you define a trigger
. A trigger is an action that executes an action against your system. The most basic trigger is an HTTP requests, but we support several trigger types.
- Playwright
- HTTP
- GRPC
- GraphQL
- Kafka
Playwright enables a useful technique: True end-to-end testing, where you start tests from the Web UI and explore the entire internal process of that request across the back end, database, and external services.
You can create tests in two ways:
- Programmatically, in YAML
- Visually, in the Web UI
Once started, Tracetest Agent executes tests in the environment where it is running and returns the response from triggered tests. This is how you run basic response-based testing.
Create a Test Programatically in YAML​
Create a file called ping-google.yaml
.
type: Test
spec:
name: Ping Google
trigger:
type: http
httpRequest:
method: GET
url: https://google.com
headers:
- key: Content-Type
value: application/json
Run it with the CLI.
tracetest run test -f ./ping-google.yaml
Create a Test Visually with the Web UI​
Create a test in the Web UI by opening your Tracetest Account, clicking the Create button, and selecting HTTP.
Enter https://google.com
as the URL, and click Run.