public class FWDTestEngine extends org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine<FWDEngineExecutionContext>
| Modifier and Type | Class and Description |
|---|---|
static class |
FWDTestEngine.FWDThrowableCollector
ThrowableCollector which handles RuntimeExceptions which wrap
AssertionFailedError in the exception cause chain specially. |
private static class |
FWDTestEngine.State
Engine state
|
| Modifier and Type | Field and Description |
|---|---|
private static java.lang.String |
CFG_FWD_CONFIG_FILE
The name of an optional JUnit5 configuration parameter which contains FWD
configuration file path.
|
private static java.lang.String |
DEFAULT_FWD_CONFIG_FILE
Default FWD configuration file value.
|
(package private) static java.util.logging.Logger |
LOG
Logger for this test engine
|
private static FWDTestEngine.State |
state
Engine initialization state: initially
FWDTestEngine.State.NONE, when after initialization attempt
changes either to either FWDTestEngine.State.INITIALIZED or FWDTestEngine.State.INOPERABLE,
depending on whether initialization was successful or not. |
private static UnitTestEngine |
unitTestSupport
Unit test support on the server proxy instance.
|
| Constructor and Description |
|---|
FWDTestEngine() |
| Modifier and Type | Method and Description |
|---|---|
protected FWDEngineExecutionContext |
createExecutionContext(org.junit.platform.engine.ExecutionRequest request)
Create the initial execution context for executing the supplied
request.
|
protected org.junit.platform.engine.support.hierarchical.ThrowableCollector.Factory |
createThrowableCollectorFactory(org.junit.platform.engine.ExecutionRequest request)
Create the factory for creating
ThrowableCollector instances used to handle exceptions that occur
during execution of this engine's tests. |
org.junit.platform.engine.TestDescriptor |
discover(org.junit.platform.engine.EngineDiscoveryRequest discoveryRequest,
org.junit.platform.engine.UniqueId uniqueId)
Discover tests according to the supplied
EngineDiscoveryRequest. |
java.lang.String |
getId()
Get the ID that uniquely identifies this test engine.
|
private static boolean |
initialize(java.lang.String fwdConfigFile)
Initialize the engine.
|
createExecutorService, executestatic final java.util.logging.Logger LOG
private static final java.lang.String CFG_FWD_CONFIG_FILE
private static final java.lang.String DEFAULT_FWD_CONFIG_FILE
private static FWDTestEngine.State state
FWDTestEngine.State.NONE, when after initialization attempt
changes either to either FWDTestEngine.State.INITIALIZED or FWDTestEngine.State.INOPERABLE,
depending on whether initialization was successful or not.
Keeping state prevents multiple engine initialization attempts.private static UnitTestEngine unitTestSupport
private static boolean initialize(java.lang.String fwdConfigFile)
fwdConfigFile - FWD client config file, never nulltrue if initialization was successful.public org.junit.platform.engine.TestDescriptor discover(org.junit.platform.engine.EngineDiscoveryRequest discoveryRequest,
org.junit.platform.engine.UniqueId uniqueId)
EngineDiscoveryRequest.
The supplied UniqueId must be used as the unique ID of the
returned root TestDescriptor. In addition, the UniqueId
must be used to create unique IDs for children of the root's descriptor
by calling UniqueId.append(java.lang.String, java.lang.String).
discoveryRequest - the discovery request; never nulluniqueId - the unique ID to be used for this test engine's
TestDescriptor; never nullTestDescriptor of this engine, typically an
instance of EngineDescriptorEngineDescriptorpublic java.lang.String getId()
Each test engine must provide a unique ID. For example, JUnit Vintage
and JUnit Jupiter use "junit-vintage" and "junit-jupiter",
respectively. When in doubt, you may use the fully qualified name of your
custom TestEngine implementation class.
protected FWDEngineExecutionContext createExecutionContext(org.junit.platform.engine.ExecutionRequest request)
createExecutionContext in class org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine<FWDEngineExecutionContext>request - the request about to be executedprotected org.junit.platform.engine.support.hierarchical.ThrowableCollector.Factory createThrowableCollectorFactory(org.junit.platform.engine.ExecutionRequest request)
ThrowableCollector instances used to handle exceptions that occur
during execution of this engine's tests.
An engine may use the information in the supplied request such as the contained configuration parameters to decide what kind of factory to return or how to configure it.
By default, this method returns a factory that always creates instances of
OpenTest4JAwareThrowableCollector.
createThrowableCollectorFactory in class org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine<FWDEngineExecutionContext>request - the request about to be executedOpenTest4JAwareThrowableCollector,
ThrowableCollector