> For the complete documentation index, see [llms.txt](https://bugowl.gitbook.io/bugowl-ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bugowl.gitbook.io/bugowl-ai/core-concepts/test-cases.md).

# Test Cases

Test Cases are individual test scenarios that define specific testing steps and expected outcomes. They are the building blocks of your test automation and are organized within test suites.

#### What is a Test Case?

A test case contains:

* **Name**: Descriptive title explaining what the test validates
* **Test Suite**: The suite it belongs to for organization
* **Priority**: Critical, High, Medium, or Low based on business impact
* **Test Steps**: Detailed actions and validations
* **Test Data**: Variables and datasets used during execution
* **Status**: Current execution state (Draft, Published, etc.)

#### Creating a Test Case

1. Go to "Test Cases" → "Add New Case"
2. Select your project
3. Choose a test suite (or create one first)
4. Enter a descriptive test case name (max 255 characters)
5. Set the priority level
6. Click "Create Test Case"
7. Add test steps using the test task editor

#### Test Case Management

* **View Details**: Click to expand and see test steps
* **Edit**: Modify name, suite, or priority
* **Edit Steps**: Add/modify test actions and validations
* **Run**: Execute the test case on selected environment
* **Delete**: Remove test cases (only if never executed)

#### Test Case Status

Test cases show execution status:

* **Draft**: Not ready for execution
* **Published**: Ready to run
* **Not Run**: Never executed
* **Queued**: Waiting to run
* **Running**: Currently executing
* **Passed**: All steps completed successfully
* **Failed**: One or more steps failed
* **Canceled**: Execution was stopped

#### Test Steps

Each test case contains multiple test steps that define:

* **Step Number**: Sequential order
* **Description**: What action to perform
* **Test Data**: Variables to use
* **Expected Result**: What should happen

Test steps are created and managed in the test task editor after creating the test case.


---

# 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://bugowl.gitbook.io/bugowl-ai/core-concepts/test-cases.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.
