Self-hosted · open source

Your web tests,
on a schedule.

Write YAML. Run HTTP or browser checks on cron. Get alerted when something breaks.

scenarii / dashboard Live
Scenarii scenario detail with SLA, response-time trend, success rate and step timings
Example run feed
api-health lusk.bzh checkout-flow login-flow pricing-page search-api status-page docs-build
HTTP + browser Runtimes
Any cron expression Schedule
SQLite / PostgreSQL Storage
5 channels Alerts
Prometheus Metrics

How it works

Three moves. Then it runs itself.

01

Write YAML

Define steps, assertions, variables, and conditions in a plain file. No SDK, no test code.

02

Put it on cron

Scenarii schedules runs, watches the scenario folder, and keeps every result in SQLite or PostgreSQL.

03

Get the signal

Failures and recoveries go to Telegram, Slack, Discord, email, or your own webhook.

scenarios/api-health.yml
# Run every 5 minutes
name: API health check
schedule: "*/5 * * * *"
base_url: https://api.example.com

steps:
  - name: Get health
    action: http.get
    url: /health
    expect:
      status: 200
      response_time_under: 3000

  - name: Verify build
    action: http.get
    url: /health
    expect:
      json_path: $.build
      json_value: "ok"

  - name: Create session
    action: http.post
    url: /sessions
    body:
      user: monitor
    expect:
      status_in: [200, 201]
Sample runPass 4/4
Get healthhttp.get · expect status 200 204ms
Verify buildexpect.json_path · $.build 12ms
Create sessionhttp.post · status_in [200, 201] 188ms
Check headersexpect.header_contains · running 9ms

Built for the boring part of reliability.

No external database. No proprietary test cloud. A small service that watches your sites and tells you the truth.

Scenarii public status page for Checkout flow with SLA, run totals and response-time history

The whole story, one screen

SLA, response-time trends, success rate, step timings, and every run in one place.

Notifications

Alerts that mean something

Sent on state transitions, with retry and exponential backoff. Not on every single run.

Telegrambot + chat
Slackwebhook
Discordwebhook
EmailSMTP / Mailgun
CustomJSON webhook
Storage 0external services

SQLite, not a cluster

Everything lives in one file. Backups are a copy, not a migration project.

Journal modeWAL
Retention7 days default
Backupsoptional, daily
Databasesingle file
Real-time

Live ticker

WebSocket progress for every step while a run is in flight.

Homepage
Login form
Checkout
Public status

Share the good news

Per-scenario status pages with charts. No auth, no dashboard access.

checkout-flow · operational
/public/status/checkout-flow
Observability

Prometheus native

Run, step, duration, success, and delivery metrics. Scrape it and move on.

# success (1 = pass) scenarii_scenario_success{scenario="api-health"} 1 scenarii_scenario_runs_total{scenario="api-health"} 142 scenarii_step_duration_ms{step="Get health"} 204
01

Hot reload

Settings and the scenario folder are watched. Add, rename, or remove YAML without a restart.

02

Pause and resume

Turn one schedule off from the dashboard without deleting the scenario file.

03

Scenario editor

Create, import, and edit YAML in the browser with syntax highlighting.

04

All HTTP methods

GET, POST, PUT, PATCH, DELETE with headers, JSON body, and form data on native fetch.

05

CLI and API

Validate, trigger, and manage from the terminal. 30+ REST endpoints power the dashboard.

06

One container

Multi-arch image for amd64 and arm64, non-root, with a healthcheck and dumb-init.

07

Node test suite

Built-in runner covering the queue, state machine, variable interpolation, and YAML parsing.

08

Private by default

Session cookies, local roles, OIDC group mapping, and scoped API tokens for CI (read, trigger, admin).

A scenario is just YAML.

Steps, expectations, extraction variables, and conditions. The API and the browser use the same file format.

scenarios/example.yml
# scenarios/example.yml
name: API health check
description: Verify API health every 5 minutes
schedule: "*/5 * * * *"
base_url: https://jsonplaceholder.typicode.com

steps:
  - name: Get posts
    action: http.get
    url: /posts/1
    expect:
      status: 200
      response_time_under: 3000

  - name: Verify JSON content
    action: http.get
    url: /posts/1
    expect:
      status: 200
      json_path: $.userId
      json_value: 1

  - name: Create a post
    action: http.post
    url: /posts
    body:
      title: foo
      body: bar
      userId: 1
    headers:
      Content-Type: application/json
    expect:
      status: 201

Watch it run. Then watch the history.

