> For the complete documentation index, see [llms.txt](https://www.opal-rt.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.opal-rt.com/docs/hypersim/automation-api-and-scripting/automate-using-testview.md).

# Automate Using TestView

{% hint style="danger" %}
OPAL‑RT recommends the **HYPERSIM Python API** as the preferred method for automating test execution.
{% endhint %}

## Introduction to TestView

TestView is a graphical tool, installed by default with HYPERSIM, for creating automated test sequences for HYPERSIM models. Using TestView, you can:

* Set model parameters before simulation
* Run tests in **offline** or **real‑time** mode
* Process and analyze signals
* Save results in multiple formats
* Repeat tests automatically
* Run multiple scripts in batch mode
* Generate plots using ScopeView capabilities

No programming knowledge is required; TestView provides a **context‑based GUI** to build test logic.

## Main Features

* Supports **offline and real‑time** simulations
* Can repeat a single script any number of times
* Can run any number of scripts in **batch mode**
* Full access to **ScopeView**
* Excel integration:
  * Read values to auto‑generate tests
  * Write processing results
* Built‑in **post‑processing** (compare results from several tests automatically)
* Export formats:
  * Data: COMTRADE (.cfg/.dat), MAT, PS, TXT
  * Waveforms: JPG, PNG, PDF

## Requirements

TestView requires a valid workstation license. [Verify that an active HYPERSIM license](https://www.opal-rt.com/docs/hypersim/licensing-reference/workstation-license.md) with the following features is installed on your workstation:

| Feature Name                 | Required Value |
| ---------------------------- | -------------- |
| TestView for test automation | true           |

Before importing a model into TestView:

1. Ensure the model’s current configuration uses the proper target in **Settings**.
2. Verify the model runs properly (check stability in ScopeView, ensure there are no *stretched steps* in RT Monitor, etc)
3. Save Sensors & I/Os. This step is mandatory when using any I/Os, as the I/O files will not import correctly into TestView unless the sensors have been saved beforehand.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.opal-rt.com/docs/hypersim/automation-api-and-scripting/automate-using-testview.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
