> For the complete documentation index, see [llms.txt](https://docs.flxbl.io/flxbl/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flxbl.io/flxbl/codev/development/apex-tests.md).

# Apex tests

The **Testing** group under Dev runs your project's Apex tests against an org and keeps the results with your workspace. Test classes are discovered from your source — every class on your current branch marked `@isTest` — so the list reflects the branch you are working on, not what happens to be deployed.

## Running tests

**Dev > Testing > Run Apex Tests** lists the test classes in your project with their package and domain. Once a class has been run, its row carries the latest result for your target org: pass or fail, when it ran, and the run's coverage.

<figure><img src="/files/UghfV4hSf810zPlgMlCQ" alt="The Run Apex Tests page listing test classes with package and domain, two classes showing a Passed status with coverage from the latest run"><figcaption><p>Run Apex Tests — the project's test classes, with the latest result and coverage per class.</p></figcaption></figure>

Select classes and click **Run Tests**. The dialog confirms where and how the run executes:

<figure><img src="/files/YdA5aJSfw7QuDlGM0Hh7" alt="The Run Apex Tests dialog with the target org selected, three selected tests, and coverage validation enabled with a 75% threshold"><figcaption><p>The run dialog — target org, the selected tests, and optional coverage validation.</p></figcaption></figure>

* **Target Organization** — your target org is preselected; pick any other connected org. The dialog checks the connection live and enables **Run Tests** only when it passes.
* **Coverage Validation** — when enabled, the run fails if coverage lands below the **Threshold** (default 75%).

Beyond selected classes, the dialog can scope a run to a **test suite**, a **domain**, or a **package** — a package run executes all tests in that package. Runs execute in the background, one at a time per org, and the outcome arrives as a notification; the report opens from the result.

{% hint style="info" %}
A test class must exist in the org to run there. If you wrote a new test class and have not deployed it yet, use **Push** on this page to deploy the selected classes to the org first.
{% endhint %}

Each executed class's row expands with actions to view the run's report and to re-run that class.

## Test suites

**Dev > Testing > Test Suites** groups tests you run together — a smoke set for a package, everything in a domain, or a hand-picked list of classes. Suites are stored in your repository, so they are versioned and shared with the team like any other configuration.

<figure><img src="/files/GC3s7Gdth0mJqiFFj5wK" alt="The Test Suites page with a suite card showing its type, contents, and a Run action"><figcaption><p>Test Suites — each suite as a card with its selection type and a Run action.</p></figcaption></figure>

**Create Suite** walks three steps — name, selection criteria, review. The criteria combine freely: packages, domains, specific test classes, and optional tags. The review step shows the resulting configuration as YAML before it is written.

<figure><img src="/files/IW72f86txAhSwxZyzvlS" alt="The Create Test Suite wizard on its review step with the YAML configuration preview and a Ready to Create confirmation"><figcaption><p>Create Test Suite — the review step previews the configuration the suite is saved as.</p></figcaption></figure>

**Run** on a suite card opens the same run dialog with the suite preselected. **Edit** reopens the wizard to change the criteria — deleting a suite is done from the edit dialog.

## Local test results

**Dev > Testing > Local Test Results** is the history of the runs you have executed from this workspace: one row per run with its status, classes, run type, org, and time.

<figure><img src="/files/JnFVu6HeObm0OiZiOZhG" alt="The Local Test Results page listing a passed run with its classes, run type, org, and time"><figcaption><p>Local Test Results — every run from this workspace, on this branch, against your target org.</p></figcaption></figure>

The list is scoped to your current branch and your current target org — switching either changes which runs you see. Clicking a run opens its report: the summary, each test method's outcome and runtime, and code coverage per class.

<figure><img src="/files/orX8AWgKyoDw0SInX4cA" alt="A test run report showing the summary table, per-method outcomes with runtimes, and code coverage"><figcaption><p>The run report — summary, per-method results, and coverage.</p></figcaption></figure>

{% hint style="info" %}
These are your local runs. Scheduled test runs executed by the server against environments are reported under [Scheduled Runs](/flxbl/codev/inspect/scheduled-runs.md) in Inspect.
{% endhint %}


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.flxbl.io/flxbl/codev/development/apex-tests.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
