Class LogMessage
java.lang.Object
de.qytera.qtaf.core.log.model.message.LogMessage
- Direct Known Subclasses:
AssertionLogMessage,StepInformationLogMessage
Log message class holds information about log messages.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringAbstract Scenario ID.protected List<AssertionLogMessage>List of assertions that were checked in this step.protected DateTime when step was finished.protected ThrowableWrapperStep error.protected StringFeature ID.protected LogLevelLog level.protected StringLog message.protected StringScenario ID.protected DateTime when step was started.protected LogMessage.StatusStep status.protected final UUIDUnique id. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAssertion(AssertionLogMessage assertion) Add an assertion to the list.voidComputes the status of the test step.Get abstractScenarioId.Get assertions.longGet duration.getEnd()Get end.getError()Get step error.Get featureId.getLevel()Gte log level.Get log message.Get scenarioId.getStart()Get start.Step status.getUuid()Get uuid.booleanhasError()Check if an error occurred.booleanChecks if step has failed.booleanChecks if step has passed.booleanChecks if step is pending.booleanChecks if step is skipped.setAbstractScenarioId(String abstractScenarioId) Set abstractScenarioId.setAssertions(List<AssertionLogMessage> assertions) Set list of assertions.Set end.setError(ThrowableWrapper error) Set step error.Set step error.setFeatureId(String featureId) Set featureId.Set log level.setMessage(String message) Set log message.setScenarioId(String scenarioId) Set scenarioId.Set start.setStatus(LogMessage.Status status) Set status.
-
Field Details
-
status
Step status. -
uuid
Unique id. -
assertions
List of assertions that were checked in this step. -
start
Time when step was started. -
end
Time when step was finished. -
error
Step error. If an error occures during the step method execution it is stored in this attribute. -
level
Log level. -
message
Log message. -
featureId
Feature ID. -
abstractScenarioId
Abstract Scenario ID. -
scenarioId
Scenario ID.
-
-
Constructor Details
-
LogMessage
Constructor.- Parameters:
level- log levelmessage- log message
-
-
Method Details
-
getUuid
Get uuid.- Returns:
- uuid
-
hasFailed
public boolean hasFailed()Checks if step has failed.- Returns:
- true if step has failed, false otherwise
-
hasPassed
public boolean hasPassed()Checks if step has passed.- Returns:
- true if step has passed, false otherwise
-
isPending
public boolean isPending()Checks if step is pending.- Returns:
- true if step is pending, false otherwise
-
isSkipped
public boolean isSkipped()Checks if step is skipped.- Returns:
- true if step is skipped, false otherwise
-
getError
Get step error.- Returns:
- step error
-
hasError
public boolean hasError()Check if an error occurred.- Returns:
- true if an error occurred during method execution, false otherwise
-
setError
Set step error.- Parameters:
error- step error- Returns:
- this
-
setError
Set step error.- Parameters:
error- step error- Returns:
- this
-
getStart
Get start.- Returns:
- start
-
setStart
Set start.- Parameters:
start- Start- Returns:
- this
-
getEnd
Get end.- Returns:
- end
-
setEnd
Set end.- Parameters:
end- End- Returns:
- this
-
getDuration
public long getDuration()Get duration.- Returns:
- duration
-
getAssertions
Get assertions.- Returns:
- list of assertions
-
setAssertions
Set list of assertions.- Parameters:
assertions- list of assertions- Returns:
- this
-
addAssertion
Add an assertion to the list.- Parameters:
assertion- Assertion- Returns:
- this
-
computeStatus
public void computeStatus()Computes the status of the test step. -
getLevel
Gte log level.- Returns:
- log level
-
setLevel
Set log level.- Parameters:
level- log level- Returns:
- this
-
setStatus
Set status.- Parameters:
status- Status- Returns:
- this
-
getMessage
Get log message.- Returns:
- log message
-
setMessage
Set log message.- Parameters:
message- log message- Returns:
- this
-
getFeatureId
Get featureId.- Returns:
- featureId
-
setFeatureId
Set featureId.- Parameters:
featureId- FeatureId- Returns:
- this
-
getAbstractScenarioId
Get abstractScenarioId.- Returns:
- abstractScenarioId
-
setAbstractScenarioId
Set abstractScenarioId.- Parameters:
abstractScenarioId- AbstractScenarioId- Returns:
- this
-
getScenarioId
Get scenarioId.- Returns:
- scenarioId
-
setScenarioId
Set scenarioId.- Parameters:
scenarioId- ScenarioId- Returns:
- this
-
getStatus
Step status.
-