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 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 Details

    • EventData

      public EventData()
      Creates a new EventData object.
    • EventData

      public EventData(String name)
      Creates a new EventData object and gives it the specified name.
      Parameters:
      name - the event name
  • Method Details

    • getMessage

      public String getMessage()
      Returns the message associated with this event.
      Returns:
      the message
    • getTestCaseName

      public String getTestCaseName()
      Returns the name of the test case that generated this event.
      Returns:
      the test case name
    • setMessage

      public void setMessage(String message)
      Sets the message associated with this event.
      Parameters:
      message - the message to set
    • setTestCaseName

      public void setTestCaseName(String testCaseName)
      Sets the name of the test case that generated this event.
      Parameters:
      testCaseName - the test case name
    • toList

      public List<String> 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 interface Data
      Overrides:
      toList in class AbstractData
      Returns:
      the list of values that form the state of this object
      See Also:
    • setRemainingValues

      public void setRemainingValues(List<XltCharBuffer> values)
      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 calling Data.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: