Skip to main content
The Test Service in the Galtea SDK allows you to manage tests for evaluating your products. This Service is exposed by the galtea.tests object.
Remember that we will be using the galtea object. More information here.

Quick Example

from galtea import Galtea

galtea = Galtea(api_key="YOUR_API_KEY")

# Create a test
test = galtea.tests.create(
    name="my-quality-test",
    type="QUALITY",
    product_id="YOUR_PRODUCT_ID",
    ground_truth_file_path="path/to/knowledge.pdf",
    max_test_cases=50
)

print(f"Created test: {test.name} (ID: {test.id})")

# List all tests for a product
tests = galtea.tests.list(product_id="YOUR_PRODUCT_ID")
print(f"Total tests: {len(tests)}")

# Retrieve test by name
retrieved_test = galtea.tests.get_by_name(
    product_id="YOUR_PRODUCT_ID",
    test_name="my-quality-test"
)
print(f"Found test: {retrieved_test.name}")

Service Methods

Test

A set of test cases for evaluating product performance