ggc.Statistics
The ggc.Statistics type defines a record for
retrieving test result statistics.
Syntax
# Statistics data
TYPE ggc.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:
sessionIdis the test session identifier.bytesSentis the amount of bytes sent.bytesReceivedis the amount of bytes received.scenarioCountis the number of executed scenarios.scenarioFailedis the number of failed scenarios.downloadCountis the number of files downloaded.downloadFailedis the number of file download failures.downloadBytesis the amount of bytes in file downloads.- The
sessionDurationrecord stores details of the session duration:startTimeis the date the session started in seconds since epoch.endTimeis the date the session ended in seconds since epoch.
- The
downloadFailuresstores an array of failed download URLs. - The
checkFailuresstores an array of records with a list of failed checks:- The
fileNameis the filename where the check failure occurred. - The
lineNois the line number in the file. - The
messageis the details of the error.
- The
- The
Failuresstores an array of records with a list of failed scenarios:- The
fileNameis the filename where the scenario failure occurred. - The
lineNois the line number in the file. - The
messageis the details of the error.
- The
- The
vmErrorsstores 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.*)