← All modules
tools

Tests

Live

E2E, integration, and smoke test runner with HCL-inspired DSL and CI pipeline.

event.type === "test:run" observe/modules/tests
Overview

What Tests does

Tests records E2E, integration, and smoke-test runs with suite-level totals, skipped counts, duration, and CI context. It gives teams one place to inspect whether product modules are healthy before and after deploys.

The module is preview while the standalone Tests product continues to mature. Observe owns the run timeline, status rollups, and correlations with deploy, config, and error events.

Wire payload

Same shape, three syntaxes

The wire protocol is plain HTTP, plain JSON, HMAC-SHA256. The TypeScript tab uses the SDK; the cURL tab is the raw HTTP equivalent; the Python tab shows the preview SDK shape.

import { createCuittyClient } from "@cuitty/sdk";

const cuitty = createCuittyClient({
  observeUrl: "https://observe.cuitty.com",
  projectId: process.env.CUITTY_PROJECT_ID!,
  apiKey: process.env.CUITTY_API_KEY!,
});
cuitty.start();

await cuitty.emit({
  type: "test:run",
  timestamp: new Date().toISOString(),
  data: {
    suiteId: "checkout-smoke",
    status: "passed",
    total: 42,
    passed: 41,
    failed: 0,
    skipped: 1,
    durationMs: 18320,
  },
});
Storage

Database schema

Excerpt from observe/modules/tests/schema.sql. One libSQL file per module — back it up with cp.

CREATE TABLE IF NOT EXISTS test_runs (
  id TEXT PRIMARY KEY,
  suite_id TEXT,
  status TEXT NOT NULL DEFAULT 'pending',
  total INTEGER NOT NULL DEFAULT 0,
  passed INTEGER NOT NULL DEFAULT 0,
  failed INTEGER NOT NULL DEFAULT 0,
  skipped INTEGER NOT NULL DEFAULT 0,
  duration_ms INTEGER
);

Related modules