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

# Test Case Service

> Test Case Service API methods in the Galtea SDK

The Test Case Service in the Galtea SDK allows you to manage [test-cases](/concepts/product/test/case) for evaluating your products.
This Service is exposed by the `galtea.test_cases` object.

<Info>
  Remember that we will be using the `galtea` object. More information [here](/sdk/api/galtea).
</Info>

## Quick Example

First, initialize the Galtea SDK:

```python theme={"system"}
galtea = Galtea(api_key="YOUR_API_KEY")
```

Create a test case:

```python theme={"system"}
test_case = galtea.test_cases.create(
    test_id=test_id,
    input="What is the capital of France?",
    expected_output="Paris",
    context="Geography facts",
    variant="original",
)
```

List test cases:

```python theme={"system"}
test_cases = galtea.test_cases.list(test_id=test_id, limit=20)
```

Get a test case by ID:

```python theme={"system"}
test_case = galtea.test_cases.get(test_case_id=test_case_id)
```

## Service Methods

* [Create Test Case](/sdk/api/test-case/create)
* [Listing Test Cases](/sdk/api/test-case/list)
* [Retrieving Test Case](/sdk/api/test-case/get)
* [Deleting Test Case](/sdk/api/test-case/delete)

## Related

<Card title="Test Case" icon="list" iconType="solid" href="/concepts/product/test/case">
  Each challenge in a test for evaluating product performance
</Card>
