> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/powershell-universal/de/powershell-befehle/invoke-psutest.md).

# Invoke-PSUTest

Führt eine PowerShell Universal-Pester-Testdatei oder einen Testordner aus und wartet optional auf die Ergebnisse und gibt sie zurück.

## SYNOPSIS

Startet einen Pester-Testlauf in PowerShell Universal.

## SYNTAX

```powershell
Invoke-PSUTest [-Path] <String> [-Environment <String>] [-Tag <String[]>] [-ExcludeTag <String[]>]
    [-Test <String[]>] [-Wait] [-Timeout <Int32>] [-IncludeSuite]
```

Übergeben Sie ein `TestFile`-Objekt aus den Test-APIs mit `-TestFile` anstelle von `-Path`. Beide Parametersätze unterstützen `-ComputerName`, `-AppToken`, `-UseDefaultCredentials`, `-Integrated`, `-TrustCertificate` und `-Cookies`.

## DESCRIPTION

`Invoke-PSUTest` startet einen Pester-Testlauf und gibt den erstellten Testlauf-Datensatz zurück. Verwenden Sie Tag- und Testnamen-Filter, um bestimmte Tests anzusprechen. `-Wait` wartet auf den Abschluss; `-IncludeSuite` fügt dem zurückgegebenen Objekt die geparste Suite hinzu.

## EXAMPLES

```powershell
Invoke-PSUTest -Path '.\tests\api.tests.ps1'
Invoke-PSUTest -Path '.\tests\api.tests.ps1' -Tag Smoke -ExcludeTag Slow
Invoke-PSUTest -Path '.\tests\api.tests.ps1' -Test 'API returns 200'
Invoke-PSUTest -Path '.\tests\api.tests.ps1' -Wait -IncludeSuite
```

## PARAMETERS

| Parameter              | Beschreibung                                                                                                         |
| ---------------------- | -------------------------------------------------------------------------------------------------------------------- |
| `-Path`                | Auszuführende Testdatei oder auszuführender Testordner.                                                              |
| `-TestFile`            | Auszuführendes Testdatei-Objekt; akzeptiert Pipeline-Eingaben.                                                       |
| `-Environment`         | Ausführungsumgebung für den Testlauf.                                                                                |
| `-Tag` / `-ExcludeTag` | Schließt Tests anhand des Pester-Tags ein oder aus.                                                                  |
| `-Test`                | Pester-Filter für den vollständigen Namen.                                                                           |
| `-Wait`                | Wartet vor der Rückgabe auf den Abschluss.                                                                           |
| `-Timeout`             | Wartezeitüberschreitung in Sekunden; Standardwert ist 300. Auf `0` setzen, um keine Zeitüberschreitung zu verwenden. |
| `-IncludeSuite`        | Gibt nach Abschluss des Laufs ein Objekt mit `TestRun` und `TestSuite` zurück.                                       |

## OUTPUTS

`PowerShellUniversal.Models.Testing.TestRun` oder ein `PSCustomObject`, das den Lauf und die Suite enthält, wenn `-IncludeSuite` verwendet wird.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.devolutions.net/powershell-universal/de/powershell-befehle/invoke-psutest.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
