Class EventData
- All Implemented Interfaces:
Data
The EventData
class is used to record information about arbitrary "events" that may occur during a test run.
These events can be used to indicate that the test has encountered a special situation, which is not an error (which
would abort the test run), but is too important to ignore or to write to the log only. Events recorded this way are
evaluated during report generation, and a summary of the events occurred during a test run appears in the test
report.
Typically, EventData
objects are created by custom code only, since the framework has no notion about
"special situations". The statistics name inherited from the parent class can be used to indicate the type of event.
Additionally, an EventData
object carries a message string describing the event in some greater detail. As
with all statistics, EventData
objects can be recorded via the DataManager
.
Note that EventData
objects have an "E" as their type code.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the message associated with this event.Returns the name of the test case that generated this event.void
setMessage
(String message) Sets the message associated with this event.void
setRemainingValues
(List<XltCharBuffer> values) Called by XLT during report creation to recreate the remaining object state from the passed string list.void
setTestCaseName
(String testCaseName) Sets the name of the test case that generated this event.toList()
Called by XLT during a load test to return the full state of the object as a list of strings.Methods inherited from class com.xceptance.xlt.api.engine.AbstractData
getAgentName, getName, getTime, getTransactionName, getTypeCode, setAgentName, setAllValues, setBaseValues, setName, setTime, setTransactionName
-
Constructor Details
-
EventData
public EventData()Creates a new EventData object. -
EventData
Creates a new EventData object and gives it the specified name.- Parameters:
name
- the event name
-
-
Method Details
-
getMessage
Returns the message associated with this event.- Returns:
- the message
-
getTestCaseName
Returns the name of the test case that generated this event.- Returns:
- the test case name
-
setMessage
Sets the message associated with this event.- Parameters:
message
- the message to set
-
setTestCaseName
Sets the name of the test case that generated this event.- Parameters:
testCaseName
- the test case name
-
toList
Called by XLT during a load test to return the full state of the object as a list of strings. The first three entries have to be, in this order, the type code, the name, and the timestamp. All remaining entries and their order are specific to the concrete implementation class.Override this method in sub classes by calling the super method and adding custom values to the list it returns.
- Specified by:
toList
in interfaceData
- Overrides:
toList
in classAbstractData
- Returns:
- the list of values that form the state of this object
- See Also:
-
setRemainingValues
Called by XLT during report creation to recreate the remaining object state from the passed string list. The base values have already been initialized by callingData.setBaseValues(List)
with the same list of values. Splitting the process of recreating the full object state into two methods is purely for performance reasons as the second step is not always needed.- Parameters:
values
- the string list to recreate the object state from- See Also:
-