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.
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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecuteTests(org.slf4j.Logger log, String classNameFilter) Execute all tests defined in this module and return a TestExecutionSummary.static JUnit5ModuleTestExecutorgetStandardModuleTestExecutor(String moduleName) Create a ModuleTestExecutor for the standard case where the module name maps to the package name of the root package containing tests.Methods inherited from class org.hl7.fhir.utilities.tests.execution.ModuleTestExecutor
getModuleName, logSummary, printTestFailed, printTestFinished, printTestStarted
-
Field Details
-
DEFAULT_CLASSNAME_FILTER
- See Also:
-
-
Constructor Details
-
JUnit5ModuleTestExecutor
-
-
Method Details
-
executeTests
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:
executeTestsin classModuleTestExecutor- 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
-