Class NoOpDDTestModule
- All Implemented Interfaces:
DDTestModule
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidMarks the end of module execution.voidsetErrorInfo(Throwable error) Marks the module as failed.voidsetSkipReason(String skipReason) Marks the module as skipped.voidAdds an arbitrary tag to the moduletestSuiteStart(String testSuiteName, Class<?> testClass, Long startTime, boolean parallelized) Marks the start of a new test suite in the module.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface datadog.trace.api.civisibility.DDTestModule
testSuiteStart
-
Constructor Details
-
NoOpDDTestModule
public NoOpDDTestModule()
-
-
Method Details
-
setTag
Description copied from interface:DDTestModuleAdds an arbitrary tag to the module- Specified by:
setTagin interfaceDDTestModule- Parameters:
key- The name of the tagvalue- The value of the tag
-
setErrorInfo
Description copied from interface:DDTestModuleMarks the module as failed.This method should be used to signal a failure that is not related to a specific suite or a test case, but rather to the module as a whole (e.g. a failure in a setup/teardown logic that is executed once per module). If an individual test suite the module fails, there is no need to explicitly signal it to the module object: the status of the module will reflect individual suite failures automatically.
This does not imply the end of module execution, so
DDTestModule.end(Long)method has to be invoked at some point after this one.- Specified by:
setErrorInfoin interfaceDDTestModule- Parameters:
error- Optional exception that caused the module to fail
-
setSkipReason
Description copied from interface:DDTestModuleMarks the module as skipped.This does not imply the end of module execution, so
DDTestModule.end(Long)method has to be invoked at some point after this one.- Specified by:
setSkipReasonin interfaceDDTestModule- Parameters:
skipReason- Optional reason for skipping the module
-
end
Description copied from interface:DDTestModuleMarks the end of module execution.Unless either
DDTestModule.setErrorInfo(Throwable)orDDTestModule.setSkipReason(String)were invoked prior to calling this method, the status of the module will be calculated based on the statuses of individual test suites that were executed in scope of the module.The method must be called once for each module instance.
The call does not have to be made in the same thread where the module was started.
- Specified by:
endin interfaceDDTestModule- Parameters:
endTime- Optional finish time in microseconds. Ifnullis supplied, current time will be assumed
-
testSuiteStart
public DDTestSuite testSuiteStart(String testSuiteName, @Nullable Class<?> testClass, @Nullable Long startTime, boolean parallelized) Description copied from interface:DDTestModuleMarks the start of a new test suite in the module.- Specified by:
testSuiteStartin interfaceDDTestModule- Parameters:
testSuiteName- The name of the suitetestClass- Optional class that corresponds to the test suite.startTime- Optional start time in microseconds. Ifnullis supplied, current time will be assumedparallelized- Whether test cases from this suite will be executed concurrently in multiple threads- Returns:
- Handle to the test suite instance
-