MoUnit -- A Framework for Automatic Modelica Model Testing

2014 
A vital part in development of physical models, i.e., mathematical models of physical system behavior, is testing whether the simulation results match the developer’s expectations and physical laws. Creation and automatic execution of tests need to be easy to be accepted by the user. Currently, testing is mostly performed manually by regression testing and investigation of result plots. Furthermore, comparisons between different tools can be cumbersome due to different output formats. In this paper, the test framework MoUnit is introduced for automatic testing of Modelica models through unit testing. MoUnit allows comparison of Modelica simulation results with reference data, where both reference data and simulation results can originate from different simulation tools and/or Modelica compilers. The presented test framework MoUnit brings the widespread approach of unit testing from software development into practice also for physical modeling. The testing strategy that is used within the Modelica IDE OneModelica from which the requirements for MoUnit arose, is introduced using an example of linear water wave models. The implementation and features of MoUnit are described and its flexibility is exhibited through two test cases. It is outlined, how MoUnit is integrated into OneModelica and how the tests can be automated within continuous build environments.
    • Correction
    • Source
    • Cite
    • Save
    • Machine Reading By IdeaReader
    7
    References
    2
    Citations
    NaN
    KQI
    []