@vensofts-integration-testkit/scenario-pro
v0.1.4
Published
Relational Scenario SDK Pro: constraint-preserving, graph-aware failure reduction against a real application.
Maintainers
Readme
@vensofts-integration-testkit/scenario-pro
Pro features for the NodeSDK Relational Scenario SDK: shrink a failing dataset to a minimal
regression, start from ready-made business scenarios, and share readable reports. Commercial license
(see LICENSE).
Works with @vensofts-integration-testkit/scenario-core
and @vensofts-integration-testkit/scenario-cli.
Node.js 22 or newer.
Pricing
The free packages (authz-core, authz-cli, scenario-core, scenario-postgres, scenario-cli,
license-core, test-witness) need no license file. The Pro features need a trial or Pro license
file; one license covers every Pro package: authz-pro, scenario-pro and suite.
| Plan | Price | Includes | | --------- | ------------------------------- | --------------------------------------------------------------------------- | | Trial | Free for 14 days | Every Pro feature, to try on your own project. Expires after 14 days. | | Pro | USD 299 / year per organization | Every Pro feature for your whole organization, email support. Renew yearly. |
When a license expires, the Pro features stop with exit code 5 until you renew; the free packages keep working. The command line reminds you during a trial and in the last 14 days of a license.
To start a trial or buy Pro, email [email protected] with your organization's name. You receive an invoice, and after payment a license file.
Features
Failure reduction (scenario.reduction)
Your test fails on a dataset with thousands of rows; reduceFailure finds a small dataset that
fails the same way.
- It confirms the failure several times, so a flaky test is reported as
unstable, not reduced. - It removes groups of related rows, then single rows (ddmin), then simplifies values.
- Every candidate is checked against your schema before your test runs, and only candidates with the same failure signature are kept.
You get the reduced dataset, a diff and a full trace. The result is a local minimum under these steps, not a global one.
Recipe packs (scenario.packs)
Ready-made schemas and recipes you can adapt:
- Orders and refunds: line items with exact totals, discounts, orders with two partial refunds, refunds that never exceed the order total, and refund currency matching the order.
- Subscriptions and quotas: trial, active, expired and cancelled plans, usage just below, at and just above the quota, and a trial that expires exactly at the test clock. These come from a pairwise covering array: every pair of values from any two dimensions appears in some scenario.
Load one with loadPack('orders', entitlement) or loadPack('subscriptions', entitlement).
HTML report (scenario.reports)
A standalone page with planning explanations, SVG dependency graphs for unsatisfiable recipes, validation, coverage, drift and reduction history. It makes no network requests, and is tested for accessibility (no serious or critical issues) in light and dark mode.
See what you get
HTML report. Here a recipe asks for 3 pricing plans with unique codes but only allows two codes. The report proves it is impossible before any row is written, and shows why as a dependency graph:

Use with the CLI
npm install --save-dev @vensofts-integration-testkit/scenario-cli @vensofts-integration-testkit/scenario-core @vensofts-integration-testkit/scenario-pro
npx scenario reduce --fixture failing.json --out reduced.json --license license.jsonreduce uses the harness from your scenario.config.mjs: a function that runs your test on a
dataset and reports whether it fails. Instead of --license, you can set
license: { file: 'license.json' } in the config.
Use as a library
Also install @vensofts-integration-testkit/license-core, which loads and checks the license file.
import { readFileSync } from 'node:fs';
import { entitlementOrThrow } from '@vensofts-integration-testkit/license-core';
import { loadPack, reduceFailure, renderScenarioHtml } from '@vensofts-integration-testkit/scenario-pro';
const entitlement = entitlementOrThrow(readFileSync('license.json', 'utf8'), { product: 'scenario' });
const orders = loadPack('orders', entitlement);The license file
- Don't commit it to a public repository. In CI, store it as a secret.
- It is checked offline: no network call and no machine fingerprint.
- Without a valid license, a Pro feature stops with exit code
5and a clear message. It never silently does less.
