# Testing a Workflow Version

Testing a workflow is a recommended way to verify its functionality, appearance, process flow, and actions it triggers in the Command Centre. Every workflow should be tested before publishing. Once published, a workflow cannot be set to testing again.

The testing function is also useful when changes to a published workflow are required. By using the Testing status on a new workflow version, you're able to test changes without interrupting the active and published workflow instance.

{% hint style="info" %}
Only one workflow version can be tested at a time.&#x20;
{% endhint %}

## How to test workflows?

To set a workflow version for testing, consider one of the below methods.&#x20;

{% hint style="success" %}
You can edit the workflow in testing mode. Remember to save any changes you apply.
{% endhint %}

{% stepper %}
{% step %}

### Go to the Workflow Builder module

The module displays the list of available workflows.
{% endstep %}

{% step %}

### Select the workflow you want to test

This opens a workflow side panel displaying different workflow versions.
{% endstep %}

{% step %}

### Set the status of a selected workflow version to Testing&#x20;

In the sidebar, in the **Actions** column, click the **three-dot** menu and select **Test**. This changes the status of the selected workflow version to Testing and makes it available for testing in the [Workflow Management module.](#testing-in-workflow-management-module)

<div data-with-frame="true"><figure><img src="/files/03j0RcefWUFqBn50f9LU" alt="" width="563"><figcaption></figcaption></figure></div>
{% endstep %}
{% endstepper %}

You can also set the workflow to testing directly from the workflow editing screen in the workflow builder.

{% stepper %}
{% step %}

### Go to the Workflow Builder module&#x20;

The module displays a list of workflows. In Workflow Builder, either open an [existing workflow for editing](/command-centre/accessnow-user-guide/workflow-creation/creating-and-managing-workflows/workflow-management/editing-a-workflow-version.md) or [create a new one.](/command-centre/accessnow-user-guide/workflow-creation/creating-and-managing-workflows/workflow-management/creating-a-new-workflow.md)
{% endstep %}

{% step %}

### In the Workflow Editing View click Test&#x20;

Open the workflow for editing, and click on **Test** in the **top bar**.This changes the status of the selected workflow version to Testing and makes it available for testing in the [Workflow Management module.](#testing-in-workflow-management-module)&#x20;

<figure><img src="/files/rNiOZxsPbY4mhfNv2LvG" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Confirm in the pop-up&#x20;

After clicking Test, confirm that you want to set the workflow to testing mode. The workflow version is now available for [testing in the Workflow Management](#testing-in-workflow-management-module) module.
{% endstep %}
{% endstepper %}

### **Testing in Workflow Management Module**

{% stepper %}
{% step %}

### Go to the Workflow Management module

The module contains the list of all workflow along with their statuses.&#x20;
{% endstep %}

{% step %}

### Select the workflow you set to testing mode

Click on the workflow to access options for managing [visibility post-publication](/command-centre/accessnow-user-guide/workflow-creation/creating-and-managing-workflows/workflow-management/publishing-a-workflow-version.md#how-to-control-published-workflow-visibility) and executing test versions.
{% endstep %}

{% step %}

### Click the Test version tab&#x20;

Click the **Run Test Version button** to view the workflow execution. After testing, you are returned to the Make a Request dashboard. Repeat the testing as needed by revisiting the Workflow Management module.

{% hint style="warning" %}
All actions executed by the workflow in the Command Centre during testing will affect the Command Centre environment integrated with AccessNow.
{% endhint %}

<figure><img src="/files/i7M6OLVFoqYsirULTAO4" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Create a new test request&#x20;

To create a new test request, follow the tested workflow. The tested workflow should send notifications, create approval tasks, and perform Command Center actions. Start by kicking off the requester part of the workflow and verify that the workflow behaves as expected.
{% endstep %}

{% step %}

### Validate approver&#x20;

To test the parts of the workflow that are not visible to the requester, such as approval, you must use an approver account or ask a privileged approver. Then, check that the approver part of the workflow is also working correctly.&#x20;

This task separation is due to the fact that no user can approve their own requests, even if they are just test requests.

After finalizing your workflow, you can move forward with [publishing](/command-centre/accessnow-user-guide/workflow-creation/creating-and-managing-workflows/workflow-management/publishing-a-workflow-version.md).
{% endstep %}
{% endstepper %}


---

# 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://help.security.gallagher.com/command-centre/accessnow-user-guide/workflow-creation/creating-and-managing-workflows/workflow-management/testing-a-workflow-version.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.
