Class 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:
    ActionData, CustomData, RequestData, TransactionData, DataManager
    • Constructor Detail

      • EventData

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

        public EventData​(java.lang.String name)
        Creates a new EventData object and gives it the specified name.
        Parameters:
        name - the event name
    • 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:
        addValues in class AbstractData
        Returns:
        the list of values
      • getMinNoCSVElements

        protected int getMinNoCSVElements()
        Returns the minimum number of elements in the CSV string.
        Overrides:
        getMinNoCSVElements in class AbstractData
        Returns:
        minimum number of elements in the CSV string