Install OpenTAP and TUI on Raspberry Pi
Published: January 10, 2026
OpenTAP is an open-source test automation platform that provides a flexible framework for creating and running test sequences. It enables scenerio like testing electronics (LEDs, Servos, Cameras, etc.) that are attached to your Pi. The Terminal User Interface (TUI) is a command-line interface that makes it easy to interact with OpenTAP directly from your terminal. If you’re running a Raspberry Pi with Raspberry Pi OS, you can install OpenTAP and get started with the TUI in just a few commands.
This guide walks through the installation process on Raspberry Pi OS. The steps are straightforward and will have you up and running quickly.
Download OpenTAP
First, download the Linux ARM64 version of OpenTAP. This command grabs the package directly from the OpenTAP repository and saves it as opentap.zip:
curl -Lo opentap.zip 'https://packages.opentap.io/4.0/Objects/Packages/OpenTAP?os=Linux&architecture=arm64'
The -L flag tells curl to follow redirects, and -o specifies the output filename.
Extract and Install
Create a directory in your home folder to store OpenTAP:
mkdir -p ~/.local/share/opentap
The ~/.local/share directory is a standard location for user-specific application data on Linux systems. Using -p ensures the command creates any parent directories that don’t already exist.
Extract the downloaded zip file into the new directory:
unzip opentap.zip -d ~/.local/share/opentap
The -d flag specifies the destination directory where the files will be extracted.
Make the TAP Command Executable
After extracting, you need to make the tap binary executable:
chmod +x ~/.local/share/opentap/tap
This grants execute permissions to the tap command, which is OpenTAP’s main command-line tool.
Add OpenTAP to Your PATH
To run the tap command from anywhere on your system, add the OpenTAP directory to your PATH environment variable:
echo 'export PATH=$PATH:~/.local/share/opentap' >> ~/.bashrc
This appends the export command to your .bashrc file, which runs every time you open a new terminal session. The PATH variable tells your shell where to look for executable files.
Apply the changes to your current session:
source ~/.bashrc
After running this, the tap command will be available immediately. In future terminal sessions, it will be available automatically.
Install the TUI Package
Now that OpenTAP is installed and configured, you can install the Terminal User Interface package:
tap package install TUI
The tap package install command downloads and installs OpenTAP plugins and packages. TUI is a plugin that provides an interactive terminal interface for working with OpenTAP.
Launch the TUI
With everything installed, you can now launch the OpenTAP Terminal User Interface:
tap tui
This opens the TUI, giving you an interactive way to explore OpenTAP features, manage test plans, and run test sequences directly from your terminal.
What is OpenTAP?
OpenTAP is a test sequencer and automation framework originally designed for test and measurement applications. It’s highly extensible through plugins and supports a wide range of instruments and equipment. While it’s commonly used in electronics testing and validation, its flexible architecture makes it useful for any scenario where you need repeatable, automated test sequences.
The platform is open-source and actively maintained by the OpenTAP community. You can extend it with custom plugins, integrate it with your own test equipment, or use it as a foundation for building more complex test automation systems.
Why Use TUI?
The Terminal User Interface provides a lightweight, keyboard-driven way to interact with OpenTAP without needing a graphical desktop environment. It is also free. This is particularly useful on headless Raspberry Pi setups where you’re accessing the device over SSH. The TUI lets you navigate test plans, configure settings, and execute tests all from the command line.
It’s also great for automation scenarios where you want to script test execution or integrate OpenTAP into larger workflows that run from the terminal.
OpenTAP SDK
Getting started with OpenTAP (Open Test Automation Project) is a great move if you’re looking for a scalable, open-source framework for test development. While many users stick to the graphical Editor, the TUI (Terminal User Interface) is a powerful, lightweight way to run tests in environments without a GUI, like remote Linux servers or Docker containers.
Now that OpenTAP is installed, you can write OpenTAP steps in C# that test “something. Before writing code, you need the core engine and the development tools.
Writing your first test automation plugin with the OpenTAP C# SDK allows you to leverage the full power of .NET while keeping your test sequences lightweight and portable.
The following instructions walk through setting up your environment, coding a custom step, and executing it using the OpenTAP TUI (Text-based User Interface).
1. Setup the Environment
You need the .NET SDK and the OpenTAP developer tools installed on your machine.
- Install .NET SDK: I have an article about doing that: https://dahln.com/install-dotnet-raspberry-pi
- Install OpenTAP Templates: Open your terminal and run:
dotnet new install OpenTap.Templates - Create a Project: Generate a new plugin project from the template:
dotnet new opentap --name MyAwesomePlugin - Install the SDK Package: If you haven’t already, install the SDK via the OpenTAP CLI:
tap package install SDK
2. Code Your Custom Test Step
In your new project, you’ll find a skeleton C# file. A TestStep in OpenTAP is defined by a class inheriting from TestStep with a Run() method.
using OpenTap;
namespace MyAwesomePlugin
{
[Display("My First Step", Group: "Tutorial", Description: "Calculates a simple value.")]
public class MyFirstStep : TestStep
{
#region Settings
[Display("Target Value", Group: "Configuration")]
public double TargetValue { get; set; } = 10.0;
#endregion
public MyFirstStep() { }
public override void Run()
{
// Log information to the TUI console
Log.Info($"Starting test with Target Value: {TargetValue}");
// Your logic here
if (TargetValue > 0)
UpgradeVerdict(Verdict.Pass);
else
UpgradeVerdict(Verdict.Fail);
}
}
}
3. Build and Install
To make your new step visible in the TUI, you must compile it and move the output to the OpenTAP Packages directory.
- Build: Run
dotnet buildin your project folder. - Verify Output: The build process (via the OpenTAP NuGet package) typically automates moving the
.dllinto a localbin/Debugfolder that acts as a portable OpenTAP installation. - Check for Plugins: Use the command
tap sdk list-pluginsto ensureMyFirstStepis recognized.
4. Using the OpenTAP TUI
- Launch: Run
tap tuiin your terminal. - Add Your Step: * Press
Insertto open the “Add Step” menu.- Navigate to your “Tutorial” group or search for “My First Step”.
- Press
Enterto add it to the plan.
- Edit Settings: * Use the arrow keys to select your step.
- On the right-hand Settings panel, highlight “Target Value” and press
Enterto change its value.
- On the right-hand Settings panel, highlight “Target Value” and press
- Run the Plan: Press
F5.- The Log Panel at the bottom will show your
Log.Infomessages. - The Verdict at the top will update to Green (Pass) or Red (Fail).
- The Log Panel at the bottom will show your
Learn More
For more information about OpenTAP, including documentation, plugins, and community resources, visit the official OpenTAP website: https://opentap.io
You can also explore the OpenTAP package repository to discover additional plugins and tools: https://packages.opentap.io
Build something awesome!