# Testing Workflows

Before you activate a workflow, you should test it to make sure it does what you expect. The Test Run feature lets you run your workflow once with sample data so you can see each step execute in real time — without affecting your live system.

Testing catches mistakes early. Better to find out the email goes to the wrong person in a test run than after it has been sent to a real customer.

## Steps

1. **Save your workflow first** — The test run button will not work if you have unsaved changes. Click "Save" in the toolbar.
2. **Click "Test Run"** — In the toolbar at the top of the canvas, click the "Test Run" button. A dialog will open.
3. **Review the summary** — The dialog shows your trigger type and how many blocks are in the workflow. Make sure this looks right.
4. **Provide test data (if needed)** — If your workflow uses a Document Event trigger, you can pick a specific record to test with (e.g., a particular Sales Order). If you leave it blank, the system will use the most recent record of that type.
5. **Click "Run Test"** — The test begins. You will see each block light up as it executes, with a checkmark for success or an X for failure.
6. **Review the results** — The dialog shows the final status (success or failed), how long it took, and a step-by-step breakdown. If any step failed, the error message tells you what went wrong.
7. **Fix and re-test** — If something failed, close the dialog, fix the issue on the canvas, save, and run the test again.

![test results failure](/files/x5cmdB7I1kx0nImAhf7R)

![test results success](/files/20bdD7J2RTH5CqjIFmdg)

## What to look for

* **All steps show a checkmark** — Your workflow ran successfully from start to finish.
* **A step shows an X** — That step failed. Read the error message to understand why. Common causes: a required field was left blank, the record does not exist, or an email address is missing.
* **"No nodes were executed"** — Your blocks might not be connected properly. Go back to the canvas and make sure the connection lines are drawn between your blocks.

## Related pages

* [Building a Workflow](/workflow-automation/workflow-builder/building-a-workflow.md)
* [Execution History](/workflow-automation/workflow-builder/building-a-workflow/execution-history.md)


---

# 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.proforgeerp.com/workflow-automation/workflow-builder/building-a-workflow/testing-workflows.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.
