Add test routines
Description
Tests are important to verify that changes work as intended and do not break existing routines. At this point, we still have to figure out how the code in this project can be compiled and tested consistently. This probably will not include the interactive dune-blocklab frontend, meaning that it will have to be circumvented somehow.
System Tests
System tests execute a large portion of, or the entire, program. Several YAML and INI files reproducing experiments and examples are provided in the experiments
and examples
folders. These can be used to verify that the program still runs with the intended input. However, it is unclear how the results can be verified. System tests can be run with the DUNE Testsuite and/or the dune-testtools module.
Unit Tests
Unit tests are granular tests of specific functions in the code. They are very useful for code development, but creating them requires a solid understanding of the code and the interaction of the project's modules. Probably the most suitable dependency for this is googletest, which can be included as Git Submodule into this repository.
Notably, an important part of the code is written in Python/UML, and thus has to be unit tested in Python. pytest is the straightforward choice here.
Open Questions
- Since the internals of dune-blocklab remain unclear to me, I am not exactly sure how to write a blocklab application that immediately compiles the code it requires. This is important when checking for compiler errors and warnings.
- Can the UML operator definitions be tested reasonably?
- How to verify system test application output?
- How to test the dune-blocklab frontend application? Is this actually necessary?
Proposals
-
Write system test application(s) with default input files (!2 (merged)) -
Add routines for verifying system test output -
Add googletest as Git Submodule -
Add C++ unit tests -
Add Python unit tests