Class Z2JupiterTestEngine
java.lang.Object
com.zfabrik.dev.z2jupiter.internal.engine.Z2JupiterTestEngine
- All Implemented Interfaces:
org.junit.platform.engine.TestEngine
A
TestEngine that remote tests test classes that are annotated with Z2JupiterTestable.
When resolving such an annotated test class, this engine resolves to a Z2JupiterRemoteTestDescriptor. We
run a remote discovery for the same class and bind the complete hierarchy beneath the local test descriptor
with correspondingly prefixed unique ids of Z2JupiterClientTestDescriptor.
This is based on the remote serialization implemented with Z2JupiterTestPlanDto and
related.
At execution, we invoke remote execution and translate events back to the prefixed and nested hierarchy.
NOTE: An alternative execution mode could ignore all test descriptors above the test class level and
reproduce the hierarchy only starting with the test class.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.junit.jupiter.engine.discovery.predicates.IsTestFactoryMethodstatic final org.junit.jupiter.engine.discovery.predicates.IsTestMethodstatic final org.junit.jupiter.engine.discovery.predicates.IsTestTemplateMethodstatic final Loggerstatic final Stringstatic final StringTest engine idstatic final StringDisplay name prefix for remoted tests. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voiddisable()org.junit.platform.engine.TestDescriptordiscover(org.junit.platform.engine.EngineDiscoveryRequest discoveryRequest, org.junit.platform.engine.UniqueId uniqueId) static voidenable()voidexecute(org.junit.platform.engine.ExecutionRequest request) getId()static booleanstatic voidstatic <T> TwithoutTestEngine(Supplier<T> get) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.junit.platform.engine.TestEngine
getArtifactId, getGroupId, getVersion
-
Field Details
-
Z2_JUPITER
Test engine id- See Also:
-
Z2_JUPITER_DISPLAY_PREFIX
Display name prefix for remoted tests.- See Also:
-
SEGMENT_TYPE_TEST
- See Also:
-
LOG
-
isTestMethod
public static final org.junit.jupiter.engine.discovery.predicates.IsTestMethod isTestMethod -
isTestFactoryMethod
public static final org.junit.jupiter.engine.discovery.predicates.IsTestFactoryMethod isTestFactoryMethod -
isTestTemplateMethod
public static final org.junit.jupiter.engine.discovery.predicates.IsTestTemplateMethod isTestTemplateMethod -
isTestOrTestFactoryOrTestTemplateMethod
-
-
Constructor Details
-
Z2JupiterTestEngine
public Z2JupiterTestEngine()
-
-
Method Details
-
enable
public static void enable() -
disable
public static void disable() -
isEnabled
public static boolean isEnabled() -
withoutTestEngine
-
withoutTestEngine
-
getId
- Specified by:
getIdin interfaceorg.junit.platform.engine.TestEngine
-
discover
public org.junit.platform.engine.TestDescriptor discover(org.junit.platform.engine.EngineDiscoveryRequest discoveryRequest, org.junit.platform.engine.UniqueId uniqueId) - Specified by:
discoverin interfaceorg.junit.platform.engine.TestEngine
-
execute
public void execute(org.junit.platform.engine.ExecutionRequest request) - Specified by:
executein interfaceorg.junit.platform.engine.TestEngine
-