# Tests

{% hint style="info" %}
This feature requires a [license](/licensing.md).
{% endhint %}

PowerShell Universal integrates with the [Pester ](https://pester.dev/)test framework to allow you to execute test suites and view results. Results are stored in the PowerShell Universal database so you can view historical results.

You can work with tests by visiting Automation \ Tests.

## Test Discovery

Tests files are located based on file name. Any files found in the respository that end in `.Tests.ps1` will be listed in the Test Files tab. You can create new test files on the Automation \ Scripts page.

<figure><img src="/files/rdQHe5dzqsY3JLkguyDB" alt=""><figcaption><p>Test Files</p></figcaption></figure>

## Test Execution

{% hint style="info" %}
Pester v5 or later needs to be installed to run tests.
{% endhint %}

Tests can be run by clicking the Run Test or Run All Tests buttons. Run Test will run the individual Test Files and Run All Tests will run all the Test Files.

You will have the option to select the environment, credential and computer to run the tests.

<figure><img src="/files/9NV9hFQ6AsKB3Sg86hjR" alt=""><figcaption><p>Run Tests</p></figcaption></figure>

## Test Results

Test Results are produced after the test run finishes. You will be able to see the overal status of the test run and the result of individual test suites and cases.

<figure><img src="/files/z12xEmQGZThQl2eAAIfv" alt=""><figcaption><p>Test Results</p></figcaption></figure>


---

# Agent Instructions: 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:

```
GET https://docs.powershelluniversal.com/automation/tests.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
