QUESTPIE Probe

Configuration

Configure QUESTPIE Probe with qprobe.config.ts — services, browser, HTTP, logs, and test settings.

Configuration

QUESTPIE Probe loads configuration from qprobe.config.ts in your project root using c12.

Generate a starter config:

qprobe init

Full Example

import { defineConfig } from '@questpie/probe'

export default defineConfig({
  services: {
    db: {
      cmd: 'docker compose up postgres',
      ready: 'ready to accept connections',
      health: 'http://localhost:5432',
      stop: 'docker compose down postgres',
      timeout: '60s',
    },
    server: {
      cmd: 'bun dev',
      ready: 'ready on http://localhost:3000',
      port: 3000,
      health: '/api/health',
      depends: ['db'],
      env: { DATABASE_URL: 'postgresql://localhost:5432/dev' },
      cwd: './apps/server',
    },
    worker: {
      cmd: 'bun run jobs',
      ready: 'worker started',
      depends: ['db'],
    },
  },
  browser: {
    driver: 'agent-browser',
    baseUrl: 'http://localhost:3000',
    headless: true,
    session: 'qprobe',
  },
  http: {
    baseUrl: 'http://localhost:3000',
    headers: { 'Content-Type': 'application/json' },
  },
  logs: {
    dir: 'tmp/qprobe/logs',
    maxSize: '10mb',
    browserConsole: true,
  },
  tests: {
    dir: 'tests/qprobe',
    timeout: 30_000,
  },
})

Services

Each key in services defines a named process.

FieldTypeDefaultDescription
cmdstringShell command to run
readystringRegex/string in stdout that signals the process is ready
portnumberPort for health checks and auto baseUrl
healthstringURL or path to health endpoint
stopstringCustom stop command (default: SIGTERM)
timeoutstring"60s"Max time to wait for ready pattern
dependsstring[][]Services that must start first
envRecord<string, string>{}Environment variables
cwdstring"."Working directory

Browser

FieldTypeDefaultDescription
driver'agent-browser' | 'playwright''agent-browser'Browser automation driver
baseUrlstringDefault URL for browser open
headlessbooleantrueRun browser in headless mode
sessionstring'qprobe'Session name for agent-browser daemon

HTTP

FieldTypeDefaultDescription
baseUrlstringBase URL for qprobe http requests
headersRecord<string, string>{}Default headers for all requests

Logs

FieldTypeDefaultDescription
dirstring'tmp/qprobe/logs'Log file directory
maxSizestring'10mb'Max log file size before rotation
browserConsolebooleantrueCapture browser console output

Tests

FieldTypeDefaultDescription
dirstring'tests/qprobe'Directory for recordings and generated tests
timeoutnumber30000Default test timeout in ms

Environment Variables

Override config values via environment variables:

VariableOverrides
QPROBE_CONFIGConfig file path (default: qprobe.config.ts)
QPROBE_BASE_URLhttp.baseUrl
QPROBE_BROWSER_DRIVERbrowser.driver
QPROBE_LOG_DIRlogs.dir
QPROBE_HEADLESSbrowser.headless ("true" or "false")
QPROBE_TIMEOUTDefault timeout for commands

On this page