---
title: "get_test_results_summary"
description: "get_test_results_summary — the counts and rates of the last run."
url: "https://docs.justcat.it/reference/python-module/get-test-results-summary/"
---
# get_test_results_summary

## Signature

```python
cat.get_test_results_summary()
```

## Parameters

None.

## What it does

Returns the summary CAT kept from the last `invoke_project` / `invoke_tests` in this process — the same object those functions returned; `None` before any run. This is how a script decides whether a run was good: neither `invoke_*` function raises for failed tests.

## Returns

A `TestExecutionSummary` object, or `None`: `TotalCount`, `PassedCount`, `FailedCount`, `ErrorCount`, `InconclusiveCount`, `SkippedCount` (ints); `PassRate`, `FailedRate`, `ErrorRate`, `InconclusiveRate` (percent, `System.Decimal` — `float(str(x))` to convert); `StartedOn`, `FinishedOn`, `Duration`; `ExecutionGuid`; `Results` — the same items `get_test_results` returns; `GetShortSummary()` — a small text table. `Inconclusive` is a test CAT could not bring to a verdict, not a failure.

## 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.

## Examples

```python
s = cat.get_test_results_summary()
if s is not None:
    print(f"{s.PassedCount}/{s.TotalCount} passed, {s.PassRate} %")
    print(s.GetShortSummary())
    if s.FailedCount > 0 or s.ErrorCount > 0:
        raise SystemExit(1)          # fail the job
```

## Related

- [Introduction](https://docs.justcat.it/reference/python-module/introduction/ "Introduction") — session model, logging, .NET objects, exceptions, sign-in.
- [`invoke_project`](https://docs.justcat.it/reference/python-module/invoke-project/ "invoke_project") · [`invoke_tests`](https://docs.justcat.it/reference/python-module/invoke-tests/ "invoke_tests") — return this object directly.
- [`get_test_results`](https://docs.justcat.it/reference/python-module/get-test-results/ "get_test_results").

