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
- The session record stores the session statistics:
sessionId
is the test session identifierbytesSent
is the amount of bytes sentbytesReceived
is the amount of bytes receivedscenarioCount
is the number of executed scenariosscenarioFailed
is the number of failed scenariosdownloadCount
is the number of files downloadeddownloadFailed
is the number of file download failuresdownloadBytes
is the amount of bytes in file downloads- The
sessionDuration
record stores details of the session durationstartTime
is the date the session started in seconds since epochendTime
is the date the session ended (seconds since epoch)
- The
downloadFailures
stores an array of failed download URLs- The
errors
array stores records of the errors reported:-
status
is an error status string detailMessage
is the error message
-
- The
- 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
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.*)