Quick Start
This guide walks you through writing your first synthetic test and deploying it to your cluster.
Prerequisites
Section titled “Prerequisites”- downlink operator installed (see Installation)
@downlink/syntheticsadded to your project
-
Write a synthetic test
Create a file
tests/checkout.spec.ts:import { test, expect } from "@downlink/synthetics";test("user can complete checkout", async ({ page }) => {await page.goto("https://your-app.example.com");await page.getByRole("button", { name: "Add to cart" }).click();await page.getByRole("link", { name: "Checkout" }).click();await expect(page.getByText("Order confirmed")).toBeVisible();}); -
Configure the Playwright project
In
playwright.config.ts, use the downlink reporter:import { defineConfig } from "@downlink/synthetics";export default defineConfig({reporter: [["@downlink/synthetics/reporter"]],use: {baseURL: process.env.BASE_URL,},}); -
Create a SyntheticTest resource
Apply a Kubernetes manifest to schedule your test:
apiVersion: downlink.io/v1alpha1kind: SyntheticTestmetadata:name: checkout-flowspec:schedule: "*/5 * * * *" # every 5 minutesimage: ghcr.io/your-org/your-tests:latesttestFile: tests/checkout.spec.tsannotations:service: checkoutteam: platformTerminal window kubectl apply -f synthetic-test.yaml -
Watch it run
Terminal window kubectl get synthetictestskubectl describe synthetictest checkout-flow
Viewing results
Section titled “Viewing results”Results are emitted as Prometheus metrics and available via your existing dashboards. Failed runs store screenshots and Playwright traces as Kubernetes artifacts.
For metric names and labels, see the Reference.