The Igor Pro Universal Testing Framework (IUTF) is a versatile tool to write and run tests for Igor Pro code. The results of the tests is outputted in standardized formats that can be parsed by common CI frameworks. Test runs can also be fully automated as part of a CI/CD workflow. For simpler usage scenarios a summary of the test run is shown in the history after it finished.
The IUTF offers great flexibility for writing test cases. It is supported to run the same test case with multiple inputs as well as Igor Pro specific features such as independent modules or background activities.
The IUTF is applied as a reliable tool in larger Igor Pro projects such as MIES.
#pragma TextEncoding="UTF-8"
#pragma rtGlobals=3
#include "igortest"
// Simple demo example that tests the abs() function
Function TestAbsolute()
CHECK_EQUAL_VAR(abs(1.5), 1.5)
CHECK_EQUAL_VAR(abs(-1.5), 1.5)
CHECK_EQUAL_VAR(abs(NaN), NaN)
CHECK_EQUAL_VAR(abs(Inf), Inf)
CHECK_EQUAL_VAR(abs(-Inf), Inf)
End
The framework itself combines numerous features:
- Test assertions for all kinds of conditions in three main flavours: Warnings, Checks and Requirements
- Test cases can be grouped in test suites, run with multiple inputs, run in independent modules and contain background activity
- Support of standard output formats like JUNIT and TAP
- Support for automated execution as part of a CI pipeline
- Optional code coverage determination with Cobertura output support
- Optional memory leak tracking
- Fully documented and comes with lots of examples
- Easily expandable and adaptable
The documentation contains a guided tour and an introduction to the basic structure.
Igor Pro version 6.37 or newer on Windows and MacOSX
- Download the zip file attached to the newest
Release.
The file name is something like
UnitTestingFramework-v1.09.zip
. - Extract the zip file into a folder, e. g.
alice/IgorTestingFramework
- Open the Igor Pro user folder by selecting
Help/Show Igor Pro User Files
from the menu in Igor Pro - Create a link from
alice/IgorTestingFramework/procedures
in theUser Procedures
subfolder - Installation finished. You are ready to use IUTF in Igor Pro. Have a look at the documentation or the example experiments
Most parts of IUTF are licensed under the BSD-3 clause.
We plan to adopt Semantic Versioning in the future. See issue 386 for further details. For the versions available, see the tags on this repository or our releases.