Class EventData
- java.lang.Object
-
- com.xceptance.xlt.api.engine.AbstractData
-
- com.xceptance.xlt.api.engine.EventData
-
- All Implemented Interfaces:
Data
public class EventData extends AbstractData
The
EventDataclass 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,
EventDataobjects 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, anEventDataobject carries a message string describing the event in some greater detail. As with all statistics,EventDataobjects can be recorded via theDataManager.Note that
EventDataobjects have an "E" as their type code.- See Also:
ActionData,CustomData,RequestData,TransactionData,DataManager
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.List<java.lang.String>addValues()Builds a list of string values that represents the state of this object.java.lang.StringgetMessage()Returns the message associated with this event.protected intgetMinNoCSVElements()Returns the minimum number of elements in the CSV string.java.lang.StringgetTestCaseName()Returns the name of the test case that generated this event.protected voidparseValues(java.lang.String[] values)Recreates the state of this object from an array of string values.voidsetMessage(java.lang.String message)Sets the message associated with this event.voidsetTestCaseName(java.lang.String testCaseName)Sets the name of the test case that generated this event.-
Methods inherited from class com.xceptance.xlt.api.engine.AbstractData
fromCSV, getAgentName, getName, getTime, getTransactionName, getTypeCode, setAgentName, setName, setTime, setTime, setTransactionName, toCSV
-
-
-
-
Method Detail
-
getMessage
public java.lang.String getMessage()
Returns the message associated with this event.- Returns:
- the message
-
getTestCaseName
public java.lang.String getTestCaseName()
Returns the name of the test case that generated this event.- Returns:
- the test case name
-
setMessage
public void setMessage(java.lang.String message)
Sets the message associated with this event.- Parameters:
message- the message to set
-
setTestCaseName
public void setTestCaseName(java.lang.String testCaseName)
Sets the name of the test case that generated this event.- Parameters:
testCaseName- the test case name
-
addValues
protected java.util.List<java.lang.String> addValues()
Builds a list of string values that represents the state of this object. Override this method in sub classes to add custom values and use the list created by the super class.- Overrides:
addValuesin classAbstractData- Returns:
- the list of values
-
parseValues
protected void parseValues(java.lang.String[] values)
Recreates the state of this object from an array of string values. Override this method in sub classes to restore custom values, but do not forget to call the super class first.- Overrides:
parseValuesin classAbstractData- Parameters:
values- the list of values, must have at least the lengthAbstractData.getMinNoCSVElements()
-
getMinNoCSVElements
protected int getMinNoCSVElements()
Returns the minimum number of elements in the CSV string.- Overrides:
getMinNoCSVElementsin classAbstractData- Returns:
- minimum number of elements in the CSV string
-
-