> ## Documentation Index
> Fetch the complete documentation index at: https://help.maestra.io/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Test an Automated Campaign

#### Why conduct campaign testing?

You cannot send test messages in an automated campaign that uses event or custom template variables.

You can see your final message only if the campaign includes events that provide data for parameters.

To test such a campaign, you have to add it to the flow or operation and enable testing mode.

Meanwhile, messages will be generated but not sent to customers.

#### How to enable campaign testing

You can enable the testing in the mechanic that uses the campaign.

#### In the flow

You can test the flow with all its campaigns or only a specific campaign.

**Test your campaign**

In the node that sends the relevant campaign, enable the "Test campaign" option and launch your flow:

<img src="https://mintcdn.com/maestraio/-w5Ud9QNiG7Y4nor/images/imported/00_why-20conduct-20campaign-20testing.png?fit=max&auto=format&n=-w5Ud9QNiG7Y4nor&q=85&s=7a51a91da84c2bce72c75030fe049e79" alt="00_why conduct campaign testing" width="2916" height="1556" data-path="images/imported/00_why-20conduct-20campaign-20testing.png" />

<Tip>
  The flow will operate **like any other launched flow**: all the settings, nodes, or groups of steps, except for the test campaign, will be performed.

  The campaign messages **will be generated but not sent**.
</Tip>

This way you can test a new campaign in an already operating flow when it is important not to lose runs during testing.

For example, you can add a test campaign to a flow without removing an existing campaign. This way, the existing campaign will continue to operate on customer runs while test messages will be generated by a new template:

<img src="https://mintcdn.com/maestraio/-w5Ud9QNiG7Y4nor/images/imported/01_why-20conduct-20campaign-20testing-281-29.png?fit=max&auto=format&n=-w5Ud9QNiG7Y4nor&q=85&s=42018e9a4c3402614d04cf9f1c36c754" alt="01_why conduct campaign testing(1)" width="2928" height="1546" data-path="images/imported/01_why-20conduct-20campaign-20testing-281-29.png" />

The group of steps that includes a test campaign is marked in the flow:

<img src="https://mintcdn.com/maestraio/59KyfifOW7tLz5QR/images/imported/02_why-20conduct-20campaign-20testing.png?fit=max&auto=format&n=59KyfifOW7tLz5QR&q=85&s=6c4a4af9001d55cd4affaff710dd6e05" alt="02_why conduct campaign testing" width="2924" height="1464" data-path="images/imported/02_why-20conduct-20campaign-20testing.png" />

**Test your flow**

[Flow testing](/flows/how-to-test-a-flow) enables the testing mode **for all flow campaigns** automatically:

<img src="https://mintcdn.com/maestraio/nXS6QsINTx63g9ke/images/imported/03_why-20conduct-20campaign-20testing.png?fit=max&auto=format&n=nXS6QsINTx63g9ke&q=85&s=e6cae6d216cc19161efa0acdb3bac3dd" alt="03_why conduct campaign testing" width="2934" height="1096" data-path="images/imported/03_why-20conduct-20campaign-20testing.png" />

<Note>
  You can view customer distribution by branches in the test flow without the actual flow run.
</Note>

The nodes and settings below **are ignored**:

* expectation
* group of steps (test messages are meanwhile generated);
* A/B test;
* execution frequency, and
* operation start and end dates.

You can use flow testing when creating a new flow, when it is important not only to test the messages but also see if the chains are built correctly. Plus, this way fits for testing the flows where only the step of sending the campaign is implemented, to avoid counting test runs.

<Warning>
  The campaign may use the template variables where the value should appear during chain completion: it can be a promo code issued in the flow or a webhook response.

  As the steps are not performed in the flow test, there will be no data for these parameters.
</Warning>

You can test such messages in two ways: either [set up a selected contact to send it to or launch the flow and use the campaign test](/campaigns/how-to-test-your-campaign).

**In operation**

Flag the "**Test campaign**" option in the sending step:

