> For the complete documentation index, see [llms.txt](https://testbox.ortusbooks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://testbox.ortusbooks.com/getting-started/testbox-bdd-primer/running-tests.md).

# Running Tests

Running tests is essential of course. There are many ways to run your tests, we will see the basics here, and you can check out our [Running Tests](/getting-started/running-tests.md) section in our in-depth guide.

### TestBox CLI

The easiest way to run your tests is to use the TestBox CLI via the `testbox run` command. Ensure you are in the web root of your project or have configured the `box.json` to include the TestBox runner in it as shown below. If not CommandBox will try to run by convention your site + `test/runner.cfm` for you.

<figure><img src="https://content.gitbook.com/content/5kuiG5ZXNT2hNA83299A/blobs/anQ6EoIQEzhWbkZz841Z/image.png" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
You can also pass the runner URL via the `testbox run` command. Try out the `testbox run help` command.
{% endhint %}

Here is a simple `box.json` config that has a runner and some watcher config.

```json
"testbox":{
    "runner":"http://localhost:49616/tests/runner.cfm",
    "watchers":[
        "system/**.cfc",
        "tests/**.cfc"
    ],
    "watchDelay":"250"
}
```

{% hint style="info" %}
Check out the watcher command: `testbox watch`
{% endhint %}

### URL Runner

Every test harness also has an HTML runner you can execute. By convention the URL is

```
http://localhost{port}/tests/runner.cfm
```

This will execute ALL tests in the `tests/specs` directory for you.

### URL Spec Runner

You can also target a specific spec to execute via the URL

```
http://localhost{port}/tests/specs/MySpec.cfc
```

## Test Browser

TestBox ships with a test browser that is highly configurable to whatever URL-accessible path you want. It will then show you a test browser where you can navigate and execute not only individual tests but also directory suites.

![](https://raw.githubusercontent.com/ortus-docs/testbox-docs/master/.gitbook/assets/testbox-browser.png)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://testbox.ortusbooks.com/getting-started/testbox-bdd-primer/running-tests.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