Dark and light themes, WebSocket updates, trend charts, a seven-day SLA, and shareable public status pages.

Scenarii scenario list with pass and fail status, group, tags, last run, duration and run count
Live tickerCurrent step and response time, streamed over WebSocket.
SLA and trendsSuccess rate, response time, and a configurable SLA window.
Public statusPer-scenario pages without authentication.
Users and rolesLocal accounts or OIDC groups, managed in the dashboard.

Private by default.

Every page is protected, including the dashboard and API. Only the public status pages and health endpoints are open.

Local users

First start creates an admin and prints a generated password once in the logs.

  • admin manages users, roles, and passwords.
  • user browses scenarios, triggers runs, and pauses schedules.
  • HTTP-only session cookies. The last admin cannot lock itself out.
terminal
# add, promote, reset, delete
node dist/index.js user add bob
node dist/index.js user role bob admin
node dist/index.js user passwd bob
node dist/index.js user del bob

OIDC and SSO

Point Scenarii at your provider and roles follow group membership on every login.

  • username_claim falls back to preferred_username, email, then sub.
  • groups_claim accepts arrays, strings, or comma-separated lists.
  • admin_group grants admin. Everyone else gets user.
settings.yml
auth:
  oidc:
    issuer_url: "https://accounts.google.com"
    client_id: "YOUR_CLIENT_ID"
    client_secret: "YOUR_SECRET"
    username_claim: "preferred_username"
    groups_claim: "groups"
    admin_group: "scenarii-admins"

Full authentication reference for route rules, role table, and provider notes.

Runs on one box.

No managed service, no external database. Bring a container and a folder of YAML.

terminal
git clone https://github.com/GiwiSoft/scenarii.git
cd scenarii
npm install
npm run build

# start the server and scheduler
node dist/index.js server

# or run one scenario once
node dist/index.js --once scenarios/example.yml

What happens next

Open http://localhost:3000. The first start prints a generated password for the admin user in the logs.

Scenarios load from ./scenarios. Add, remove, or rename a YAML file and the server picks it up within five seconds.

Settings live in settings.yml and reload on save. Notifications are off until you configure a channel.

Images are published for linux/amd64 and linux/arm64.

Reference

Everything else, one click deep.

The details that belong in docs, not in the pitch.

Authentication

Route protection, local roles, and OIDC group mapping.

Authentication is on by default. Every page is private except the public status pages, and every API route needs a session cookie except health, status, metrics, and auth endpoints. Set auth.enabled: false to turn it off.

Roles

RoleCan do
adminEverything a user can, plus add, promote, demote, and delete users.
userBrowse scenarios, view history and charts, trigger and pause runs.

An admin can neither delete their own account nor change their own role, so the last admin cannot be locked out of user management.

Scoped API tokens

CI and integrations can use bearer tokens instead of a dashboard session. Send Authorization: Bearer <token>. Scopes are read (history, runs, exports, metrics), trigger (start, cancel, pause, resume), and admin (import, delete, backup, users). admin implies the other two. The legacy api_key is treated as an admin token.

settings.yml
api:
  auth:
    enabled: true
    api_key: "LEGACY_ADMIN_KEY"
    tokens:
      - name: ci-read
        token: "READ_TOKEN"
        scopes: ["read"]
      - name: ci-trigger
        token: "TRIGGER_TOKEN"
        scopes: ["trigger"]

Blocking CI call:

curl -X POST -H "Authorization: Bearer $TRIGGER_TOKEN" \
  "http://localhost:3000/api/scenarios/smoke/run?wait=true"
# { "status": "passed", "run_id": 42, "metrics": { ... } }

OIDC notes

  • username_claim is used as the local username. Unset, it falls back to preferred_username, then email, then sub.
  • groups_claim is read as a group list. Arrays, plain strings, and space or comma separated strings are accepted. groups and roles are fallbacks.
  • admin_group membership grants the admin role. Everyone else gets user. Without it, every OIDC user is a plain user.
  • The role is re-derived on every login. Changing group membership applies on the next sign-in.
settings.yml
auth:
  enabled: true
  default_user: admin
  default_user_role: admin
  oidc:
    issuer_url: "https://accounts.google.com"
    client_id: "YOUR_CLIENT_ID"
    client_secret: "YOUR_CLIENT_SECRET"
    redirect_uri: "http://localhost:3000/api/auth/callback"
    username_claim: "preferred_username"
    groups_claim: "groups"
    admin_group: "scenarii-admins"

Notifications

Eight channels, state transitions, webhook routing, per-scenario overrides, retries.

