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:
sessionId
is the test session identifier.bytesSent
is the amount of bytes sent.bytesReceived
is the amount of bytes received.scenarioCount
is the number of executed scenarios.scenarioFailed
is the number of failed scenarios.downloadCount
is the number of files downloaded.downloadFailed
is the number of file download failures.downloadBytes
is the amount of bytes in file downloads.- The
sessionDuration
record stores details of the session duration:startTime
is the date the session started in seconds since epoch.endTime
is the date the session ended in seconds since epoch.
- The
downloadFailures
stores an array of failed download URLs. - The
checkFailures
stores an array of records with a list of failed checks:- The
fileName
is the file name where the check failure occurred. - The
lineNo
is the line number in the file. - The
message
is the details of the error.
- The
- The
Failures
stores an array of records with a list of failed scenarios:- The
fileName
is the file name where the scenario failure occurred. - The
lineNo
is the line number in the file. - The
message
is the details of the error.
- The
- 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.*)