@vensofts-integration-testkit/suite
v0.1.4
Published
Optional bridge between the Authorization Contract SDK and the Relational Scenario SDK: fact mappings, witness synthesis, joint reduction, regression artifacts and replay.
Maintainers
Readme
@vensofts-integration-testkit/suite
The NodeSDK suite: authorization tests that build their own test data. It joins the
Authorization Contract SDK and the Relational Scenario SDK, so you go from contract to test data to
a full authorization run without hand-writing a test record for every case. It also keeps a corpus
of past failures that you replay on every change. Commercial license (see LICENSE).
Node.js 22 or newer. Builds on
authz-core,
authz-pro,
scenario-core and
scenario-pro.
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.
What Pro looks like
Real output from the demo app in this SDK's tests, with a tenant-isolation bug switched on.
Authorization report (authz-pro): 1060 checks, 62 failures, each with its evidence.

Test-data report (scenario-pro): an impossible recipe, explained before any row is written.

More examples, including the CI summary and sensitivity analysis, are on the
authz-pro page.
Features
From contract to test data
synthesizeWitnessesandwitnessesFromAbstractwork out which users and records your contract needs to test every rule: a user with the highest role in another tenant, active and revoked grants, a suspended member, and a record in every state. They turn those into recipe aliases.- The Scenario SDK generates and loads that data.
worldFromSnapshotturns the generated data back into the authorization world.- Sensitivity analysis points at the missing records, and synthesis adds them.
Regression loop
runRegressionruns a failing case.reduceSequenceshrinks a sequence of lifecycle steps, such as grant, revoke and read.reduceJointlyshrinks the data and the steps together.
The result is a small, hash-indexed regression artifact you can commit.
Corpus replay: the witness CLI
npx witness replay --corpus regressions/ --license license.jsonEach stored regression gets one of these verdicts:
| Verdict | Exit | Meaning |
| ------------------- | ---- | -------------------------------------------------------------------------------- |
| passed | 0 | The bug is fixed |
| reproduced | 1 | Still broken, with the identical failure signature |
| different-failure | 1 | Fails, but differently |
| stale | 3 | The contract changed since the regression was recorded; re-approve it explicitly |
| inconclusive | 3 | Could not decide |
A stale regression is never re-baselined silently.
Install
npm install --save-dev @vensofts-integration-testkit/suite @vensofts-integration-testkit/authz-core @vensofts-integration-testkit/authz-pro \
@vensofts-integration-testkit/scenario-core @vensofts-integration-testkit/scenario-pro @vensofts-integration-testkit/scenario-postgres pgPass your license with --license license.json or license: { file: 'license.json' } in
witness.config.mjs. Keep the file out of public repositories and store it as a CI secret. It is
checked offline, with no network call. Without a valid license, the paid features stop with exit
code 5 and a clear message.