Alerts fire when a scenario changes state: pass to fail, or fail to pass. Delivery retries three times with exponential backoff. The server watches settings.yml and reloads it on change.

Channels

ChannelConfiguration
TelegramTELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID, or the settings file.
EmailSMTP (host/port, optional auth, TLS/STARTTLS, and certificate verification with a custom CA) or Mailgun API key and domain. Multiple recipients. Daily report at 08:00.
SlackWebhook URL. JSON payload with scenario, status, and duration.
DiscordWebhook URL. Embedded message with color-coded pass or fail.
Generic webhookConfigurable method, headers, body template, and HMAC-SHA256 signing over the exact body.
Microsoft TeamsIncoming webhook URL. MessageCard with facts and failed steps.
ntfyServer URL and topic, optional token and priority. Plain-text push notification.
PagerDutyEvents API v2 routing key. Failures trigger; recoveries resolve via the scenario dedup key.

Set notifications.muted: true to silence every channel, or notifications.maintenance with ISO start/end timestamps to suppress alerts during a window. Invalid timestamps fail open rather than muting forever.

Sample configuration

settings.yml
storage:
  retentionDays: 30
  backup:
    enabled: true
    cron: "0 4 * * *"
    directory: "./backups"
    retention: 7  # keep the 7 most recent backups

notifications:
  telegram:
    enabled: true
    bot_token: "YOUR_TOKEN"
    chat_id: "YOUR_CHAT_ID"
  email:
    enabled: true
    from: "scenarii <noreply@your.domain>"
    to:
      - "admin@example.com"
    smtp:
      host: "smtp.example.com"
      port: 587
      username: "your-username"
      password: "your-password"
      tls: false
      rejectUnauthorized: true  # false only for self-signed relays
      # ca: "-----BEGIN CERTIFICATE-----..."  # extra CA, optional
    # Or Mailgun: mailgun: { api_key: "...", domain: "..." }
  slack:
    enabled: true
    webhook_url: "https://hooks.slack.com/..."
  discord:
    enabled: true
    webhook_url: "https://discord.com/api/webhooks/..."
  webhook:
    enabled: true
    url: "https://example.com/scenarii"
    method: POST
    headers:
      X-Environment: "production"
    template: '{"text":"{{event}} {{scenario}} ({{duration_ms}}ms)"}'
    signing_secret: "YOUR_HMAC_SECRET"
    signing_header: "X-Scenarii-Signature"
    signature_prefix: "sha256="
  teams:
    enabled: true
    webhook_url: "https://outlook.office.com/webhook/..."
  ntfy:
    enabled: true
    url: "https://ntfy.sh"
    topic: "scenarii-alerts"
    priority: 4
  pagerduty:
    enabled: true
    routing_key: "YOUR_EVENTS_V2_ROUTING_KEY"
    severity: critical
  muted: false
  maintenance:
    enabled: false
    start: "2026-07-01T22:00:00Z"
    end: "2026-07-01T23:00:00Z"

Per-scenario overrides

settings.yml
scenarios:
  my-scenario:
    ignoreHTTPSErrors: true
    timeout: 60000
    notifications:
      enabled: false

Secrets can be overridden with environment variables such as TELEGRAM_BOT_TOKEN, MAILGUN_API_KEY, MAILGUN_DOMAIN, SMTP_HOST, SMTP_PORT, SMTP_USERNAME, SMTP_PASSWORD.

HTTP actions

Methods, expectations, and step options.

Every step needs a name and an action. HTTP steps use native fetch. No browser or Playwright required.

HTTP steps do not retry by default. Set retries to retry a failed request or expectation, and retry_delay (ms) to control the wait between attempts.

Actions

ActionRequiredOptional
http.geturlheaders, expect
http.posturlheaders, body, expect
http.puturlheaders, body, expect
http.patchurlheaders, body, expect
http.deleteurlheaders, expect

Expectations

ExpectationDescription
status: 200Exact HTTP status code match.
status_in: [200, 201]Status code is one of the listed values.
body_contains: "text"Response body contains the string.
body_matches: "regex"Response body matches the regex.
header_contains: "Content-Type: json"Header contains the value, in "HeaderName: value" form.
header_matches: "X-RateLimit: \\d+"Header matches the regex, in "HeaderName: regex" form.
json_path: "$.user.id"Extract a JSON path, optionally check json_value.
json_value: 42Value at json_path must match.
response_time_under: 3000Response time must be under the given milliseconds.
body_schema: { type: object, required: [id] }Validate the JSON body. Supports type, properties/required, items, enum, pattern, min/max, and nullable.

