Statistics

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

Syntax

# Statistics data
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,
    checkFailures DYNAMIC ARRAY OF RECORD
        fileName STRING,
        lnum INTEGER,
        message STRING
    END RECORD,
    failures DYNAMIC ARRAY OF RECORD
        fileName STRING,
        lnum INTEGER,
        message STRING
    END RECORD,
    vmErrors DYNAMIC ARRAY OF STRING
END RECORD
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 in seconds since epoch.
  10. The downloadFailures stores an array of failed download URLs.
  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.
  12. The Failures stores an array of records with a list of failed scenarios:
    1. The fileName is the file name where the scenario failure occurred.
    2. The lineNo is the line number in the file.
    3. The message is the details of the error.
  13. The vmErrors stores an array of vm errors.

Usage

Use the Statistics type when retrieving statistics after application testing is finished. A variable of the type ggc.Statistics must be defined. The ggc.getStatistics() function returns the statistics into the defined variable, after which the ggc.showStatistics() function can display the variable's contents.

DEFINE stats ggc.Statistics

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