danwo 的运行环境

Production

A short smoke test after each deploy, with a dedicated test account. Never the matrix.

本页还没有中文版,下面是英文原文。

On production, danwo checks that your main pages work after a deploy. It drives a real browser against the live site and records what it saw. It emulates nothing and breaks nothing: production is for smoke tests only.

Browserdanwo drives itProductionlive siteReal providerslive accounts
No proxy: danwo drives and records the browser, and nothing else.

Set it up

Point danwo at the live site with baseUrl, and no environment. With no environment there's no proxy, so nothing can be faulted by accident:

danwo.production.config.ts
import { defineConfig } from "@danwo/sdk"

export default defineConfig({
  testDir: "tests/smoke",
  baseUrl: "https://example.com",
})

Keep smoke tests in their own folder, and keep them short: the home page loads, a test user can sign in, the main page they need shows.

tests/smoke/home.danwo.ts
import { test } from "@danwo/sdk"

test("the home page loads", async ({ app, screen, expect }) => {
  await app.open("/")
  await expect(screen.getByRole("link", { name: "Sign in" })).toBeVisible()
})
npx @danwo/cli test --config danwo.production.config.ts

Rules for production

  • Read, don't write. Don't buy, send or delete anything a real customer would see.
  • Use a dedicated test account, created for this, with its password in secrets.
  • Never run danwo matrix here. It refuses anyway: with no environment, there's no proxy to put faults in.
  • No emulators. Production must talk to the real services.

Running it on a schedule

danwo doesn't have scheduled monitoring yet. Run the smoke tests from your CI after each deploy, or on a timer in your CI's scheduler.

Next

本页内容

在每个 Pull Request 上运行

每个 Pull Request 一个 GitHub Check 和一条评论,并附上完整的运行记录。

配置 CI