Step options

FieldTypeDescription
timeoutnumberPer-step timeout. Default 30s for browser, 10s for HTTP.
conditionobject{ if_step: "Step name", if_success: true } skips unless the named step matched.
variablesobjectExtract from JSON responses: { varName: "$.json.path" }. Use {{varName}} later. Missing variables fail the step before the request is sent.
expectobjectAssertions on status, body, headers, JSON, and response time.

Browser actions

Lightpanda via Playwright CDP, with retries.

Browser steps run through a headless Lightpanda instance. Failed steps retry twice, waiting retry_delay ms (default 1000) between attempts. Override per step with retries and retry_delay. browser.evaluate, browser.screenshot, and browser.screenshot_compare never retry.

ActionFieldsDescription
browser.navigateurlNavigate. Falls back to domcontentloaded if load does not fire.
browser.clickselectorClick with actionability checks: visible, enabled, stable, in viewport.
browser.fillselector, valueFill using native setters, reliable with React and Angular controls.
browser.typeselector, valueType and dispatch input plus change.
browser.selectselector, valueSelect an option from a <select>.
browser.checkselectorCheck a checkbox or radio button.
browser.uncheckselectorUncheck a checkbox.
browser.hoverselectorMove the pointer over an element.
browser.clearselectorClear an input or textarea.
browser.pressvalue, optional selectorPress a key (Enter, Escape, Tab, ...), optionally focusing a selector first.
browser.upload_fileselector, valueSet a file input to a path on the runner host.
browser.wait_for_responseurl, optional value, timeoutWait for a matching network response; url supports * wildcards, value filters the method.
browser.assertselector, value, or expectAssert visibility, expected text, or browser expectations; failures fail the step with a readable message.
browser.wait_forselector, timeout, expectWait for an element. Check has_text, not_has_text, or url_contains.
browser.evaluatescriptRun JavaScript in the page context.
browser.scrollvalue or selectorScroll by pixels, or scroll an element into view.
browser.screenshotvalue (path)Full-page screenshot to the given path.
browser.screenshot_comparevalue (baseline path)Compare against a baseline. Creates it on first run, reports diff percentage after.

CLI and server options

Validate, trigger, inspect, and configure.

terminal
# Start API server and dashboard
node dist/index.js server -p 3000 --db db/scenarii.db --scenarios-dir ./scenarios

# Validate without running (checks schema, unknown fields, cron, required fields)
node dist/index.js validate scenarios/example.yml
node dist/index.js validate --all --json

# Run immediately (exits 1 on failure; add --fail-on none to always exit 0)
node dist/index.js trigger scenarios/example.yml

# Target a settings environment profile
node dist/index.js trigger scenarios/example.yml --env staging

# Scheduled scenarios and storage status
node dist/index.js status

# Generate a settings template
node dist/index.js config -o settings.yaml
CommandDescription
serverHTTP server, dashboard, scheduler, and WebSocket. Scenario folder rescanned every 5s.
validate <file>Parse and validate a YAML file without executing it.
trigger <file>Run immediately, with no scheduling.
statusList scheduled scenarios and show database connectivity.
user <action>list, add, passwd, role, del.
config [-o path]Generate settings.yaml with channels commented out.
Server optionDefaultDescription
-p, --port3000HTTP listen port.
--dbautoSQLite path or PostgreSQL URL.
--scenarios-dir./scenariosYAML directory, watched every 5s.
--settingsauto-detectsettings.yaml path. Hot-reloaded.
--envnoneEnvironment profile from settings.environments.

Environment profiles

--env staging applies a profile from settings before the scenario runs. Profile base_url replaces the scenario value, headers merge, and variables/secrets merge into the scenario variables. Values can use {{env.NAME}}, so credentials stay in the process environment.

settings.yml
environments:
  staging:
    base_url: "https://staging.example.com"
    headers:
      X-Environment: "staging"
    variables:
      REGION: "eu"
    secrets:
      API_TOKEN: "{{env.STAGING_API_TOKEN}}"
  production:
    base_url: "https://example.com"
    secrets:
      API_TOKEN: "{{env.PROD_API_TOKEN}}"

API

30+ endpoints behind the dashboard.

