> For the complete documentation index, see [llms.txt](https://docs.testfirst.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.testfirst.com/testfirst-editor/running-and-debugging-tests.md).

# Running & Debugging Tests

## Run Tests in the Editor

Once you have written a test case, you can run it to validate execution and identify issues..

There are two types of test run available in TF Automate:&#x20;

* Local run
* Run the test on the cloud&#x20;

## Local Run

{% hint style="info" %}

#### **Before You Run (Local Run)**

To execute tests locally, ensure:

* **Utilities Pack** is installed
* **Test Runner** is running on your machine

The Test Runner runs in the background and connects automatically when a test starts.
{% endhint %}

#### Start a Local Test Run

1. Open your test case in the **Editor**
2. Click the **Local Run** button
3. The test execution will start immediately

#### What Happens During Execution

* The test runs in **headless mode**
* The **Preview panel** (right side) shows real-time execution
* The **Execution Log** appears in the **Debug Console**
* The current step is highlighted as it runs

Even though tests run in headless mode, you can visually follow the execution in real time.

## Dry Run & Debug Mode

* By default, tests run in **Dry Run mode**
* You can switch to **Debug mode anytime during execution**
* Debug controls will appear in the Debug Console

### What is Debug Mode?

Debug mode allows you to **pause, inspect, and control test execution step-by-step**.

It helps you quickly identify why a test is failing and fix issues faster.

### Stop a Test

* Click **STOP** at any time
* The test execution will terminate immediately

### How the Test Runner Works

The Test Runner is a lightweight background application.

* No interaction is required once the Test Runner is started
* You can safely **minimize it and continue working**
* If it is closed accidentally:
  * Reopen it via system search (e.g., *“Test Runner”*)

{% hint style="info" %}

#### **Summary**

* **Local Run** → Executes test using your machine
* **Preview Panel** → Real-time visual execution
* **Execution Log** → Step-by-step results
* **Debug Mode** → Optional control during execution
  {% endhint %}

***

## Run the Test on the cloud  (Remote Execution)

Remote execution runs your tests using **TestFirst cloud or self-hosted runners**. Click the **Cloud run** button next to local run button,&#x20;

* Test runs **in the background** (no live preview)

* **Execution logs** are available

* **Screenshots** are captured for all steps

* You may see:

  > *"Initializing runner… This may take a while"*

* If a **self-hosted runner** is available <i class="fa-arrow-right">:arrow-right:</i> it is used
  * Otherwise <i class="fa-arrow-right">:arrow-right:</i> TestFirst **cloud runner** is used

{% hint style="info" %}
Remote runs are typically used for **test plan execution and CI/CD scenarios**.
{% endhint %}
