public class NoOpDDTestSession extends Object implements DDTestSession
| Modifier and Type | Field and Description |
|---|---|
static DDTestSession |
INSTANCE |
| Constructor and Description |
|---|
NoOpDDTestSession() |
| Modifier and Type | Method and Description |
|---|---|
void |
end(Long endTime)
Marks the end of tests execution.
|
void |
setErrorInfo(Throwable error)
Marks the session as failed.
|
void |
setSkipReason(String skipReason)
Marks the entire execution as skipped.
|
void |
setTag(String key,
Object value)
Adds an arbitrary tag to the session
|
DDTestModule |
testModuleStart(String moduleName,
Long startTime)
Marks the start of a new module.
|
public static final DDTestSession INSTANCE
public void setTag(String key, Object value)
DDTestSessionsetTag in interface DDTestSessionkey - The name of the tagvalue - The value of the tagpublic void setErrorInfo(Throwable error)
DDTestSessionThis 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.
setErrorInfo in interface DDTestSessionerror - Optional exception that caused the execution to failpublic void setSkipReason(String skipReason)
DDTestSessionThis does not imply the end of tests execution, so DDTestSession.end(Long) method has to be
invoked at some point after this one.
setSkipReason in interface DDTestSessionskipReason - Optional reason for skipping executionpublic void end(@Nullable Long endTime)
DDTestSessionUnless either DDTestSession.setErrorInfo(Throwable) or DDTestSession.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.
end in interface DDTestSessionendTime - Optional finish time in microseconds. If null is supplied, current time
will be assumedpublic DDTestModule testModuleStart(String moduleName, @Nullable Long startTime)
DDTestSessiontestModuleStart in interface DDTestSessionmoduleName - The name of the modulestartTime - Optional start time in microseconds. If null is supplied, current time
will be assumed