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

# Testing a Workflow

> Test Chat with the path highlight, what is real in a test, and the checks that run at publish

## Test Chat on the canvas

On the **Workflow** page, click **Test chat**. As you send messages:

* every step the message ran through is **tinted green**, and the lines between them **animate** — code steps and conditions included;
* under each reply, a link names the workflow step that sent it — click it to open the step;
* a tapped button is sent back with its id, as WhatsApp does, so rules on the button id work in the test.

When the workflow assigns an agent, that agent answers in the same chat, at its published version.

## What is real in a test

| | In Test Chat |
| - | - |
| WhatsApp | Nothing is sent. Replies show in the panel and under the test contact `0000000000` on the Contacts page |
| Billing | Replies are charged like WhatsApp replies |
| Run code | **Runs for real**, including calls to your APIs. `x_context["is_test"]` is `True` — use it to skip anything that charges, books or messages someone |
| Update contact, `update_contact_custom` | Nothing is written. The run sees the new values; the next message does not |
| Counters | Count this test chat only |
| Assigned agent | Answers as in a live chat, with its own test-mode rules |

> [!NOTE]
>
> Because the test contact is never written, a count kept in a contact attribute starts again on every test message. Test a limit like "the 6th question gets the payment link" from a real number.

## Publish checks

The issues badge on the canvas shows the same problems as the publish check. **Not publishable** lists errors; **Check warnings** lists things worth a look.

**Errors** — publish is blocked until they are fixed:

* The workflow has no steps, or the Start step is not connected.
* A step points at a step that no longer exists, or at Start.
* The workflow loops back on itself.
* A Run code step has no code, or does not define `async def run():`.
* A Condition has no rules; a rule has no condition, no attribute, no code step or field; it reads a key that is not any code step's; a counter has no agent or no steps picked; a keyword or pattern rule is empty.
* An Update contact step sets nothing, or a row has no attribute or an incomplete source.
* A Send text or Send buttons step has no message; Send buttons has no buttons, an empty button, or two with the same text.
* A Send template step has no template, or a variable's source is incomplete.
* A Send media step's link is incomplete, or a fixed link is not `https://`.
* An Assign chat agent step has no agent — or, at publish, the agent does not exist in the account, is not a Basic or Advanced WhatsApp agent, or has no published version.

**Warnings** — publish goes ahead:

* A Run code, Condition or Update contact step has an exit that is not connected (the run stops there).
* A step cannot be reached from Start.
* A pattern may not be valid.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.