Statistics

The statistics type defines a record for retrieving test result statistics.

Syntax

PUBLIC TYPE Statistics RECORD
    sessionId STRING, 
    bytesSent STRING,
    bytesReceived INTEGER,
    scenarioCount INTEGER,
    scenarioFailed INTEGER,
    downloadCount INTEGER,
    downloadFailed INTEGER,
    downloadBytes INTEGER,
    sessionDuration RECORD
        startTime BIGINT,
        endTime BIGINT
    END RECORD,
    downloadFailures DYNAMIC ARRAY OF STRING,
    errors DYNAMIC ARRAY OF RECORD
        status STRING,
        detailMessage STRING
    END RECORD,
    checkFailures DYNAMIC ARRAY OF RECORD
        fileName STRING,
        lineNo INTEGER,
        message STRING
    END RECORD
END RECORD
  1. The session record stores the session statistics:
    1. sessionId is the test session identifier
    2. bytesSent is the amount of bytes sent
    3. bytesReceived is the amount of bytes received
    4. scenarioCount is the number of executed scenarios
    5. scenarioFailed is the number of failed scenarios
    6. downloadCount is the number of files downloaded
    7. downloadFailed is the number of file download failures
    8. downloadBytes is the amount of bytes in file downloads
    9. The sessionDuration record stores details of the session duration
      1. startTime is the date the session started in seconds since epoch
      2. endTime is the date the session ended (seconds since epoch)
    10. The downloadFailures stores an array of failed download URLs
      1. The errors array stores records of the errors reported:
        1. status is an error status string
        2. detailMessage is the error message
    11. The checkFailures stores an array of records with a list of failed checks:
      1. The fileName is the file name where the check failure occurred
      2. The lineNo is the line number in the file
      3. The message is the details of the error

Usage

You can use it to retrieve statistics after application testing is finished. A variable of the type Statistics must be defined, for example, calling the action getStatistics():

DEFINE stats ggc.Statistics

CALL ggc.getStatistics() RETURNING stats.*
CALL ggc.showStatistics(stats.*)