# Run an A/B test

Follow these steps to set up and send an A/B test campaign.

### What you'll need

* An installed [Email](/applications/content/email-templates.md) or [WhatsApp](/applications/channels/channels/supported-channels/whatsapp.md), [Push](/applications/channels/channels/supported-channels/push-notifications.md) or [SMS](/applications/channels/channels/supported-channels/sms.md) channel.
* At least two (and up to a maximum of eight) message templates with different content.
* A [list](/applications/audience/lists-and-segments/concepts/lists.md) or [segment](/applications/audience/lists-and-segments/concepts/segments.md) of opted-in contacts.

### Step one: Create your A/B test campaign and add content

1. Follow the instructions to [send a campaign](/applications/campaigns/campaigns/quickstarts/send-a-campaign.md).
2. Once you've configured the channel you're sending from, and selected the first message template that you want to test in the 'Campaign content' section, scroll down to **"More Settings"** and expand the dropdown.&#x20;

<div><figure><img src="/files/bC6MXzFzFqVpwXHK0Msb" alt=""><figcaption></figcaption></figure> <figure><img src="/files/RrSSOHt7Su18PQjFC2z6" alt=""><figcaption></figcaption></figure></div>

3. Switch on the toggle to **create A/B test.**  This will duplicate the selected content as both 'Variation A', and 'Variation B'.  (Scroll back to the top of the page to see these variants created for you, ready for editing)

<figure><img src="/files/0P8p13v4dg51swqfcPYD" alt=""><figcaption></figcaption></figure>

3. Click 'Variation B', and **click edit email**. You will be taken to the email editor where you can make edit your email template, configure the template language, and any variables. Click **save** once you're happy with your changes and you'll be returned to the campaign editor.&#x20;

<figure><img src="/files/2cu7xdzKUrMT0yQ9sJ6Z" alt=""><figcaption></figcaption></figure>

3. If you want to add more variations, click the **Clone** button on one of the templates in your A/B test, then repeat the process of selecting and configuring the new content.

<figure><img src="/files/m5D1Zurz9ziwl8VRLAXu" alt=""><figcaption></figcaption></figure>

### Step two: Configure your A/B test settings

Now that you've created your A/B test campaign and added the templates that you want to test, it's time to configure the rest of your settings.

1. Under 'Winning metric', select either **Click through rate**, **Read rate** (WhatsApp only) or **Open rate** (Email only).

<figure><img src="/files/SQcshi5awCY85KcPrKHk" alt=""><figcaption></figcaption></figure>

2. Under 'Test size', drag and drop the bar between the test versions and the 'winner' to determine the percentage of recipients who will receive a test version of the campaign.
3. Under 'Test duration', enter the number of hours you want to run your test for before the winning version is sent.

<figure><img src="/files/9gTW38WF2XMOZwtMUgxF" alt=""><figcaption></figcaption></figure>

4. Under 'Winner fallback', either select **Manually select the fallback winner**, then choose the variation you want to send in event of an unclear test result, or select **Send all test variations equally to remainder recipients**.

<figure><img src="/files/HciEbGMTSSFdbgC2Wnm8" alt=""><figcaption></figcaption></figure>

### Step three: Preview and test your A/B test campaign

The final step before you can start testing your campaign on your audience is to preview your campaign content, and send test variations to yourself or your team.

1. In the Campaign builder, go to the '**Email preview"** panel on the right-hand side.
2. From the **Variation** list, select the template you want to preview and test.

<figure><img src="/files/VbvE0MhjxCeV7jZxXUQD" alt=""><figcaption></figcaption></figure>

3. To send a test email, click **Send a test email** in the top right-hand corner. Select the variant you want to receive from the dropdown. From the **Simulated contact** drop-down, select the contact you want to send a test campaign message to. If you're sending an email, pick the contact's email address. If you're sending a WhatsApp, pick the contact's number.

<figure><img src="/files/ODhieMJeDtQU1pe2Tv1F" alt=""><figcaption></figcaption></figure>

3. Click **Send a test message**.
4. The recipient will receive a test email. Check that all the templates look correct, that any variables have been replaced, and that any media and buttons are displaying correctly, and give it a final review for spelling and grammar.

### Step four: Send your A/B test campaign

Ready to send your A/B test campaign? In the Campaign builder, go to section 3: **Schedule.** Then choose either:

* **Immediate** to immediately send your test campaign variations to a percentage of your recipients.
* **Fixed send time** to [wait until a set date and time](/applications/campaigns/campaigns/how-to/schedule-a-campaign.md) to send your test campaign variations to a percentage of your recipients.
* **Optimal send time** to deliver messages at the best time for each recipient.

#### Sending phases

* Once your A/B test campaign has started to send, the status will change to **In progress**.
* Once the A/B test is complete, the status will change to **Waiting** while the results are analyzed.

{% hint style="success" %}
You've just scheduled an A/B test! Time to sit back, relax, and watch the [results](/applications/analytics/campaign-reports/how-to/view-a-b-test-campaign-reports.md) roll in.
{% endhint %}


---

# Agent Instructions: 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.bird.com/applications/campaigns/campaigns/how-to/run-an-a-b-test.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.
