> ## Documentation Index
> Fetch the complete documentation index at: https://docs.provar.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Run tests and read results

> Run one scenario or test, a requirement or a whole project, then read what passed, what failed and why.

A [run](https://docs.provar.dev/glossary.md#run) puts your [scenarios](https://docs.provar.dev/glossary.md#scenario) or [tests](https://docs.provar.dev/glossary.md#test) to work. TrustAI holds
each scenario's conversation with your [agent](https://docs.provar.dev/glossary.md#agent) and grades it, or carries out each test in your
Salesforce app. This page shows the ways to start a run and how to read what comes back.

## Before you start

**In TrustAI**

* A project with at least one saved scenario or test. See
  [Create a test or scenario](https://docs.provar.dev/guides/beginner/create-a-test.md). Drafts can't run.
* The **Editor** or **Admin** [project role](https://docs.provar.dev/glossary.md#project-role) in the project.
* **[Agent evaluation](https://docs.provar.dev/glossary.md#agent-evaluation):** a [default agent](https://docs.provar.dev/glossary.md#default-agent). See step 7 of
  [Start here](https://docs.provar.dev/index.md#add-the-org-to-a-project).
* [Credits](https://docs.provar.dev/glossary.md#credits) in your workspace. Runs use them.

## Run one scenario or test

1. Open the scenario or test, then click the run button (▷) at the top right.

   **You should see:** a run dialog with **This will run**, which counts what you're about to start.

   * **Agent evaluation:** **Run & evaluate scenario**, with **Attempts per scenario**. **This will run** shows
     1 scenario and 1 run: "The scenario is simulated once and reports a pass or fail: one run." The dialog has
     no **Agent** field.
   * **[Functional testing](https://docs.provar.dev/glossary.md#functional-testing):** **Run test**. **This will run** shows 1 test and
     1 test run: "The test drives the app once and reports a pass or fail: one test run." The dialog doesn't say
     who the test signs in as. After the run, the result shows it under **Ran as**. In our walkthrough it was
     **Connection admin**: your [connector](https://docs.provar.dev/glossary.md#connector)'s admin account.

2. Click **Run & evaluate** or **Run 1 test**.

   **You should see:**

   * **Agent evaluation:** the run's page opens. Its **Result** says **Running**, and the scenario says
     **Queued** until it starts, sometimes with a reason such as "Queued · connector limit", then **Running**.
   * **Functional testing:** the test stays open and shows **Starting the run**, then **Queued** ("… is waiting
     for a runner.") and **Running** ("… is running."), with **View run details** and **Cancel run**. When it
     ends, it says how it ended, such as **Failed**: "… failed.", or **Needs review**: "… needs a person to
     review its result.", with **View run details** and **Dismiss**.

## Run a requirement or a suite

Point at a [requirement](https://docs.provar.dev/glossary.md#requirement) or a [suite](https://docs.provar.dev/glossary.md#suite) heading in the list. A run button (▷) appears on its row.
Point at it to see its name, such as **Run 1 scenario in** the requirement's name, or **Run 2 tests in** it.
Click it.

**You should see:** a run dialog counting everything under that row. For scenarios it's **Run & evaluate
scenarios**, with **Run evaluation** at the bottom. For tests it's **Run tests**, with a button such as
**Run 2 tests**. **This will run** shows how many are selected and how many will run, such as
**2 tests selected** and **2 tests will run**, with how many are ready ("2 ready"). Click the button at the bottom
to start. The run's page opens.

## Run all

**Agent evaluation only.** Click **Run all** at the top right of the **Scenarios** page.

**You should see:** **Run & evaluate scenarios**. **This will run** shows how many scenarios are selected and how
many will run, such as **10 scenarios selected** and **10 scenarios will run**. Click **Run evaluation**.

Functional testing projects don't have **Run all**. Run a suite or a requirement instead.

## Attempts per scenario

An AI agent doesn't always answer the same way. **Attempts per scenario** runs each scenario more than once in the
same run. The dialog explains: "An agent is not deterministic, so passing once is weak evidence. A scenario counts
as passed only if every attempt passes."

Choose a number, and **This will run** adds up what will happen. In our walkthrough, 4 attempts on 10 scenarios
showed "10 × 4 attempts = 40 runs". Each [attempt](https://docs.provar.dev/glossary.md#attempt) uses credits. Functional tests don't have
attempts.

When a scenario had more than one attempt, a run's page says how many failed, such as "2 of 2 attempts failed".
Its result has an **Attempts** row of numbered tabs. Click a number, or press ← and →, to move between attempts.
Each attempt has its own conversation and verdict.

## Advanced run options

**Agent evaluation only**, in a project with **Test data** turned on (**Project settings**, **General**). The
scenario run dialogs then have **Advanced run options**. Click it to show **Keep test data records**: "Records
the test data creates stay in Salesforce, and each run lists them under Clean up. Left off, they are deleted when a
run ends." The box starts as the project's own **Keep test data records** setting, and your choice applies to this
run only.

## The Runs list

Click **Runs** under the project's name in the left menu. Every run is listed, newest first. To find a run, type in
**Search runs…** above the list. The count at the right, such as "1 of 2", says how many runs match.

| Column | What it shows |
| - | - |
| **Run ID** | The run's ID, such as `run-2`. |
| **Run date** | When it started. |
| **Duration** | How long it took. While it runs, it shows a dash. |
| **Triggered by** | Who started it. |
| **Source** | Where it started from. A run you start in the app says **Manual**. |
| **Agent version** (agent evaluation) | The agent and its version. |
| **Requirements** | How many requirements ran, with the number of scenarios or tests under it, such as **1** over "2 tests". |
| **Attempts** (agent evaluation) | How many attempts each scenario had, such as **×1**. |
| **Result** | **Running** while it runs. Then how many requirements passed, such as **3 of 7 passed**, or **Canceled**. A functional testing run can also say **Error**, **Needs review** or **Mixed outcomes**. |

Click a run to open it. A functional testing run of a single test opens straight on that test's result.

## A run's page

A run's page lists each requirement in the run with its scenarios or tests under it. Each requirement shows how
many passed. Each scenario or test shows its own result. In a functional testing run, each test's row also shows
who it **Ran as**, such as **Connection admin**.

A strip at the top shows how far the run has got: **Compiled**, then **Running** (**Ran** when it's over) with a
count, then **Done**, or **Canceled** if you canceled the run. Beside it is how long it has taken (**Elapsed** while it runs, **Total** once it's done).

To find a requirement, scenario or test, type in **Search requirements…**. To show only some results, click
**Add filter**, then **Result**, and tick **Passed**, **Partially passed**, **Failed** or **Not run**. **Display
options** chooses which columns show, such as **Ran as**, **Duration** and **Result**.

**Run details**, on the right, shows the **Run ID**, when it **Ran**, its **Duration**, who it was
**Triggered by**, where it was **Triggered from**, its **Connectors** (with **View snapshot**) and its **Result**.
An agent evaluation run also shows the **Agent version**. A functional testing run shows who it **Ran as** and
how many **Selected tests** it had. Under that are **Pass rate**, **Requirements covered** and **Scenarios run** or
**Tests run**. A functional testing run with failures also shows its **Failure pattern**, such as "The test as
written cannot prove its result." with "Failed on 1 test". To hide or show the panel, click the panel button at
the top right (its name is **Hide run details**).

To run the same scenarios or tests again, click the run button at the top right of the run's page (its name is
**Rerun**, followed by what it will run).

Click a scenario or test on the run's page to open its result.

## Read a scenario result

The result opens with the conversation on the left and the **Verdict** tab on the right.

**The conversation** shows each turn from the simulated **User** and from your **Agent**, numbered. Between turns,
**Routed to** names the part of your agent that answered. Click **Show agent steps** under an agent turn to see
the steps behind that answer, such as where it was routed.

**The Verdict tab** starts with the overall verdict and a count, such as **Fail** and "1 of 5 failed". Below, each
[expected outcome](https://docs.provar.dev/glossary.md#expected-outcomes) is one check, grouped under the same headings as in the scenario,
such as **Outcome** and **Behavior**. Each check shows **Pass** or **Fail**. Click a check to read why:

* **Evidence**, with **Show in transcript**.
* **Why it fails** (or why it passes), in plain words. In our walkthrough: "Agent said it can't share coworker's
  info and referred to HR, but never explained that it can only share an employee's own leave records."

**The Details tab** shows the run, the **Model**, what it was **Routed to**, the **Tools called**, how many
**Turns** there were, who started it, and the scenario and requirement it came from.

## Read a test result

The result opens on **Replay**, with **Details** and **Downloads** beside it.

**Replay** shows what the browser did, step by step:

* Click **Play** to watch the run.
* **Steps** lists every step, grouped under the test's own instructions, with how long each took. Click a step to
  see its result (**Passed** or **Failed**) and what the run kept for it.

Most browser steps show a **Screenshot**, but not every step has one:

* A browser step can pass without a screenshot. Its screenshot box then says "No screenshot for this step."
* A setup step that works with data, such as **API · Setup**, drives no browser. It shows **Data operation** instead:
  the request it sent and the response.
* The sign-in step, **UI · Sign-in**, shows a **Breakdown** of where its time went, such as **Sign in** and **Load
  the Lightning app**.

**Why it failed** is a card that appears when a test didn't pass. Its top line shows:

* who or what it thinks is at fault, as a badge, such as **Test** or **App**;
* how sure it is, and how it decided, such as "High confidence · Rules" or "Low confidence · AI-assisted". An
  **AI-assisted** cause says so in its reasoning: "Check the evidence before relying on it."

Under that are **What happened**, in one sentence, and **Reasoning**, which says why. **Go to step** with a number,
such as **Go to step 16**, opens that step in the replay. The arrow at the right of the card folds it up; folded, the
card keeps **Go to step** on its top line.

In our walkthrough, a test that opened a list view the org doesn't have failed with "The test as written cannot
prove its result." The badge said **Test**, with "High confidence · Rules", and **Reasoning** named the missing
option: the fix belonged in the test, not the app. We used
[Improve with AI](https://docs.provar.dev/guides/beginner/create-a-test.md#improve-with-ai) on it.

The card has no buttons for files. To get the files the run kept, open **Downloads**.

**Details** shows the **Outcome**, its **Duration**, when it **Ran**, the **Requirement** and **Test**, how many
**Steps** it took, who it was **Triggered by** and **Triggered from**, and who it **Ran as**. A failed test also
shows **Failure**, with the step it stopped at. **Where the time went** is one bar split into the parts of the run,
with a key under it, such as **Preparing**, **Sign-in**, **Steps**, **Closing the browser** and **Settling**.

**Downloads** has the **Run report** ("Outcome, every step with its screenshot, API checks and HTTP operations,
formatted to share.") with **Download .html**. Below it is the **Evidence archive** (.zip), with the files the run
kept and **Download .zip**. It lists what's in it, such as **11 screenshots**, **Console log**, **Network (HAR)**,
**Trace** and **Report**, and about how big it is. Steps without a screenshot add none to the archive, so it can
hold fewer screenshots than the run had steps. In our walkthrough, a run of 17 steps kept 11.

## Result words

These are the [result](https://docs.provar.dev/glossary.md#result) words and where we saw each one.

| Word | Where it shows |
| - | - |
| **Never evaluated** | In the header of a requirement that hasn't run yet, such as "0 tests · Never evaluated". |
| **Not evaluated** | On a requirement, scenario or test in the list that hasn't run yet. |
| **Not run** | A choice in a run page's **Result** filter, for tests or scenarios in the run that didn't run. On a canceled functional testing run's page, for the tests it didn't reach. |
| **Queued** | On a run's page, for a scenario or test waiting to start. |
| **Signing in** | On a functional testing run's page, while the test signs in to Salesforce. |
| **Running** | In the **Runs** list and on a run's page while it runs. |
| **Passed** | On a scenario or test in the list, on a run's page and as its **Result**, and in the overview's **Scenario results**. A scenario result's header and each check say **Pass**. |
| **Failed** | The same places as **Passed**, and as the header of a test result. A scenario result's header and each check say **Fail**. |
| *N* **of** *N* **passed** | On a requirement, and in the **Runs** list's **Result** column. |
| *N* **of** *N* **attempts failed** | On a run's page, for a scenario with more than one attempt. |
| **Partial** | As a run's **Result** when some of its scenarios passed and some didn't. |
| **Error** | For a scenario or test that ended in an error. On a scenario in the list, in the overview's **Scenario results**, on a run's page, and as the header of a scenario or test result. The run's panel counts them, such as "1 error". In a functional testing project's **Runs** list. On an attempt, with "It ended in an error before it could be graded". We saw that on the attempts of a canceled run. |
| **Needs review** | In the overview's **Scenario results**. In a functional testing project's **Runs** list, on a test's **Runs** tab, and as the header of a test result, which then shows **Why it failed**. |
| **Mixed outcomes** | In a functional testing project's **Runs** list. |
| **Not determined** | For a scenario that ended without a clear result. In the overview's **Scenario results**, on a scenario in the list, on a run's page, and as the header of its result. |
| **Incomplete** | In the overview's **Scenario results**, and on a canceled functional testing run's page. |
| **Not checked** | On a scenario result's **Verdict** tab, for a check that wasn't graded, such as "1 of 5 not checked". |
| **Blocked** and **Run blocked** | In the list of tests, after a run that couldn't give a result, such as one that ended **Needs review**. The test shows **Blocked** and its requirement shows **Run blocked**. |
| **Canceling** | On a running functional test after you click its own **Cancel run**. |
| **Canceled** | In the **Runs** list and as a run's **Result** after you cancel it. A scenario result in that run can say **Canceled** or **Error**. |

## Change a verdict

**Agent evaluation only.** If you disagree with how TrustAI graded a check, you can change it. Functional test
results have no way to change the verdict.

1. Open the scenario result. On the **Verdict** tab, click the **Pass** or **Fail** beside the check.

   **You should see:** two choices. For a failed check: **Pass**, "Override the system, with a reason.", and
   **Fail**, "The system's grade."

2. Click **Pass** (or **Fail**, if TrustAI passed it).

   **You should see:** a box under the check: **Why does this pass?** It notes: "Saved with your name."

3. Write your reason, then click **Change to Pass** (or **Change to Fail**). It can't be clicked until you write a
   reason.

   **You should see:** the check now says **Pass**. Under it, the system's original grade and its reason, then
   your change, your reason and when you made it. The overall verdict is worked out again: in our walkthrough it
   went from **Fail** to **Pass**, with "Changed from fail by 1 override from you". The requirement shows the new
   result, and the project overview counts it under **Changed verdicts**. The **Runs** list shows it after you
   reload the page.

On a scenario with more than one attempt, you change one attempt's verdict at a time.

To undo it, click the check's verdict again and choose the system's grade. The menu says this removes your
override.

Changing a verdict doesn't change the scenario. The result then says how many overrides are "not used to improve
the scenario yet": "Later runs are graded the old way until you do." It has an **Improve scenario** button.

## Cancel a run

1. Open the run's page and click **Cancel run** at the top of the list.

   **You should see:** a dialog asking **Cancel this run?** It says: "Scenarios that haven’t started won’t run.
   Scenarios already running are asked to stop, and their results may be incomplete. This can’t be undone." It
   also warns that scenarios already running still count toward usage.

2. Click **Cancel run** in the dialog. To keep the run going, click **Cancel**.

   **You should see:** the message "Cancel requested. The run stops after the current step." Until it stops, the
   run's page says **Stopping after the current step** and **Cancel already requested**. Then the run's
   **Result** says **Canceled**, and **Pass rate** says "Not graded: run canceled". In the **Runs** list, its
   **Result** is **Canceled**.

   A run that finishes before the cancel takes effect keeps its result.

A running functional test also has **Cancel run** on the test itself. That one cancels straight away, with no
dialog. **You should see:** **Canceling**: "Waiting for the run of "…" to end. It may still finish with a
result." Then **Canceled**: "The run of "…" was canceled."

## If something goes wrong

| What you see | What to do |
| - | - |
| You can't find a run button on a row | Point at the row: the button appears when you do. |
| The run dialog says **Checking selected scenarios…** and its run button can't be clicked | Wait. In our walkthrough the check took up to a minute. **Advanced run options** also appears only when it's done. |
| A functional testing project has no **Run all** | That's expected. Run a suite or a requirement from its row instead. |
| **Change to Pass** can't be clicked | Write your reason in the box first. |
| A functional test you improved still says **Needs review** | Read **Why it failed** again, then use **Improve with AI** with a clearer instruction. In our walkthrough, a check whose target showed more than once on the page came back **Needs review** twice. |
| A run you canceled still says **Stopping after the current step** | Wait. In our walkthrough, a canceled run took several minutes to end as **Canceled**. |
| The **Runs** list still shows the old result after you changed a verdict | Reload the page. |

## Next

* [Write requirements](https://docs.provar.dev/guides/beginner/write-requirements.md): turn what you learned into better requirements.
* [Glossary](https://docs.provar.dev/glossary.md): every word TrustAI uses.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.