Skip to content

Configuration

Blop reads blop.config.ts (or .mts, .js, .mjs) from the project root. Every option is optional; the runner has sensible defaults.

import type { BlopConfig } from "blop";
export default {
// Discovery
include: ["tests/**/*.blop.ts"],
exclude: ["tests/_**/*"],
// App under test
baseUrl: "http://localhost:3000",
// Browser
browser: "chromium",
viewport: { width: 1280, height: 720 },
headed: false,
// Agent
provider: "openai",
model: "gpt-5",
maxSteps: 75,
timeoutMs: 30_000,
retries: 1,
// Reporting
reporter: "all",
reportDir: ".blop",
} satisfies BlopConfig;
Option Default What it does
include ["**/*.blop.ts", "**/*.blop.tsx"] Glob patterns for spec files
exclude [] Glob patterns to skip
cwd process.cwd() Working directory for discovery

CLI patterns override include. Files matching node_modules/, dist/, .blop/, or .git/ are always skipped.

Option Default What it does
baseUrl (none) Resolved against relative agent.goto("/path") calls
browserContext (none) Playwright BrowserContextOptions for cookies/auth/storage

Use browserContext.storageState to seed an authenticated session — see Examples → Auth flow.

Option Default What it does
browser "chromium" One of chromium, firefox, webkit
viewport (Playwright default) { width, height }
headed false Show the browser window
Option Default What it does
provider env: BLOP_AGENT_PROVIDER Khadim provider name
model env: BLOP_AGENT_MODEL Model name
apiKey env: BLOP_AGENT_API_KEY (or provider-native env) API key
maxSteps (unlimited) Hard cap on agent tool steps
timeoutMs (none — uses Playwright defaults) Per-test wall-clock cap
retries 0 Re-run failed tests this many times

See Agent providers for env-var conventions.

Option Default What it does
reporter "all" One of basic, json, junit, all
reportDir ".blop" Where to write artifacts
verbose false Stream agent events to stderr

See Reporters & output.

Option Env var What it does
platformUrl BLOP_PLATFORM_URL Blop Platform ingest URL
platformApiKey BLOP_API_KEY Blop Platform API key

If both are set, the runner uploads BlopRunResult after the run.

When the same option is set in multiple places, later sources win:

  1. Defaults baked into the runtime
  2. blop.config.ts
  3. Environment variables (BLOP_AGENT_*, provider-native keys)
  4. CLI flags

So a CI run can pin --max-steps 75 without touching the config file.

Blop auto-discovers any of:

  • blop.config.ts
  • blop.config.mts
  • blop.config.js
  • blop.config.mjs

Pass --config path/to/file.ts to point at a custom file.

The full BlopConfig type is in API reference → Configuration.