New Protoplaster features: server API, WebUI, test suites, and others

Published:

Topics: Open source tools

Protoplaster is Antmicro’s open source Python-based tool to thoroughly test platforms that use custom Linux-based Board Support Packages (BSPs). It automates the testing process thanks to a reusable set of tests common to such BSPs, and thanks to those you can define on your own, making Protoplaster at the same time a flexible and easily adaptable framework to specific platforms and their features. Protoplaster’s tests are designed to be board-agnostic, with YAML-based configuration enabling you to adjust parameters for different hardware setups easily.

You can use Protoplaster to perform a number of tests:

  • Base tests (re-used frequently)
  • Bring-up tests (for hardware bring-up)
  • Stress tests (e.g. to check for heating issues)
  • Software tests (used to verify whether a new features is compatible with the older ones)

In our subsequent work on the tool, we added reporting mode and, recently, described how to use Protoplaster for low-level In-Circuit Testing (ICT) of the Jetson Orin Baseboard. The former generates real-time snapshots of the system’s state and configuration. You can customize this mode to include specific commands or logs and account for certain operating conditions. For example, instead of a whole report, you can generate only the required output and logs by running a given command.

Now, Antmicro has supplemented Protoplaster with a new API, WebUI, and artifacts and introduced new keywords for YAML configuration files. Apart from that, modular test suites are available.

In this article, we will walk you through the most important changes and show how to navigate through them. We will also present an example configuration file, demonstrating a way the tests can be defined.

Protoplaster API overview

Introducing a REST API and WebUI

The biggest addition to Protoplaster is the possibility to use it in server mode, which enables you to control the tool over a REST API. You can launch it using the --server flag, and then trigger testing through an API request. In server mode, each test run is saved in memory with an ID, so that you can check its configuration, status, creation time, or executed test suite, for example:

HTTP/1.1 200 OK
Content-Type: application/json

{
  "run_id": "25d9f4a2-2556-4647-b3cc-762348dc51ce",
  "config_name": "config1.yaml"
  "test_suite_name": "simple-test"
  "status": "finished",
  "created_at": "Mon, 25 Aug 2025 15:56:35 +0200",
  "started_at": "Mon, 25 Aug 2025 15:56:36 +0200",
  "finished_at": "Mon, 25 Aug 2025 15:56:44 +0200",
  "metadata": {
    "bsp-sha256": "a5603553e0eaad133719dc19b57c96e811a72af5329e120310f96b4fdc891732"
  }
}

Using the API, you can also manage the YAML configuration files:

What is more, server mode automatically enables the new WebUI, available through a web browser. This feature communicates directly with the REST API, providing a human-friendly interface over the backend as shown below:

New WebUI overview

We are currently working on the possibility to remotely manage multiple Protoplaster devices through a single WebUI. Antmicro is also developing a CLI program that interacts with Protoplaster through its API, providing an alternative to the WebUI for automation and scripting. The program will allow you to perform the same actions as the WebUI, except for managing your device.

New configuration file options

We have also added new keywords and artifacts, both definable in Protoplaster’s YAML configuration files. The new keywords are includes and metadata. You can use the former to provide additional definitions from an external file, whereas the latter enables you to assign the output of any command to a given test. The metadata keyword is one of the artifact types - the other is a file generated during a test, for example, a camera frame. See an example YAML configuration file below for their usage and the way the tests are defined in general:

includes:
  - addition.yml        # Import additional definitions from external file

tests:
  base:                 # Test name
    i2c:                # A module specifier
    - bus: 0            # An interface specifier
      devices:          # Multiple instances of devices can be defined in one module
      - name: "Sensor name"
        address: 0x3c   # The given device parameters determine which tests will be run for the module
    - bus: 0
      devices:
      - name: "I2C-bus multiplexer"
        address: 0x70
    camera:
    - device: "/dev/video0"
      camera_name: "vivid"
      driver_name: "vivid"
    - device: "/dev/video2"
      camera_name: "vivid"
      driver_name: "vivid"
      save_file: "frame.raw"
  additional:
    gpio:
    - number: 20
      value: 1

metadata:               # Additional metadata to be generated on tested device
  uname:                # Metadata name
    run: uname -r       # Command to run

test-suites:
  basic:                # Test suite name
    tests:              # Tests to include
      - base
  full:
    tests:
      - basic           # Test suites can include other test suites
      - additional
    metadata:           # Metadata to generate for this test
      - uname

In the example above, you may notice how modules and test suites are defined. Before this update, four base test modules were included:

  • I2C: checks if devices can be detected at specific addresses on a specified bus.
  • GPIO: checks if data can be read from and written to a specified GPIO.
  • FPGA: checks if an FPGA can be programmed correctly.
  • Camera: checks if a camera device was detected correctly by the name of the camera and that of the driver, and whether a camera frame can be obtained.

Antmicro has recently provided additional test modules available by default:

  • ADC: verifies whether an analog-to-digital converter (ADC) exists, checking its name and the ability to provide output.
  • DAC: verifies whether a sysfs interface exists for a digital-to-analog converter (DAC).
  • PMIC: verifies whether a Power Management Integrated Circuit (PMIC) is detected and works properly.
  • Thermometer: verifies whether a temperature sensor is detected.
  • Network: verifies whether a network interface is detected.
  • Memtester: tests raw memory access using the memtester program.
  • Simple: contains three tests, where one always succeeds, another fails, and the third one created an artifact file. They are a quick sanity check to see if everything in the API works as intended.

To add custom test modules, see Writing additional modules.

As for the test suites, they have replaced the previously available test groups, which enabled you to pack various tests together. Test suites provides the same functionality but also allow you to extend existing groups with additional tests. As the example YAML file above shows, you can have a basic test suite and a full one that includes other test suites in the basic one. If you don’t specify which test suites to run, all of them are executed. If you want to, you can:

  • include one test suite in another through the include keyword.
  • specify which test suite to run with the -s or --test-suite parameter.
  • list existing suites in the YAML file by using the --list-test-suites flag.

Since the introduction of the artifacts, an additional column is now available in the test reports describing them:

device name test name module duration message status artifacts
/dev/video0 frame test.py::TestCamera::test_frame 232ms 724us   passed [‘uname’, ’frame.raw’]
/dev/video0 device_name test.py::TestCamera::test_device_name 206ms 274us   passed [‘uname’]
/dev/video0 driver_name test.py::TestCamera::test_driver_name 229ms 55us   passed [‘uname’]
/sys/class/gpio/20 read_write test.py::TestGPIO::test_read_write 12ms 524us   passed [‘uname’]

Demo: controlling Protoplaster through the WebUI

To use Protoplaster on your device, you need to have Python installed. After that, run the following commands:

pip install git+https://github.com/antmicro/protoplaster
protoplaster -d . -r . -a . --server

You will be provided with a web browser address to enter the WebUI. The demo below demonstrates the actions you can perform, including downloading test artifacts:

Streamlined testing with customized tools

Antmicro’s Protoplaster facilitates platform testing by enabling you to check different components for a variety of potential issues. The latest additions further streamline the process since the tool can work continuously in server mode, providing you with a user-friendly interface. The same goes for the new test modules, keywords, and test suites, thanks to which you can better adjust Protplaster to your needs.

We often use Protoplaster in custom setups to accelerate full product development and Hardware-in-the-Loop testing in both internal and commercial projects. Regardless whether you are building your next-gen device from scratch with us, or looking to migrate to new platforms with custom BSPs, Antmicro provides comprehensive software, hardware, and integration services based on in-house developed, open source solutions for maximum transparency and full product ownership. Write to us at contact@antmicro.com for more information.

See Also: