---
title: "Get-CatTest"
description: "Get-CatTest — the tests of the open project, as objects."
url: "https://docs.justcat.it/reference/powershell-module/get-cattest/"
---
# Get-CatTest

## Synopsis

```powershell
Get-CatTest
```

## Parameters

None (common parameters only).

## What it does

Writes the tests CAT loaded when the project was opened: the ones written in the project file, the ones loaded from every test list, and the ones generated from metadata — in the order CAT loaded them. It is the way to see what a run *would* execute, and to pick test IDs for `Invoke-CatTest -TestID`.

## Output

One `List<TestDefinition>` object (assign it, or wrap the call in parentheses, to work with the items). Each item has `TestDefinitionID` (the GUID `-TestID` takes — new on every open), `Suite`, `Order`, `TestCase`, `Name`, `TestFullName` (`[Suite].[Order].[TestCase].[Name]`, absent parts omitted), `Description`, `FirstDataSource`, `FirstQuery`, `SecondDataSource`, `SecondQuery`, `Expectation`, `ExpectedRowCount`, `Tolerance`, `Tags` (`string[]`), `Timeout`, `MaximumErrorsLogged`, `Metadata`, `TestListID`, `TestTemplateID`, and the `*Raw` twins with the values as written.

## Errors

`There is no CAT project open. Use Open-CatProject to open it.` when nothing is open.

## Examples

```powershell
Open-CatProject
$tests = Get-CatTest
$tests.Count
$tests | Where-Object Tags -contains 'ManualOnly' | Select-Object TestFullName

# run only the tests of one suite, by ID
$ids = ($tests | Where-Object Suite -eq 'Departures').TestDefinitionID
Invoke-CatTest -TestID $ids
```

## Related

- [Introduction](https://docs.justcat.it/reference/powershell-module/introduction/ "Introduction") — session model, logging, errors, sign-in.
- [Tests — properties](https://docs.justcat.it/reference/tests/properties/ "Test properties").
- [`Invoke-CatTest`](https://docs.justcat.it/reference/powershell-module/invoke-cattest/ "Invoke-CatTest") · [`Get-CatTestResult`](https://docs.justcat.it/reference/powershell-module/get-cattestresult/ "Get-CatTestResult").

