Speaker
Description
Thorough testing is an essential part of every design process but on the other hand takes time. Therefore, a method that allows the engineer to test a system with as little effort as possible will increase the test coverage and the quality of the final system. As Python is a general-purpose programming language that is both quick to write and easy to learn, it makes it an ideal candidate for writing test suites. Python also provides an extensive ecosystem with ready to use libraries for many use cases - for example, pytest for running tests. The low-level radio frequency (LLRF) system at the European Spallation Source is MTCA-based and consists of multiple AMCs. The integration tests of the RF-field controller FPGA firmware have been implemented with a Python test suite based on pytest. Newly developed Python modules provide access to the FPGA and the other MTCA system components, and implement functions commonly needed for testing. For example, the tests can control the local timing AMC. Such functions are either implemented on a low level or by accessing them through the control system (EPICS) where they are available. All these parts led to a test suite of several hundred tests that run on test LLRF system in the laboratory.