persistent class %WebStress.Playback
extends %Persistent, %XML.Adaptor
property CoolDownMins
as %Integer;
The number of minutes that the test will run for at the end of recording the statistics.
This ensures that we do not get any abnormally 'quick' timings at the end of statistics recording due to a lower load on the server.
property Generator
as %String;
The name of the generator that will be used to generate the traffic
property HttpSessions
as list of %WebStress.Playback.Session;
A collection of sessions for this process
property LoopBackPcnt
as %Integer;
This is the percentage of the time that the LoopBackURL will be used rather than the first URL
property LoopBackURL
as %Integer;
This is a pointer to the URL in the script that we will loop back to rather than just back to the first URL.
This may because the first URL is thestart of the user login process and we don't want to have the 'virtual user' logging in every time.
property NextInvoke
as %String [ MultiDimensional ];
property NoDelay
as array of %String;
Used to hold an array of all the page types where we specify no delay before making the call
property NoResults
as array of %String;
Used to hold an array of all the page types where we don't want to record statistics
property ProcessID
as %String [ InitialExpression = $job ];
This process ID
property ProxyAddress
as %String;
property ProxyPort
as %Integer;
property RecordStart
as %Integer;
property RecordStop
as %Integer;
property Run
as %WebStress.Run;
Container for the Run object
property RunID
as %Integer;
A unique number representing this run
property RunMins
as %Integer;
The number of minutes that the test will run. Used instead of start/stop date/time or can be blank if start/stop date/time are used.
property SSLConfiguration
as %String;
property SavePage
as %Boolean;
A flag that indicates whether or not to save the returned page information into disk files.
property SavePageDir
as %String;
The root directory of where to sabe the returned page details if indicated to do so by the SavePage property
property Script
as %WebStress.Scripts;
Container for the %WebStress.Script object
property ScriptID
as %Integer;
Pointer to %WebStress.Scripts
property ScriptPause
as %Integer;
The number of seconds to pause at the end of each script.
This gives a more realistic playback as 'human' input would normally pause before running the same workflow again.
property Sessions
as %Integer;
The number of sessions per process
property StartDate
as %Date;
The date that the test run will start. Can be blank.
property StartTime
as %Time;
The time that the test run will start. Can be blank.
property Status
as %WebStress.Playback.Status;
property StopDate
as %Date;
The date that the test run will stop. Can be blank.
property StopTime
as %Time;
The time that the test run will stop. Can be blank.
property Test
as %WebStress.Tests;
Container for the %WebStress.Tests object
property TestID
as %Integer;
Pointer to %WebStress.Tests
property TestStop
as %Integer;
property TimeDiff
as %Float;
The difference between the time on this machine and the time on the 'controller' (The system that initiated the run)
property WarmUpMins
as %Integer;
The number of minutes that the test will run for before recording the statistics starts.
This is to ensure that all the processes are running and that a consistent load is being applied to the server before the recording starts.
The value should be long enough to ensure that each script is able to run through to completion at least once
property WebServer
as %String;
The address of the web server that will be used
property WebServerPort
as %Integer;
The port number on the web server
property debug
as %Boolean;
This property used internally for debugging and logging purposes.
method CheckRecordStatus()
method ErrorCheck(ByRef errorStatus As %Integer = 0, errorText As %String = "", ByRef objUrl As %WebStress.Scripts.URLS, session As %Integer, urlId As %Integer)
Called after each call to check the page error status
method GetTimes()
method Playback()
This runs the playback
method PostExecute(ByRef objUrl As %WebStress.Scripts.URLS)
Called after a URL call has been made to the server
method PostRunCode()
This is called at the end of the full script
method PreExecute(ByRef objUrl As %WebStress.Scripts.URLS, ByRef params As %String)
This is called before a URL call is made to the server. Normally to reset any parameters
method PreRunCode(ByRef objUrl As %WebStress.Scripts.URLS, session As %Integer, urlId As %Integer)
This is called at the start of the full script
classmethod Run(RunID As %Integer, TestID As %Integer, ScriptID As %Integer, Generator As %String, WebServer As %String, WebServerPort As %Integer = 80, Sessions As %Integer = 1, StartDate As %Date = "", StopDate As %Date = "", StartTime As %Time = "", StopTime As %Time = "", RunMins As %Integer, WarmUpMins As %Integer, CoolDownMins As %Integer, ScriptPause As %Integer, LoopBackUrl As %Integer = "", LoopBackPcnt As %Integer = "", TimeDiff As %Integer, debug As %Boolean = 0, Visual As %Boolean = 0, SavePage As %Boolean = 0, SavePageDir As %String, ProxyAddress As %String, ProxyPort As %Integer, SSLConfiguration As %String)
Enter here to start the run processing
method RunStop(controller As %Boolean = 0)
as %Boolean
classmethod RunWait(TestID As %Integer, StartDate As %Integer, StopDate As %Integer, StartTime As %Integer, StopTime As %Integer, debug As %Boolean)
as %Integer
method SetError(session As %Integer, urlId As %Integer, objUrl As %WebStress.Scripts.URLS, errorStatus As %Integer, errorText As %String)
index (Main on RunID,Generator,ProcessID) [IdKey,PrimaryKey,Unique];
The array showing which session is to be run next