When to use this mode
- Your app is one repository (Next.js, Remix, Express, Vite, etc.).
- It runs with one command —
npm run dev,npm start, or similar. - You want the agent to test the exact code in the PR, not a separate preview deployment.
Set it up
From the project page, open Environments → New environment and choose Single repo.- Repository and branch. The branch is the default to test against (typically
main). On a PR, QLane uses the PR’s head commit automatically. - Install command. Defaults to
npm install. Swap inyarn,pnpm, orbunif needed. - Start command. What boots your app — for example
npm run devornpm start. - Port. The port your app listens on (
3000for most Next.js apps). - Environment variables. Add anything the app needs to boot. Mark sensitive values as secret to redact them from logs.
Enable PR testing
Back on the project page:- Click the PR testing card.
- Select the environment you just created as the target.
- Toggle it on.
What QLane does on each PR
- Clones your repo at the PR’s head SHA.
- Provisions a fresh, isolated sandbox.
- Runs your install command, then the start command.
- Waits for the app to come up on the configured port.
- Connects the agent and runs your active test cases plus any drafts generated from the PR diff.
- Posts a GitHub check and, if anything broke, a structured review.
What the agent can do in this mode
In addition to a real browser, the agent gets:- Shell access inside the sandbox (
bash,readFile) — it can inspect logs, check files it wrote, and re-run commands. - Code awareness — it reads the repo to understand failures and write better repros.
- Deep testing — when stuck, the agent can add temporary instrumentation, re-run, and observe. The sandbox is torn down after the session, so changes don’t escape.
Common gotchas
- Native dependencies. Anything that needs a system library should be in your package’s install hooks. The sandbox is Linux-based; macOS-only build steps will fail.
- Long-running builds. If your dev server takes more than a minute to be ready, set a custom ready check in the environment to a URL or HTTP code the agent should wait for.
- Required env vars. Your app likely needs an auth secret, database URL, etc. Set them on the environment — without them the app won’t boot and the session will fail before the agent even connects.

