Test Scripts
Description of Test Scripts
Test Scripts
Test Scripts are the MicroPython scripts used to exercise the hardware interfaces on the Cuica. They can either be run directly or can be added to the Test Script Bank to be run manually or automatically as part of a Test Case in a Test Suite.
Execution Environment
The Test Scripts are automatically converted and stored as bytecode which is then loaded and run on an independent microprocessor core in order to provide predictable timing across executions, as well as to provide isolation from the rest of the Cuica software.
Test Scripts can be created, edited, and tested directly on the Cuica and consist of a
Setup Script and a Test Script. The Setup Script is where functionality common
to multiple Test Scripts is stored. It runs in the same execution context as the
main Test Script. The Test Scripts have access to the cuica
module which provides
functionality specific to the Cuica such as script progress and results capture.
All Test Script operations can be done using either the web interface, the Cuica CLI app, or directly in the REST API. The related REST API endpoints can be found in the Fixture section of the OpenAPI spec and corresponding generated documenation.
Test Script Run History
As Test Scripts are run on the Cuica, the information related to the Test Script Run
is stored as an entry in the Test Script Run History. This history can be used to retrieve
the output streams, i.e., the print()
output, as well as the stored results data for
a given Test Script Run.
All Test Script Run History operations can be done using either the web interface, the Cuica CLI app, or directly in the REST API. The related REST API endpoints can be found in the Test Script Runs section of the OpenAPI spec and corresponding generated documtenation.