REST API
# Scenarios
GET    /api/scenarios                   ?tag=critical
POST   /api/scenarios/import            { "yaml": "..." }
GET    /api/scenarios/export            YAML bundle
GET    /api/scenarios/:name             ?limit=&offset=&days=
GET    /api/scenarios/:name/history
POST   /api/scenarios/:name/run
POST   /api/scenarios/:name/cancel
POST   /api/scenarios/:name/pause
POST   /api/scenarios/:name/resume
GET    /api/scenarios/:name/config
PUT    /api/scenarios/:name/config
DELETE /api/scenarios/:name/config
GET    /api/scenarios/:name/export/json
GET    /api/scenarios/:name/export/csv
GET    /api/scenarios/:name/sla         ?days=7
GET    /api/overview                    ?days=30 cross-scenario stats
POST   /api/scenarios/bulk/run          { tag } or { group }
POST   /api/scenarios/bulk/pause
POST   /api/scenarios/bulk/resume
GET    /api/runs/:id                    one persisted run + steps
GET    /api/runs/:id/diff/:baseId       step status/duration/error diff
POST   /api/scenarios/:name/run         ?wait=true returns run_id + metrics

# Authentication
POST   /api/auth/login
GET    /api/auth/oidc
GET    /api/auth/callback
GET    /api/auth/me
POST   /api/auth/logout

# Users (admin only)
GET    /api/auth/users
POST   /api/auth/users
PUT    /api/auth/users/password
PUT    /api/auth/users/role
DELETE /api/auth/users/:username

# Public and system
GET    /api/public/scenario/:name
GET    /api/status
GET    /api/health
POST   /api/backup
GET    /api/tags
GET    /api/metrics                    Prometheus format

# Inbound webhooks (signature auth, no session)
POST   /api/webhooks/github            X-Hub-Signature-256
POST   /api/webhooks/gitlab            X-Gitlab-Token

Inbound CI webhooks

Run a scenario from a GitHub or GitLab push / pull request. This is the building block for preview-deploy checks: point the provider at /api/webhooks/github or /api/webhooks/gitlab, set the same secret, and map repositories and branches to scenarios.

settings.yml
webhooks:
  enabled: true
  secret: "YOUR_WEBHOOK_SECRET"
  rules:
    - provider: github
      repository: "acme/web"
      events: ["push", "pull_request"]
      branches: ["main", "release/*"]
      scenario: "preview-check"
      variables:
        PREVIEW_URL: "https://preview-{{pr}}.example.com"

Scenarios receive WEBHOOK_EVENT, WEBHOOK_REPOSITORY, WEBHOOK_BRANCH, WEBHOOK_TARGET_BRANCH, WEBHOOK_SHA, and WEBHOOK_PR. GitHub signatures are verified as HMAC-SHA256 over the raw body; GitLab uses the secret token header. Retries are deduplicated for 10 minutes.

Metrics and events

Prometheus export and WebSocket payloads.

Scrape /api/metrics with Prometheus or any OpenMetrics collector. Protect it with the api_key setting and send the key in the Authorization header.

metrics
# HELP scenarii_scenario_runs_total Total run count
# TYPE scenarii_scenario_runs_total counter
scenarii_scenario_runs_total{scenario="Lusk.bzh"} 142

scenarii_scenario_duration_ms{scenario="Lusk.bzh"} 2540
scenarii_scenario_success{scenario="Lusk.bzh"} 1
scenarii_scenario_last_run_seconds{scenario="Lusk.bzh"} 1.756e9

scenarii_step_duration_ms{scenario="Lusk.bzh",step="Homepage",action="http.get"} 127
scenarii_step_success{scenario="Lusk.bzh",step="Homepage",action="http.get"} 1

scenarii_notification_delivery_total{status="success"} 12

Prometheus scrape config

prometheus.yml
scrape_configs:
  - job_name: "scenarii"
    authorization:
      credentials: "YOUR_API_KEY"
    static_configs:
      - targets: ["localhost:3000"]
        metrics_path: "/api/metrics"

WebSocket at /ws

Run completion events:

scenario_run
{
  "type": "scenario_run",
  "run_id": 42,
  "scenario_name": "Lusk.bzh validation",
  "success": true,
  "duration_ms": 2500,
  "timestamp": "2026-06-06T12:00:00.000Z"
}

Step progress, streamed while a run is in flight:

step_progress
{
  "type": "step_progress",
  "run_id": 42,
  "scenario_name": "Lusk.bzh validation",
  "step_name": "Homepage",
  "action": "http.get",
  "status": "running",
  "timestamp": "2026-06-06T12:00:00.000Z"
}

Run it on your own box.

One container. No external database. Your scenarios, results, and credentials stay on your infrastructure.

docker pull ghcr.io/giwi/giwisoft-scenarii:latest