> For the complete documentation index, see [llms.txt](https://docs.bugbug.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bugbug.io/quick-start/your-first-automated-flow.md).

# Your first automated flow

Setting up a fully automated regression workflow ensures that your critical user flows are continuously tested without manual effort. It helps you catch issues early, reduce the risk of regressions, and maintain confidence in every release.

With test automation in place, your team can move faster while keeping product quality consistent.

Follow the steps below to set up your first automated test workflow with BugBug. You can create your test by recording it in the browser or by asking your AI agent to build it through [BugBug MCP](/ai-testing/mcp.md).

### 1. Install Test Recorder

To record tests and run them locally, you need to install [**the BugBug Chrome Extension**](https://chromewebstore.google.com/detail/bugbug-automation-testing/oiedehaafceacbnnmindilfblafincjb?hl=en-US\&utm_source=ext_sidebar) and enable it in Incognito mode.

1. Install the **BugBug Chrome Extension** from the Chrome Web Store.

<figure><img src="https://3168433179-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MKixgeBPbLvnD0l1eiV%2Fuploads%2FVvgslBkDmC4EpLso0FFG%2FScreenshot%202026-03-31%20at%2015.35.28%201.png?alt=media&amp;token=39eef28a-af03-4915-870c-4d9aca88eca0" alt=""><figcaption></figcaption></figure>

2. Open Chrome Extensions settings and enable **Allow in Incognito** for BugBug.

{% hint style="info" %}
**Why this matters**

BugBug runs tests in an incognito window to ensure a clean, isolated environment without cached data, cookies, or extensions interfering with your test results.
{% endhint %}

3. Make sure the extension is pinned for quick access while recording tests.

{% hint style="success" %}
**Tip:** Before recording your first test, close any unnecessary tabs and make sure you’re logged out of your app - this helps simulate a real user journey more accurately.
{% endhint %}

***

### 2. Create your test

Choose how you want to create your first automated test.

{% tabs %}
{% tab title="Record in the browser" %}
With the BugBug Test Recorder, you can now create your first automated test.

1. Enter the URL of the web app or website you want to test.
2. Click the **Start recording** button.

<figure><img src="https://3168433179-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MKixgeBPbLvnD0l1eiV%2Fuploads%2FwWRoACvh5WBDwdinY2FE%2Funknown.png?alt=media&amp;token=2f6d753e-8618-4b88-9a37-a0291df08d89" alt=""><figcaption></figcaption></figure>

Your application will open in a new incognito window, and you’ll see the BugBug recorder overlay in recording mode.

3. **Interact with your app** just like a real user would - click, type, navigate between pages, and complete actions. BugBug automatically captures these interactions and converts them into test steps.

<figure><img src="https://3168433179-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MKixgeBPbLvnD0l1eiV%2Fuploads%2FPDPk1d1NItBdAFpxSg8G%2FGroup%206.png?alt=media&amp;token=e3754810-4013-431c-8a50-cbdf83a689c3" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
**Important**

Hover actions are not recorded automatically. If your test depends on hover states (e.g., dropdown menus), you’ll need to add those steps manually.
{% endhint %}

4. **Add assertions** to verify key elements of your flow like: login success, dashboard visible, checkout confirmation, etc.
5. When you’ve finished recording all necessary steps, click **Finish and close** in the recorder overlay. Your test will be saved automatically.

You now have your first automated test 🎉

{% hint style="info" %}
[Read the full test creation guide.](/creating-tests/recording-the-tests.md)
{% endhint %}
{% endtab %}

{% tab title="With an AI agent" %}
With [BugBug MCP](/ai-testing/mcp.md), you describe the flow in plain language and your AI agent builds the test in your BugBug project.

1. Connect your AI client with [BugBug Plugin](/ai-testing/plugin.md), for example `npx @bugbug-io/cli plugin --agent=claude`, and complete the OAuth sign-in.
2. Describe the flow, the expected result and the target project. For example:

```
For <project>, create a BugBug test for this flow: open <application URL>,
sign in with the test user, and assert that the dashboard is visible.
You are authorized to create this test and run it once in the cloud.
If selectors, credentials or expected content are missing, ask me before continuing.
```

3. Open the test in the BugBug app and review the steps and assertions the agent created.

You now have your first automated test 🎉

{% hint style="info" %}
BugBug MCP requires a **Pro or higher** plan. See [How to use AI with BugBug?](/ai-testing/how-to-use-ai-with-bugbug.md) for more ready-to-use prompts.
{% endhint %}
{% endtab %}
{% endtabs %}

***

### 3. Run your test

To validate that the steps work correctly, you need to run the test.

We recommend starting with a local run, and then verifying the results again in the cloud. If your AI agent created the test and already ran it in the cloud, you can review that run and go straight to step 4.

1. Open your test in the editor view (where your test steps are visible).
2. Click the **Run** button.

<figure><img src="https://3168433179-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MKixgeBPbLvnD0l1eiV%2Fuploads%2FU9UwsmwAfJvs2huLkQfo%2Fimage%2011.png?alt=media&amp;token=09fc761e-8345-4317-9e35-a33fc6bb7e33" alt=""><figcaption></figcaption></figure>

BugBug will open a new *incognito* *window* and replay all test steps.

3. You can watch the test execution in real time. If everything works correctly, you’ll see a **Test Passed** status in the BugBug recorder overlay.

<figure><img src="https://3168433179-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MKixgeBPbLvnD0l1eiV%2Fuploads%2FiOMhUvH0oaMb1vjsBCMF%2Fimage%2012.png?alt=media&amp;token=584f70ca-bce2-4ddd-af37-6b6a2bf994ee" alt=""><figcaption></figcaption></figure>

**If the test fails:**

* Review the step where the failure occurred
* [Check the error codes](https://docs.bugbug.io/debugging-tests/error-codes)
* Check selectors, timing, or missing assertions
* Ask your AI agent to diagnose the failed run through [BugBug MCP](/ai-testing/mcp.md) - it inspects the failed step, screenshots, logs and DOM, and proposes the smallest fix
* Update the test and run it again

{% hint style="success" %}
**Tip:** It’s normal for the first run to reveal small issues (e.g., timing or dynamic elements).

[Read this best practices guide on how to prepare your app for automated testing.](https://docs.bugbug.io/best-practices)
{% endhint %}

Once your test passes, you’re ready to move on to the next step.

***

### 4. Create test suite

Once your first test is ready and validated, the next step is to **group it into a test suite**.

Test suites allow you to organize multiple tests and run them together as a regression workflow.

1. Go to the **Suites** section.
2. Click the **New suite** button.
3. Give your suite a clear name, for example: Regression - Core flows.
4. Add your test to the suite.

{% hint style="success" %}
**Tip:** Group tests by feature or user journey (e.g., login, checkout, onboarding) to keep your suites maintainable and easy to scale.
{% endhint %}

You now have a basic regression suite.

{% hint style="info" %}
[Learn more about Suites.](/organizing-tests/suites.md)
{% endhint %}

***

### 5. Run the suite in the cloud

Running tests locally is useful for quick validation, but to **fully automate** regression testing, you should run your suite in the cloud.

1. Open your test suite.
2. Click the **Run in cloud** button.
3. After the run finishes, review the results, screenshots, and logs to verify everything works as expected.

<figure><img src="https://3168433179-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MKixgeBPbLvnD0l1eiV%2Fuploads%2FMeLe0uJj8MHrPdDntm6Z%2Fimage%2014.png?alt=media&amp;token=595b19e4-37b3-43f5-a548-0b0123ccc626" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
**Tip:** Cloud runs eliminate dependency on your local machine and allow faster execution, especially as your test suite grows.
{% endhint %}

***

### 6. Schedule automated runs

Automated testing becomes **powerful when it runs automatically**. To turn your suite into a true regression workflow, you need to run it automatically on a schedule.

1. Go to the **Schedules** tab.
2. Click the **Create schedule** button.
3. Choose the suite you want to run automatically.

<figure><img src="https://3168433179-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MKixgeBPbLvnD0l1eiV%2Fuploads%2F91gKTMhiryjya2hAjhLh%2Fimage%2015.png?alt=media&amp;token=88c95f91-8ccc-4b81-a3a7-b826b8401e77" alt=""><figcaption></figcaption></figure>

4. Choose how often you want to run your tests (e.g., every day, every hour, or after each deployment).

{% hint style="success" %}
**Tip:** Start with daily runs and increase frequency as your confidence in test stability grows.
{% endhint %}

Your regression suite will now run automatically without manual intervention.

<figure><img src="https://3168433179-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MKixgeBPbLvnD0l1eiV%2Fuploads%2FKww7zcOKrdpkhVCUTNtg%2Fimage%2016.png?alt=media&amp;token=c7126256-884a-44d1-97bd-b821eb778f23" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
[Learn more about Schedules.](/running-tests/schedules.md)
{% endhint %}

***

### 7. Set up alerts

To stay informed about failures, configure notifications so your team can react quickly.

1. Go to **Alerts** in the left menu.
2. Click the **New alert** button
3. Choose when the alerts should be sent
4. Choose your preferred notification channel (e.g., email, webhook, Slack).

{% hint style="success" %}
**Tip:** Send alerts to a shared team channel to ensure visibility and faster response times.
{% endhint %}

<figure><img src="https://3168433179-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MKixgeBPbLvnD0l1eiV%2Fuploads%2FZAcYHbsdcRs3RHiGAKLk%2Fimage%2017.png?alt=media&amp;token=b8da529b-efa4-4ef4-a304-5887b8ed922d" alt=""><figcaption></figcaption></figure>

5. Save your configuration and create an alert.

{% hint style="info" %}
[Learn more about Alerts.](/collaboration/alerts.md)
{% endhint %}

**You now have your first automated regression workflow up and running 🎉**

Your tests are created, grouped, executed in the cloud, scheduled, and monitored - fully automated.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.bugbug.io/quick-start/your-first-automated-flow.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
