Class JUnit5ModuleTestExecutor

java.lang.Object
org.hl7.fhir.utilities.tests.execution.ModuleTestExecutor
org.hl7.fhir.utilities.tests.execution.junit5.JUnit5ModuleTestExecutor

This class allows JUnit 5 tests to be run in Java runtime.
JUnit 4 tests ARE NOT SUPPORTED.
This mimics for the most part the output of the Maven Surefire plugin, with additional summaries and unique IDs for diagnosing failing tests.
  • Field Details

  • Constructor Details

  • Method Details

    • executeTests

      public CliTestSummary executeTests(org.slf4j.Logger log, String classNameFilter)
      Execute all tests defined in this module and return a TestExecutionSummary. Any stack traces required to diagnose test failures will be output at this stage, along with a unique test ID.
      Specified by:
      executeTests in class ModuleTestExecutor
      Parameters:
      log - the Logger to log execution or test failure.
      classNameFilter - a Regex to use to select tests. If null, this will default to the JUnit console filter.
      Returns:
      The test execution summary.
      See Also:
      • ClassNameFilter
    • getStandardModuleTestExecutor

      Create a ModuleTestExecutor for the standard case where the module name maps to the package name of the root package containing tests. For example the module "org.hl7.fhir.r5" will be assumed to have all its tests in the "org.hl7.fhir.r5" package or its child packages.
      Parameters:
      moduleName - The name of the module and root package containing tests.
      Returns:
      the ModuleTestExecutor for the module