<img src="https://mintcdn.com/maestraio/nXS6QsINTx63g9ke/images/imported/04_why-20conduct-20campaign-20testing.png?fit=max&auto=format&n=nXS6QsINTx63g9ke&q=85&s=4bb8a9e8d25256f9274232a28d285a8a" alt="04_why conduct campaign testing" width="2918" height="1386" data-path="images/imported/04_why-20conduct-20campaign-20testing.png" />

All the steps will be completed as in any other operation.

Meanwhile, the campaign messages **will be generated but not sent**.

## How to view test messages

#### In campaign

Click on the menu → "**Test campaigns**" on the campaign editing page:

<img src="https://mintcdn.com/maestraio/5322-upQA3cGdluA/images/imported/05_why-20conduct-20campaign-20testing-281-29.png?fit=max&auto=format&n=5322-upQA3cGdluA&q=85&s=dc98e38231e2e9bff4d04d3c72a2fb41" alt="05_why conduct campaign testing(1)" width="2936" height="1132" data-path="images/imported/05_why-20conduct-20campaign-20testing-281-29.png" />

On the list, you see test messages from all the mechanics that use this campaign, as well as the tests sent from the campaign interface:

<img src="https://mintcdn.com/maestraio/2_WUUqtXTQTrF_2i/images/imported/07_why-20conduct-20campaign-20testing.png?fit=max&auto=format&n=2_WUUqtXTQTrF_2i&q=85&s=5785adb4b49e60936c23ef7703b1c09b" alt="07_why conduct campaign testing" width="2920" height="432" data-path="images/imported/07_why-20conduct-20campaign-20testing.png" />

You can forward the messages to a selected email address you have in your project.

You can forward up to five messages at once; they will also appear on the list after the sending:

<img src="https://mintcdn.com/maestraio/2_WUUqtXTQTrF_2i/images/imported/08_why-20conduct-20campaign-20testing.png?fit=max&auto=format&n=2_WUUqtXTQTrF_2i&q=85&s=e4698fb35b66f16247eff1b3442030eb" alt="08_why conduct campaign testing" width="2920" height="456" data-path="images/imported/08_why-20conduct-20campaign-20testing.png" />

**In the flow**

In the node for sending campaign, go to the "Generated messages" tab and click on the eye icon:

<img src="https://mintcdn.com/maestraio/hDwb_Ye73XB_-pfV/images/imported/09_why-20conduct-20campaign-20testing.png?fit=max&auto=format&n=hDwb_Ye73XB_-pfV&q=85&s=29e204fd20464834ecab54e13e628e73" alt="09_why conduct campaign testing" width="2924" height="1544" data-path="images/imported/09_why-20conduct-20campaign-20testing.png" />

Tests from all blocks are collected in the "Runs and messages" → "Generated messages" tab:

<img src="https://mintcdn.com/maestraio/hDwb_Ye73XB_-pfV/images/imported/10_why-20conduct-20campaign-20testing.png?fit=max&auto=format&n=hDwb_Ye73XB_-pfV&q=85&s=ca49d62328593123ea44e50aa744cb87" alt="10_why conduct campaign testing" width="2930" height="1166" data-path="images/imported/10_why-20conduct-20campaign-20testing.png" />

<img src="https://mintcdn.com/maestraio/EeW0Po78IZGyB5gF/images/imported/11_why-20conduct-20campaign-20testing.png?fit=max&auto=format&n=EeW0Po78IZGyB5gF&q=85&s=d47b61c5ecd4eb702b2c6acbafc039bf" alt="11_why conduct campaign testing" width="2922" height="1182" data-path="images/imported/11_why-20conduct-20campaign-20testing.png" />

For each node, mailings **for the last ten clients** are displayed.

For repeated runs, the last message generated for the client will be shown.

**In the operation**

You can not view generated messages from the operation separately, only in the list of generated messages in the mailing campaign.

## Finishing the testing and launching campaigns

To launch the campaign, you have to disable the testing mode in the mechanic that is using it.

Enabling and disabling the testing in flows and operations is **available only in the edit mode**.

<Warning>
  Flow testing finish does not impact the "Test campaign" toggle in the sending step. It returns into the state it used to be before test launch.
</Warning>

**You cannot send** the messages **generated during the testing**.
