> For the complete documentation index, see [llms.txt](https://docs.testvibe.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.testvibe.com/testvibe-api/guides/run-in-ci.md).

# Run TestVibe in CI

`testvibe run --all --wait` runs every generated feature and exits non-zero when any of them fails — that's the whole integration. Point it at the environment you just deployed and let the exit code gate the pipeline.

## GitHub Actions example

{% code title=".github/workflows/e2e.yml" %}

```yaml
e2e:
  runs-on: ubuntu-latest
  needs: deploy-staging
  steps:
    - uses: actions/setup-node@v4
      with: { node-version: 20 }
    - run: npm install -g @testvibe/cli   # or from your fork of the repo
    - run: testvibe run --all --url "$STAGING_URL" --wait
      env:
        TESTVIBE_SERVER: ${{ vars.TESTVIBE_SERVER }}
        TESTVIBE_API_KEY: ${{ secrets.TESTVIBE_API_KEY }}
        TESTVIBE_PROJECT: ${{ vars.TESTVIBE_PROJECT }}
```

{% endcode %}

The same shape works anywhere — only the env-var syntax changes.

## Practical notes

* **Use env vars, not `testvibe login`**, in CI — `TESTVIBE_API_KEY` / `TESTVIBE_SERVER` / `TESTVIBE_PROJECT` ([config precedence](/testvibe-api/cli/cli.md)). Create a dedicated key for CI so it can be revoked independently.
* **`--url` targets the deployment under test** (a preview URL, staging) without touching the project's configured URL.
* **`--all` runs the whole suite** (one cloud run per generated feature, summarized at the end); name features instead (`testvibe run Login Checkout --wait`) or keep a single broad "smoke" feature when you want a faster gate.
* **Tests run in TestVibe's sandboxes, not your runner** — the CI job is just dispatch + poll, so it's cheap; the target URL must be reachable from TestVibe's cloud, not from the runner.
* **Artifacts on failure:** `testvibe runs artifacts <runId>` prints short-lived trace/screenshot links you can echo into the job log; the run is also waiting in the TestVibe app.

{% hint style="info" %}
Want the run to *create or update* tests too? That's a generation concern, not a CI one — keep `generate` interactive (it consumes credits and takes minutes) and let CI only `run` what's already `generated`.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.testvibe.com/testvibe-api/guides/run-in-ci.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
