> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://tester.army/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://tester.army/_mcp/server.

# Local Development

Use the CLI to validate changes against your local dev server before pushing.

`ta tests run` queues remote dashboard runs by default. Local execution is the
exception for dev-server loops: pass `--local` to run dashboard tests in a
local browser on your machine.

## Set your target URL

Set the target once for the session:

```bash
export TESTERARMY_TARGET_URL="http://localhost:3000"
```

Or pass it per-run:

```bash
ta tests run <testId> --local --url http://localhost:3000
```

## Run tests

Start your dev server, then run dashboard-defined tests locally:

```bash
# Run a single test
ta tests run <testId> --local

# Run all tests in a group
ta tests run --group <groupId> --project <id> --local
```

## Add project memory

Use memories to give the agent durable project context before it runs tests:

```bash
echo '{"category":"site_structure","title":"Auth route","content":"Login is at /login","importance":"high"}' | ta memories create --project <projectId>
ta memories list --project <projectId>
ta memories delete <memoryId> --project <projectId>
```

## Headed mode

Watch the AI agent work in a visible browser:

```bash
ta tests run <testId> --local --headed
```

Useful for debugging flaky tests or understanding agent behavior.

## Debug mode

Save detailed logs and transcripts to `.testerarmy/`:

```bash
ta tests run <testId> --local --debug
```

Check `.testerarmy/<timestamp>/debug-run.json` for the full stream/tool transcript.

## Inspect artifacts

Every run writes to `.testerarmy/<timestamp>/`:

* `run-meta.json` - run metadata
* `result.json` - pass/fail results
* `debug-run.json` - full transcript (with `--debug`)

List recent runs:

```bash
ta runs list --project <projectId>
```

## Typical workflow

```bash
# 1) Start dev server
pnpm dev

# 2) Set target
export TESTERARMY_TARGET_URL="http://localhost:3000"

# 3) Make changes

# 4) Run targeted test
ta tests run <testId> --local

# 5) Check results, iterate
ta runs list --project <projectId>
```

## CI usage

Prefer remote runs in CI so results land in the dashboard — see
[`ta ci`](/cli/agentic-usage) or `ta tests run --group <groupId> --project <id> --wait --json`.

To execute on the CI machine's own browsers instead, set `TESTERARMY_API_KEY`
and `TESTERARMY_TARGET_URL` and pass `--local`:

```bash
ta tests run --group <groupId> --project <id> --local --parallel 3 --json
```

Exit code `1` on any test failure - your pipeline fails automatically.

```yaml
- name: Run QA tests
  run: npx testerarmy tests run --group <groupId> --project <id> --local --parallel 3 --json
  env:
    TESTERARMY_API_KEY: ${{ secrets.TESTERARMY_API_KEY }}
    TESTERARMY_TARGET_URL: ${{ steps.deploy.outputs.url }}
```