Skip to content

Enhancement: Test discovery/test runner #10

@bilderbuchi

Description

@bilderbuchi

It would be great if XogenyTest would offer some kind of test runner, which could be used/extended in your package, would discover all tests (e.g. in a Test subpackage) automatically, run them in sequence, and report the results back. That way, one would not have to run all the created tests manually every time, which gets tedious with a large number of tests.

I already tried thinking about how to best approach this, but I'm a bit stumped.

  • Should this be a model or function? Model I guess is easier to use/run in an IDE, on its own.
  • Is is it even possible in vanilla Modelica to discover programmatically all available models in a package, by some glob/regex matching, or by the TestCase annotation? If not, how could this be programmed?
  • How to avoid that the whole test run stops on the first failed assert (at error level currently)? Other test frameworks (e.g. the ecxellent pytest in Python) just catch the generated exceptions, report, and carry on testing. Hoever, I could not find an equivalent to try/catch or exceptions or "treating" asserts in Modelica.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions