Class NoOpDDTestSession
- All Implemented Interfaces:
DDTestSession
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidMarks the end of tests execution.voidsetErrorInfo(Throwable error) Marks the session as failed.voidsetSkipReason(String skipReason) Marks the entire execution as skipped.voidAdds an arbitrary tag to the sessiontestModuleStart(String moduleName, Long startTime) Marks the start of a new module.
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
NoOpDDTestSession
public NoOpDDTestSession()
-
-
Method Details
-
setTag
Description copied from interface:DDTestSessionAdds an arbitrary tag to the session- Specified by:
setTagin interfaceDDTestSession- Parameters:
key- The name of the tagvalue- The value of the tag
-
setErrorInfo
Description copied from interface:DDTestSessionMarks the session as failed.This method should be used to signal a failure that is not related to a specific module or a test suite, but rather to the tests execution as a whole (e.g. a failure in a setup/teardown logic that is executed once for the entire project). If an individual module in the project fails, there is no need to explicitly signal it to the session object: the status of the session will reflect individual module failures automatically.
This does not imply the end of tests execution, so
DDTestSession.end(Long)method has to be invoked at some point after this one.- Specified by:
setErrorInfoin interfaceDDTestSession- Parameters:
error- Optional exception that caused the execution to fail
-
setSkipReason
Description copied from interface:DDTestSessionMarks the entire execution as skipped.This does not imply the end of tests execution, so
DDTestSession.end(Long)method has to be invoked at some point after this one.- Specified by:
setSkipReasonin interfaceDDTestSession- Parameters:
skipReason- Optional reason for skipping execution
-
end
Description copied from interface:DDTestSessionMarks the end of tests execution.Unless either
DDTestSession.setErrorInfo(Throwable)orDDTestSession.setSkipReason(String)were invoked prior to calling this method, the status of the execution will be calculated based on the statuses of individual modules that were run in scope of the session.The method must be called once for each session instance.
The call does not have to be made in the same thread where the session was started.
- Specified by:
endin interfaceDDTestSession- Parameters:
endTime- Optional finish time in microseconds. Ifnullis supplied, current time will be assumed
-
testModuleStart
Description copied from interface:DDTestSessionMarks the start of a new module.- Specified by:
testModuleStartin interfaceDDTestSession- Parameters:
moduleName- The name of the modulestartTime- Optional start time in microseconds. Ifnullis supplied, current time will be assumed- Returns:
- Handle to the module instance
-