Skip to main content
kane-cli explore sends an explorer through your app. It clicks, types and follows links the way a curious tester would, and builds a map of what it finds: the app’s screens, the flows between them, and findings: things that look broken, and places it couldn’t get past, each with its evidence. While it explores, it also designs tests from what it mapped, into your Test Manager project: the same kind of tests assurance designs from a document. How kane-cli explore works: kane-cli explore run sends the explorer, on HyperExecute, through your app (or localhost through an LT tunnel) and builds the map of screens, flows and findings. While it explores, design jobs save use-cases, scenarios and tests to your Test Manager project, and kane-cli context pull brings them into your folder Use exploration when you have an app but no written requirements, or to find what your documents missed. Use assurance when you have a PRD or a spec. Both put their tests in the same project, so you can do both. Each project has one exploration of one URL. Every run adds to that exploration’s map.

Before you start

Exploration runs on HyperExecute by default: kane-cli queues the run there, and the run goes on without your machine (except for a tunnel, below).

Your first exploration

  • --project is the project the exploration belongs to. Always pass it. explore doesn’t read a folder’s link to a shared project; without --project it uses the project kane-cli is configured with, which may not be your team’s.
  • --url is where it starts. The exploration keeps this URL.
  • --prompt says what to explore and why, in your words. The explorer works within it; the hard limits are --allow-domain and --deny (below).
  • --policy read_only blocks write requests and never presses controls such as Delete, Sign out and Pay. The default can change data: see Can it change my data? before you leave it out.
  • --max-leases 40 is a good first limit: it stops after 40 pieces of work (kane-cli calls them leases).
On a terminal, kane-cli shows a review of your settings (or a setup form, if something is missing). Launch it, and you see ● queued on HyperExecute · run … · <job link>, then a live view: the run’s state and policy, the time so far, and leases · screens · flows · findings · credits as they grow. Ctrl+C detaches: the run keeps going on HyperExecute. The lines printed when you detach give the full exploration id and the commands to watch, map or stop it; when the run ends, they give the map command. Your exploration id. Most commands below take it. It’s in those lines; or run plain kane-cli explore, pick the project, and use the exploration’s card (its map, its last run, and run again, watch, stop, map, sessions, assurance context, delete). kane-cli explore view --project <project-id> opens the map with no id at all.
Every run takes its options again. A run keeps the exploration’s URL and map, and nothing else you passed: policy, prompt, sign-in steps, domains, variables, limits and tunnel all start from their defaults. The policy’s default is mutating, so pass --policy read_only again on every run that mustn’t change data.

Can it change my data?

Yes, by default. --policy decides:
  • Every mutating run says so before it starts. On a terminal, your first mutating run in a project also asks you once.
  • read_only has three exceptions: the setup steps you give in --deps (a sign-in, for example) run as written, so put in --deps only what you’re happy for it to do; the POST endpoints you let through with --allow-post; and the one click that ends an app session it opened. It can’t stop an app that changes data on an ordinary page load.
  • Some apps read their data with POST requests (GraphQL, for example), so under read_only they show no data. Let through only endpoints you know only read: --allow-post api.example.com/graphql (repeatable). Its host must be the --url’s or one you add with --allow-domain, so here also pass --allow-domain api.example.com.
Use mutating on a test or staging copy of your app, never on data you care about.

An app behind a login

