Test the product you actually deployed
Write what a user does as plain Scenarios, run them against your staging or production site, and see every screen they reach in one map. When the product allows it, Hunt also stubs the payment provider and jumps the clock past a trial, so the cases that are hard to reach become Scenarios too.
Hunt 0.1.0 is published as a Linux binary and as the npm SDK @slopkit/hunt. It is early, and runs on your machine and in your CI. Source in the product repo. Part of SlopKit.
Feature: Cart @smoke Scenario: Adding two items Given an empty cart When I add 2 items at 5 euros each Then the cart total is 10 euros
✓ Cart › Adding two items (6 ms) ✓ Given an empty cart ✓ When I add 2 items at 5 euros each ✓ Then the cart total is 10 euros 1 scenarios: 1 passed, 0 failed, 0 undefined, 0 ambiguous
What a team gets
- Scenarios you can readScenarios in
.featurefiles, written as Given, When and Then lines, with Steps in TypeScript that run on Node, Bun or Deno. - The real, running productRuns against a deployed product: a browser, HTTP calls and read-only database checks.
- A Baseline you reviewScreenshots and data kept as files you commit, so a change to how the product looks is a diff in a merge request.
- An Experience MapFor product and design: the screens users can reach, their states and the paths between them, built from recorded runs.
- Room to grow in CIParallel Workers, Cucumber Messages output and a GitLab CI component for a smoke set and a nightly full run.
Why Hunt instead of a hosted browser-testing service
- You can test cases a hosted browser can only watch from outside
- In a Controlled Environment a Scenario can register a Stub for the payment provider and shift the clock. The Stub and the shift end with the Scenario. In an Observed Environment you still get the browser, HTTP and read-only data checks.
- The Baseline is files, not a vendor account
- Snapshots live in your repository in the Jest
__snapshots__format. Hunt writes a new Snapshot the first time it sees one. After that a mismatch fails the run until someone accepts the update, and the update is reviewed in a merge request. - An agent can try a Step before you commit it
hunt exploreruns inline Steps against your real Step definitions and records nothing. When the Steps work, an Exploration can be promoted into a Scenario.
Why Hunt instead of assembling your own runner
Clock Shifts, Stubs and code mapping come from sibling SlopKit products that Hunt drives from the same Step context, so you do not glue them together yourself. Hunt does not reimplement them.
Applies Clock Shifts to running processes. It is Hunt's main Clock Driver. A product can also supply its own time-setting Step as a Clock Driver.
jetlag.slopkit.dev DecoyStubsIntercepts a process's DNS and HTTP(S) traffic and answers it from rules registered at runtime. Hunt's Stubs are Decoy rules.
decoy.slopkit.dev StalkerMapping RunsCollects traces, logs, metrics, profiles and per-request function coverage from running software without instrumentation code. Hunt reads that data during Mapping Runs.
stalker.slopkit.dev ratStorageStores what Stalker sends. Hunt reads each Step's Function Coverage from rat.
rat.slopkit.devA Scenario run, end to end
- You tag a Scenario
@controlledand write Steps that sign up, shift the clock past a trial, and upgrade with a declined card and then an accepted one. - Hunt runs it through your Step Host. Every Step sends trace context with the run, Scenario and Step ids.
- Steps declare Screens. Hunt takes the screenshot Snapshots and compares them with the Baseline.
- When the Scenario ends, Hunt removes its Stubs and resets the clock.
Words used here
- Scenario
- A named, saved example of one behavior, written as Given, When and Then lines.
- Step
- One reusable Given, When or Then line, backed by a browser or HTTP action or an assertion.
- Step Host
- The process, in the JavaScript runtime you choose, where your Step definitions run.
- Environment
- A deployed instance of the product under test, such as staging or production. You provision it. Hunt does not.
- Observed Environment
- One Hunt can only reach from the outside, through a browser and HTTP.
- Controlled Environment
- One that cooperates, so Scenarios can also use Stubs and Clock Shifts.
- Stub
- A stand-in for a third-party service such as payments, email, SMS or OAuth. A Scenario registers it for that Scenario only.
- Clock Shift
- A forward jump or freeze of the time seen by the whole Controlled Environment. It holds the Environment until it is reset, so a Scenario that uses it is tagged
@controlledand runs alone. - Screen
- A named place in the product that a Step says it has reached. Screens are the nodes of the Experience Map.
- Snapshot
- A recorded value that later runs must match: a Screen's screenshot, or data a Step asked to capture.
- Baseline
- All of a product's Snapshots as committed on its main branch. A change to it is accepted by approving and merging the merge request that changes it.
- Experience Map
- A browsable atlas of the product's user-facing journeys, compared against the Baseline.
- Exploration
- An unsaved run of inline Steps, put together by an agent or a person during a working session. It never changes the Baseline and can be promoted into a Scenario.
- Mapping Run
- A dedicated run that records which code each Step touched, so a code change can be traced to the Scenarios and Screens it affects.
Limits today
- Without a
[server]inhunt.toml, a changed screenshot whose Baseline image is not on this machine is reported as unverified and does not fail. - One Browser Adapter (agent-browser) and one kind of Data Source (Postgres). A Clock Shift does not move the browser's clock.
- Jetlag, Decoy and Stalker have no published release yet. Their Kubernetes, Docker and kernel Sensor paths are not yet verified on real infrastructure.
- Function-level coverage in a Mapping Run works on Node and Rust. Bun has per-file coverage only.
- Native mobile apps, security testing and contract testing between a product's own services are out of scope.
Run your first Scenario
Getting started builds hunt from the 0.1.0 tag, writes a Scenario and runs it. The docs cover the commands, hunt.toml, the Step API and the glossary. The repo README also lists the release binary and the npm SDK.