Skip to content

Draft: Add new ERROR test metric to allow testing for expected error conditions - Closes #261

Jeremy Cohen requested to merge jhc02/nektar:feature/error-metric into master

This MR adds a new "ERROR" metric to the tester that enables testing for expected error conditions. This will enable the straightforward development of additional tests that also check that error paths in the code are correctly followed when expected.

An example is included, based on the IncNavierStokesSolver test KovaFlow_m8 to check that an error is correctly raised with the expected error message when TimeIntegrationMethod is not specified in the input file.

An example of how this can be used:

  1. Error tests must be created with only a single metric in the .tst file
  2. There metric type must be set to ERROR
  3. The value element has a type attribute in which the error type must be specified (e.g. fatal)
  4. Part or all of the expected error message must be specified as the content of the value element.


      <metric type="ERROR" id="1">
            <value type="fatal">TimeIntegrationMethod must be specified in the input file for an unsteady problem</value>

Merge request reports