> AI agents: this is one page from PostHog's docs. Full index of Markdown docs for LLMs: https://posthog.com/llms.txt # Test and debug an automation Canonical URL: https://posthog.com/docs/workflows/automations/debug ## On this page - [Test a step](#test-a-step) - [Follow every run](#follow-every-run) - [Stop runs](#stop-runs) - [Rerun runs](#rerun-runs) - [Something else wrong?](#something-else-wrong) Test each step before anyone gets an email. After the automation is live, follow every run. ## Test a step 1. Open the **Test** tab, and click **Start testing**. 2. Pick a sample event, or for an email step, a sample person. The panel shows the data that the step can use. 3. Click **Run test**. The result shows whether the step succeeded, was skipped, or failed, and its logs. 4. Click **Go to next step** to test the next one. By default, **Make real HTTP requests** is off. Messages and other outside calls don't happen. PostHog logs what they would do instead. To check an email in a real inbox, turn it on for the email step, and enter your own address. PostHog asks you to confirm before it sends. ![The Test tab running one step of an automation](https://res.cloudinary.com/dmukukwp6/image/upload/w_1600,c_limit,q_auto,f_auto/automation_test_light_1eaf240070.png) ## Follow every run The **Invocations** tab lists every run: its status, the person and event, when it started, and any error. Filter by status: **Running**, **Succeeded**, **Failed**, or **Canceled**. Open a run to see each step that it took, and its logs, such as why a step was skipped. ![The Invocations tab, with every run and its status](https://res.cloudinary.com/dmukukwp6/image/upload/w_1600,c_limit,q_auto,f_auto/automation_invocations_light_4fbfb8a733.png) ![One run opened on the Invocations tab, with the log of each step](https://res.cloudinary.com/dmukukwp6/image/upload/w_1600,c_limit,q_auto,f_auto/automation_invocation_logs_light_04bf6ed1a5.png) A batch automation groups its runs by batch run, and shows the next scheduled runs. To see each email a run sent, with what the person did around it, see [what each person did](https://posthog.com/docs/workflows/metrics.md#what-each-person-did). Ask your agentwith the [PostHog MCP](https://posthog.com/docs/workflows/mcp.md)[measuring-email-performance](https://posthog.com/docs/workflows/skills.md) “Check our automations for emails that failed yesterday, and tell me why.” Copy ## Stop runs On the **Invocations** tab: - **Cancel** on a running run stops it before its next step. - **Cancel in-flight runs** stops every unfinished run of the automation, including runs that wait in a delay. - **Stop** on a batch run stops more of the audience from entering, and cancels the runs that it started. A run stops before its next step, so a step that is running finishes first. Steps that already ran, such as sent emails, are not undone. ## Rerun runs A canceled or finished run keeps its logs. To run it again, click **Rerun**. To rerun many at once, select them and click **Rerun selected**, or click **Re-run…** to pick runs by date. A rerun uses the run's original data and the automation's current settings. ## Something else wrong? For problems such as nobody entering, an email that didn't send, or an automation that won't turn on, see [troubleshooting](https://posthog.com/docs/workflows/resources/troubleshooting.md).