webtester.packages.stats
Class executionStats

java.lang.Object
  |
  +--webtester.packages.stats.executionStats

public class executionStats
extends java.lang.Object

Gathers runtime statistics which, if enabled, will be sent to the default notification address.

Author:
Aaron DeLong

Field Summary
private  globalConfig gConfig
          Contains global configuration information.
private  java.util.HashMap hTestCaseBeginTimes
          Contains times at which test cases were started.
private  java.util.HashMap hTestCaseEndTimes
          Contains times at which test cases finished.
private  java.util.HashMap hUrlBeginTimes
          Contains times when URLs were called.
private  java.util.HashMap hUrlBytesReturned
          Contains the bytes returned for URLs.
private  java.util.HashMap hUrlEndTimes
          Contains times when URLs finished responding.
private static int iTimeConversion
          Used to convert time from milliseconds to seconds.
private  testCaseConfig tConfig
          Contains test case specific configuration information.
 
Constructor Summary
executionStats(globalConfig gconfig, testCaseConfig tconfig)
          The constructor, which takes the configuration objects as arguments.
 
Method Summary
 void sendStatsEmail()
          Send email which contains the statistics email.
 void setTestCaseBeginTime(java.lang.String sDescription)
          Records the time at which the test case started executing.
 void setTestCaseEndTime(java.lang.String sDescription)
          Records the time at which the test case stopped executing.
 void setUrlBeginTime(java.lang.String sURL)
          Records the time at which the URL is being accessed.
 void setUrlBytesReturned(java.lang.String sURL, int bytes)
          Record the number of bytes read when the URL was accessed.
 void setUrlEndTime(java.lang.String sURL)
          Records the time at which the URL returned all response data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

hTestCaseBeginTimes

private java.util.HashMap hTestCaseBeginTimes
Contains times at which test cases were started.


hTestCaseEndTimes

private java.util.HashMap hTestCaseEndTimes
Contains times at which test cases finished.


hUrlBeginTimes

private java.util.HashMap hUrlBeginTimes
Contains times when URLs were called.


hUrlEndTimes

private java.util.HashMap hUrlEndTimes
Contains times when URLs finished responding.


hUrlBytesReturned

private java.util.HashMap hUrlBytesReturned
Contains the bytes returned for URLs.


gConfig

private globalConfig gConfig
Contains global configuration information.


tConfig

private testCaseConfig tConfig
Contains test case specific configuration information.


iTimeConversion

private static final int iTimeConversion
Used to convert time from milliseconds to seconds.

See Also:
Constant Field Values
Constructor Detail

executionStats

public executionStats(globalConfig gconfig,
                      testCaseConfig tconfig)
The constructor, which takes the configuration objects as arguments.

Parameters:
gconfig - contains global configuration information
tconfig - contains test case specific configuration information
Method Detail

setTestCaseBeginTime

public void setTestCaseBeginTime(java.lang.String sDescription)
Records the time at which the test case started executing.

Parameters:
sDescription - the description of the test case being executed

setTestCaseEndTime

public void setTestCaseEndTime(java.lang.String sDescription)
Records the time at which the test case stopped executing.

Parameters:
sDescription - the description of the test case that was executed

setUrlBeginTime

public void setUrlBeginTime(java.lang.String sURL)
Records the time at which the URL is being accessed.

Parameters:
sURL - the URL being accessed

setUrlBytesReturned

public void setUrlBytesReturned(java.lang.String sURL,
                                int bytes)
Record the number of bytes read when the URL was accessed.

Parameters:
sURL - the URL that was recently accessed
bytes - the number of bytes read when the URL was accessed

setUrlEndTime

public void setUrlEndTime(java.lang.String sURL)
Records the time at which the URL returned all response data.

Parameters:
sURL - the URL that was accessed

sendStatsEmail

public void sendStatsEmail()
Send email which contains the statistics email.