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

# Write test cases

> Writing test scenarios to assess your LLM product behavior

A `test case` is a specific set of conditions that outline the actions needed to be carried out successfully by your LLM product.

Test cases can be grouped into `test suites`, which are groups of related test cases.

The `test case repository` is where you create and manage all test cases and test suites, enabling you to better organize your test strategy as you scale.

Ottic currently supports 2 types of tests:

* **LLM Test**: tests the output generated directly by the LLM.
* **Agent Test**: tests the output produced by an agent interacting with the LLM.

<Note>Ottic also supports API tests for non-deterministic systems. Sending requests to your backend API and comparing actual results with expected outcomes can be done in the tab [Agent Test](/essentials/test_case#creating-an-agent-test).</Note>

## Creating a test case

To create a test case, in the Test Cases menu:

1. **Click** "Create new test case".
2. **Name** the test case.
3. **Write** a short description for the test case
4. **Choose** a type of test (<i>LLM Test</i> or <i>Agent Test)</i>.

<img src="https://mintcdn.com/ottic-65/nojWNBWtNbQT6cbM/images/testcase_create.png?fit=max&auto=format&n=nojWNBWtNbQT6cbM&q=85&s=7989b209da85ff7333b175dec0e97c8a" alt="Test case" width="1200" height="750" data-path="images/testcase_create.png" />

<Tip>A good test case name should be clear and concise, reflecting the test's objective and scope.</Tip>

### Creating a LLM test case

Choose <i>LLM test</i>, when creating a test case to test the LLM output.

You need to add more details to build you test case. While creating a LLM test case, you need to specify:

* The **prompt and version** you’ll be evaluating

* **Input** or conversations you´ll be testing

* The **pass criteria** containing the **expected outcomes**

IMAGES

<Note>If you're using RAG, you’ll need to provide context in the "Context" field.</Note>

### Creating an Agent test

Choose <i>Agent test</i>, when creating a test case to test an agent workflow.

While creating an Agent test case, you need to specify:

* Agent **URL endpoint**

* **Input** or conversations you´ll be testing

* The **pass criteria** containing the **expected results**

<img src="https://mintcdn.com/ottic-65/nojWNBWtNbQT6cbM/images/testcase_create_agent.png?fit=max&auto=format&n=nojWNBWtNbQT6cbM&q=85&s=ddc6422adf0408a83fcf67c5ffe3e85e" alt="Test case" width="1200" height="750" data-path="images/testcase_create_agent.png" />

## Editing, cloning and deleting test cases

The `test case repository` contains all your test cases and its details.

Clicking a test case opens a details drawer on the left, where you can:

* **Edit** the test case

* **Clone** the test case

* **Delete** the test case
  <img src="https://mintcdn.com/ottic-65/nojWNBWtNbQT6cbM/images/testcase_actions.png?fit=max&auto=format&n=nojWNBWtNbQT6cbM&q=85&s=cc1b34311aa53ddb1d35287c99bf5938" alt="Test case" width="1200" height="750" data-path="images/testcase_actions.png" />

<Note>You can drag and drop test cases to different suites and positions.</Note>

<Note>Each test case has an ID in the format `TC -XX`.This number cannot be changed.</Note>

## Viewing run history of a test case

With a test case open, click the **Run history** tab to view execution details:

* When it was executed (Date and time)

* Test runs it is associated with (ID and title of the Run)

* Results history (passed of failed)

<img src="https://mintcdn.com/ottic-65/nojWNBWtNbQT6cbM/images/testcase_history.png?fit=max&auto=format&n=nojWNBWtNbQT6cbM&q=85&s=8bb4beb043ee1e7ad3e6414da24df8c1" alt="Test case" width="2880" height="1800" data-path="images/testcase_history.png" />

<Note>You cannot delete results in the run history</Note>

## Organize test cases in test suites

As you test strategy scales, your number of test cases will grow.

You can use `test suites` to organize test cases.

You can drag and drop test cases to different suites and positions.

## Next steps

When you are ready to build your test cases, you can start testing them in the **Test Run** menu.
