---
title: "get_test_lists"
description: "get_test_lists — the lists the open project loads tests from."
url: "https://docs.justcat.it/reference/python-module/get-test-lists/"
---
# get_test_lists

## Signature

```python
cat.get_test_lists()
```

## Parameters

None.

## What it does

Returns the project's test lists: the project file's own implicit list and every `Test list` the project declares (a YAML file, a database table, an Excel sheet, …), each with its provider and connection. Use it to see *where* tests come from; `get_tests` returns the tests themselves, with `TestListID` pointing back here.

## Returns

A .NET collection of `TestList` objects: `TestListID`, `Name`, `Order`, `ProviderNameAndVersion`, `ConnectionString`, `Query`, `IsImplicit` (the project file's own list), `FullName`, `Settings`.

## Raises

The sign-in and plan check (first call of the process) raises the `CatPortalError` family listed on the [Introduction](https://docs.justcat.it/reference/python-module/introduction/ "Introduction") page. With no open project: in the current version a bare `TypeError: exceptions must derive from BaseException` (not a readable message) — call `open_project` first.

## Examples

```python
cat.open_project("D:/Testing/DwhTests.cat.yaml")
lists = list(cat.get_test_lists())
tests = list(cat.get_tests())
for l in lists:
    n = sum(1 for t in tests if t.TestListID == l.TestListID)
    print(f"{l.Name}: {n} tests")
```

## Related

- [Introduction](https://docs.justcat.it/reference/python-module/introduction/ "Introduction") — session model, logging, .NET objects, exceptions, sign-in.
- [Lists](https://docs.justcat.it/reference/project-file/lists/ "Lists").
- [`get_tests`](https://docs.justcat.it/reference/python-module/get-tests/ "get_tests").