Tell the explorer how to get in with --deps, and keep the values in a variables file:
  • --deps always needs --allow-domain: name every host it signs in or writes on, the --url’s own host too if that’s where it signs in (--allow-domain app.example.com). Use a project of its own: one project explores one URL.
  • You can also keep the values in .testmuai/variables/*.json (see Variables & context). Only the names your --prompt and --deps use are sent. Names are letters, digits and _ (login_email, not login-email); LT_USERNAME and LT_ACCESS_KEY are taken.
  • Secrets ("secret": true) go to your HyperExecute Secrets. Other values go to your organisation’s Test Manager variables, and replace any variable of the same name there, so pick names your team can share. A value never travels in the request itself. kane-cli also keeps your username and access key in HyperExecute Secrets, for the run to sign in to with.
  • A {{name}} no variables file defines stops the run before it starts. An empty secret stops it as failed:secrets_missing, so fill in your values first.
  • Keep --max-parallel at 1 (the default) if the app allows one session per account: each extra browser signs in on its own.
  • If the sign-in doesn’t work, the run stops as failed:setup_failed: check the values, and every sign-in host in --allow-domain.

An app on localhost or a private network

The cloud’s browsers can’t reach localhost or your private network on their own. They reach it through a tunnel (LT) that runs on your machine:
  1. If LT --version doesn’t work, download LT and put it on your PATH: For example, on an Apple silicon Mac:
    If macOS blocks it from opening: xattr -d com.apple.quarantine /usr/local/bin/LT.
  2. Start the tunnel as the same user kane-cli is signed in as, and leave it running:
    ($LT_USERNAME and $LT_ACCESS_KEY are your username and access key: set them in your shell first. Where to find your access key.) --env ht-prod is required. Wait until LT says the tunnel is connected.
  3. In another terminal, explore through it:
    --tunnel-name must match --tunnelName from step 2, and it turns the tunnel on. With only one tunnel running, --tunnel alone is enough. Use a project of its own: one project explores one URL.
  • Keep the tunnel and your machine up until the run ends; kane-cli reminds you when the run starts. If the tunnel drops, pages stop loading.
  • Pass the tunnel flag again on every run, with your other options (see the box under Your first exploration).
  • A tunnel needs cloud browsers: with --local-orchestration and your own Chrome, --tunnel is refused (your Chrome already reaches your machine).

Keeping it in bounds

How many controls it tries per screen (--depth-caps), what counts as slow (--slow-budget) and whether new findings are checked again (--no-recheck) are in kane-cli explore run --help, with their values and defaults.

Watching, stopping, running again

The map. Open it in your browser:
It serves the map on your machine until you press Ctrl+C, and follows a live run from anywhere you’re signed in.
  1. Find your way: zoom from areas of the app, to screens and the flows between them, to each screen’s details and controls. Press / to search by name or URL.
  2. Follow a flow: open it to see its steps, screen by screen.
  3. Check a finding: open it for its evidence: the screenshots, the steps that led there, and the network and console logs. Promote it to a bug, or mark it resolved.
  4. Teach the next run: leave labels and notes, mark a flow or a finding correct or incorrect, and mark a screen or a control do not touch. The explorer reads them when its next run starts, so they’re read-only while a run is going.
The map also shows what each flow cost to find, and what each run spent. Runs.
Stop a run: kane-cli explore stop <id>. A queued run stops at once. A running one finishes the work in hand, keeps it, then stops; the command waits for that unless you pass --no-wait. Run it again: kane-cli explore run --project <project-id> with your options again (policy, prompt, sign-in, domains, variables, limits, tunnel). It goes on the same exploration and its URL, and adds to the map. Only one run at a time: while one is queued or running, another is refused (RUN_ACTIVE). Explore another site: use another project. A project’s one exploration explores one URL, so a different --url is refused. If you’d rather reuse the project, kane-cli explore delete <id> (it asks first; --yes when piped; refused while a run is queued or running) frees it for a new exploration of any URL. Its map is gone from every command, but the use-cases and tests designed for the first site stay in the project, and a pull brings them along with the new site’s.

The tests it designs

While an exploration’s assurance context is on (the default), design jobs (kane-cli calls them assurance jobs) turn what it mapped into use-cases, scenarios and tests in its project, with a Test Manager case for each scenario. A job runs when a run ends, and every few minutes during a long run when enough has changed. Exploration designs and saves tests; it never runs them.
  • explore context status shows how many use-cases the last job added and changed, how many tests it designed and saved (and any that failed), what it left for you to review, and the credits it used. (With --agent it also lists each saved test’s Test Manager case, or why it has none yet.)
  • kane-cli explore run … --no-context starts a new exploration with design jobs off, for a map only. For an existing exploration, use explore context off. Turning it off doesn’t stop a job that’s already running.
  • The use-cases it designs were not reviewed by a person, so they show as proposed. Their source is explore-<exploration id>: in a folder linked to the project, kane-cli context list shows it.

No tests were designed

If nobody had shared the project yet, the exploration’s first design job shares it, as you. If you’re not allowed to create test cases there, it can’t, and explore context status says the context is blocked. Ask a Test Manager admin for permission to create test cases, or ask someone who has it to share the project. Once you have permission, turn the context off and on again (explore context off <id>, then on).

Get the tests into a folder and run them

The tests are in the project as soon as a design job saves them (explore context status <id> says so). To run them on your machine, bring them into a folder:
In a folder that’s already linked to the project, kane-cli context pull is enough.
  • The pull lists each test it wrote, and the variables those tests need: a start-page URL, or an app’s sign-in values, for example. Put them in .testmuai/variables/assurance.json (the format above). If the project has no tests yet, the pull says so: wait for a design job.
  • Each test arrives with no recorded steps yet, so its first run writes them in a real browser. That takes minutes and uses more credits than a replay. Later runs replay the steps for far fewer.
  • These tests run in Google Chrome on your machine, so install it first (if kane-cli can’t find it, see Chrome failed to launch).
  • Open a test to see what it checks, then run the ones you want: kane-cli testrun run .testmuai/tests/<name>_test.md. kane-cli cover then shows the project’s coverage, the exploration’s use-cases included.
See Shared projects in the kane-cli repository for what a pull writes and how to update tests that changed.

Exit codes

explore run on a terminal: 0 if you detach with Ctrl+C. If you watch until the run ends, it exits with the run’s own code: 0 completed or budget, 1 failed, 3 stopped. explore list, sessions, stop and delete: 0 done; 1 refused (for example RUN_NOT_ACTIVE on a stop when nothing is running, or “No” to a delete) or the service failed; 2 bad input, a missing --yes, an unknown exploration, or no sign-in.

Troubleshooting

Driving exploration from an AI coding agent: every explore command takes --agent (Agent Mode).