%WebStress.Scripts
persistent class %WebStress.Scripts extends %Library.Persistent, %XML.Adaptor, %ZEN.DataModel.Adaptor
SQL Table Name: %WebStress.Scripts
These are the recorded scripts that will be played back against the test systemProperty Inventory
- ContainsCSPToken
- ErrorCheck
- Name
- OriginalPort
- OriginalServer
- PostRunCode
- PreRunCode
- RandomisationGenTime
- RandomisationRoutine
- RecordDateTime
- RecordMethod
- TotalLengthMins
- URLs
Method Inventory
- CacheRecorder()
- CheckRoutineIsValid()
- GetTotalLengthMins()
- HomeDirectory()
- MS2Cache()
- MakeRtn()
- ShowProgress()
- TotalLengthMinsGet()
Parameters
parameter FileTimestamp = 60009,39315;
Properties
property ContainsCSPToken as %Boolean;
Indicates whether one or more of the URLs for this script contains a CSPToken (protected/encrypted page)
Property methods: ContainsCSPTokenDisplayToLogical(), ContainsCSPTokenGet(), ContainsCSPTokenGetStored(), ContainsCSPTokenIsValid(), ContainsCSPTokenLogicalToDisplay(), ContainsCSPTokenLogicalToXSD(), ContainsCSPTokenNormalize(), ContainsCSPTokenSet(), ContainsCSPTokenXSDToLogical()
property ErrorCheck as %String (TRUNCATE = 1);
The code to call to see if the returned page was an error.
This should in the form of a function that returns a zero or non-zero value where zero = no errors and non-zero = errors found
Examples:
$$IsError^MyScript()
##class(User.Script).IsError()
Examples:
$$IsError^MyScript()
##class(User.Script).IsError()
Property methods: ErrorCheckDisplayToLogical(), ErrorCheckGet(), ErrorCheckGetStored(), ErrorCheckIsValid(), ErrorCheckLogicalToDisplay(), ErrorCheckLogicalToOdbc(), ErrorCheckNormalize(), ErrorCheckSet()
property Name as %String (TRUNCATE = 1);
A unique name for this script
Property methods: NameDisplayToLogical(), NameGet(), NameGetStored(), NameIsValid(), NameLogicalToDisplay(), NameLogicalToOdbc(), NameNormalize(), NameSet()
property OriginalPort as %String (TRUNCATE = 1) [ InitialExpression = 80 ];
This is the default port that is used to communicate with the web server. It is assumed to be 80 unless otherwise specified.
It can be overridden by any URL
It can be overridden by any URL
Property methods: OriginalPortDisplayToLogical(), OriginalPortGet(), OriginalPortGetStored(), OriginalPortIsValid(), OriginalPortLogicalToDisplay(), OriginalPortLogicalToOdbc(), OriginalPortNormalize(), OriginalPortSet()
property OriginalServer as %String (TRUNCATE = 1);
This is the default web server address that will be used throughout the script.
It is taken from the first URL call.
The reason that we store it is so that it can be retrieved if any of the URLs throughout the script call other web servers
when it is overridden by that particular URL
It is taken from the first URL call.
The reason that we store it is so that it can be retrieved if any of the URLs throughout the script call other web servers
when it is overridden by that particular URL
Property methods: OriginalServerDisplayToLogical(), OriginalServerGet(), OriginalServerGetStored(), OriginalServerIsValid(), OriginalServerLogicalToDisplay(), OriginalServerLogicalToOdbc(), OriginalServerNormalize(), OriginalServerSet()
property PostRunCode as %String (MAXLEN = 256, TRUNCATE = 1);
The is the code that is executed at the end of each full script
It should take the form of a function that returns a zero or non-zero value indicating
whether the script should continue to run or not. (Zero = stop running, non-zero = continue to run the script)
Examples:
$$AtEnd^MyScript()
##class(User.Script).AtEnd()
Examples:
$$AtEnd^MyScript()
##class(User.Script).AtEnd()
Property methods: PostRunCodeDisplayToLogical(), PostRunCodeGet(), PostRunCodeGetStored(), PostRunCodeIsValid(), PostRunCodeLogicalToDisplay(), PostRunCodeLogicalToOdbc(), PostRunCodeNormalize(), PostRunCodeSet()
property PreRunCode as %String (MAXLEN = 256, TRUNCATE = 1);
The is the code that is executed before each run of the script.
It should take the form of a function that returns a zero or non-zero value indicating
whether the script can run or not. (Zero = do not run, non-zero = run script)
Examples:
$$Init^MyScript()
##class(User.Script).Init()
Examples:
$$Init^MyScript()
##class(User.Script).Init()
Property methods: PreRunCodeDisplayToLogical(), PreRunCodeGet(), PreRunCodeGetStored(), PreRunCodeIsValid(), PreRunCodeLogicalToDisplay(), PreRunCodeLogicalToOdbc(), PreRunCodeNormalize(), PreRunCodeSet()
property RandomisationGenTime as %Integer;
The date/time that the randomisation routine was automatically generated
Property methods: RandomisationGenTimeDisplayToLogical(), RandomisationGenTimeGet(), RandomisationGenTimeGetStored(), RandomisationGenTimeIsValid(), RandomisationGenTimeLogicalToDisplay(), RandomisationGenTimeNormalize(), RandomisationGenTimeSet(), RandomisationGenTimeXSDToLogical()
property RandomisationRoutine as %String (TRUNCATE = 1);
The name of the routine that contains the randomisation code
Property methods: RandomisationRoutineDisplayToLogical(), RandomisationRoutineGet(), RandomisationRoutineGetStored(), RandomisationRoutineIsValid(), RandomisationRoutineLogicalToDisplay(), RandomisationRoutineLogicalToOdbc(), RandomisationRoutineNormalize(), RandomisationRoutineSet()
property RecordDateTime as %TimeStamp;
Date and time that this script was recorded
Property methods: RecordDateTimeDisplayToLogical(), RecordDateTimeGet(), RecordDateTimeGetStored(), RecordDateTimeIsValid(), RecordDateTimeLogicalToDisplay(), RecordDateTimeLogicalToXSD(), RecordDateTimeNormalize(), RecordDateTimeOdbcToLogical(), RecordDateTimeSet(), RecordDateTimeXSDToLogical()
property RecordMethod as %String (TRUNCATE = 1) [ InitialExpression = "Manual" ];
This indicates the method used to build this script
Property methods: RecordMethodDisplayToLogical(), RecordMethodGet(), RecordMethodGetStored(), RecordMethodIsValid(), RecordMethodLogicalToDisplay(), RecordMethodLogicalToOdbc(), RecordMethodNormalize(), RecordMethodSet()
property TotalLengthMins as %Numeric [ Calculated ];
A calculation of how long the script would take to run based upon the delay time
between the user's input and the recorded length of time for the server to reply to
the request.
Property methods: TotalLengthMinsCompute(), TotalLengthMinsDisplayToLogical(), TotalLengthMinsIsValid(), TotalLengthMinsLogicalToDisplay(), TotalLengthMinsNormalize(), TotalLengthMinsSQLCompute(), TotalLengthMinsXSDToLogical()
relationship URLs as array of %WebStress.Scripts.URLS [ InitialExpression = $listbuild("%WebStress.Scripts.URLS","Script",+$this,"children",1,1) , Transient , Inverse = Script , Cardinality = children ];
These are the details of each dialog between the browser and the web server
that all go together to form the total script.
Property methods: URLsGet(), URLsGetObject(), URLsGetObjectId(), URLsGetSwizzled(), URLsIsEmpty(), URLsIsValid(), URLsNewObject(), URLsRClose(), URLsRExec(), URLsRFetch(), URLsRelate(), URLsSQLCompute(), URLsSet(), URLsUnRelate()
Methods
classmethod CacheRecorder(scriptname As %String = "", creatertn As %Integer = 0, rtnname As %String = "", debug As %Boolean = 0) as %String
Converts the output from a recorded session into a script with associated URLs etc.
Requires a script name as a parameter. Note that this is stored in the recorded data after this method has been called meaning that subsequent calls to this method can be left blank and the method will re-use the last supplied name.
creatertn is either 0 (zero) or non-zero indicating whether or not an automatic randomisation base routine is to be created.
rtnname specifies the optional routine name if creatrtn is used.
Requires a script name as a parameter. Note that this is stored in the recorded data after this method has been called meaning that subsequent calls to this method can be left blank and the method will re-use the last supplied name.
creatertn is either 0 (zero) or non-zero indicating whether or not an automatic randomisation base routine is to be created.
rtnname specifies the optional routine name if creatrtn is used.
classmethod GetTotalLengthMins(id As %String)
method HomeDirectory() as %String
classmethod MS2Cache(defaultnameprefix As %String = "Default_", overwrite As %Boolean = 1) as %String
Gets data from MS Access and builds our scripts
First you need to follow these steps:
1. Setup a SYSTEM ODBC data source and use the Microsoft Access driver to point to the .mdb file created by the Microsoft tool
2. Setup a SQL Gateway to point towards this ODBC data source
3. Use the SQL Manager to link to the following tables in the .mdb file:
(a) Groups
(b) HTTPTransactions
(c) Scripts
These 3 steps should create the following classes:
(a) %WebStress.WAST.Groups
(b) %WebStress.WAST.HTTPTransactions
(c) %WebStress.WAST.Scripts
Normally the name of the script would come from the .mdb file but a default can be supplied for the cases where the value in the .mdb file is a null string. In this case the name of the script will be the name of the default name prefix and then the group ID number
For example: if defaultnameprefix = "Default_" and the group ID is 3 then the name of the script would be 'Default_3'
The overwrite key is used so that you can overcome the problem where MS Access lets two different scripts have the same name. a ' (n)' is added to the end of the script name if overwrite is set to 0
For example the first file might be "Main Test" and the second would be "Main Test (2)"
First you need to follow these steps:
1. Setup a SYSTEM ODBC data source and use the Microsoft Access driver to point to the .mdb file created by the Microsoft tool
2. Setup a SQL Gateway to point towards this ODBC data source
3. Use the SQL Manager to link to the following tables in the .mdb file:
(a) Groups
(b) HTTPTransactions
(c) Scripts
These 3 steps should create the following classes:
(a) %WebStress.WAST.Groups
(b) %WebStress.WAST.HTTPTransactions
(c) %WebStress.WAST.Scripts
Normally the name of the script would come from the .mdb file but a default can be supplied for the cases where the value in the .mdb file is a null string. In this case the name of the script will be the name of the default name prefix and then the group ID number
For example: if defaultnameprefix = "Default_" and the group ID is 3 then the name of the script would be 'Default_3'
The overwrite key is used so that you can overcome the problem where MS Access lets two different scripts have the same name. a ' (n)' is added to the end of the script name if overwrite is set to 0
For example the first file might be "Main Test" and the second would be "Main Test (2)"
This method can be called to automatically create the base routine for randomisation scripts.
It accepts two arguments:
scriptid = This is the internal ID number of the script. (Required) rtnname = This is the name of the routine. (Optional). If not present this will default to "Random.Script.n"
where n is the scriptid number
scriptid = This is the internal ID number of the script. (Required) rtnname = This is the name of the routine. (Optional). If not present this will default to "Random.Script.n"
where n is the scriptid number
classmethod ShowProgress(msg)
Used by debug to show what's going on
method TotalLengthMinsGet() as %Numeric
Queries
query ListByName()
SQL Query:
SELECT %ID, Name, RecordDateTime FROM Scripts ORDER BY Name
SELECT %ID, Name, RecordDateTime FROM Scripts ORDER BY Name
Indexes
index (IDKEY on ) [IdKey, Type = key];
Index methods: IDKEYCheck(), IDKEYDelete(), IDKEYExists(), IDKEYOpen(), IDKEYSQLCheckUnique(), IDKEYSQLExists(), IDKEYSQLFindPKeyByConstraint(), IDKEYSQLFindRowIDByConstraint()
index (NameIndex on Name) [Unique];
Index methods: NameIndexCheck(), NameIndexCheckUnique(), NameIndexDelete(), NameIndexExists(), NameIndexOpen(), NameIndexSQLCheckUnique(), NameIndexSQLExists(), NameIndexSQLFindPKeyByConstraint(), NameIndexSQLFindRowIDByConstraint()
Inherited Members
Inherited Properties
Inherited Methods
- %%CLASSNAMELogicalToStorage()
- %%CLASSNAMEStorageToLogical()
- %AddToSaveSet()
- %AddToSyncSet()
- %BMEBuilt()
- %BuildIndicesAsync()
- %BuildIndicesAsyncResponse()
- %CheckConstraints()
- %CheckConstraintsForExtent()
- %ClassIsLatestVersion()
- %ClassName()
- %ComposeOid()
- %ConstructClone()
- %CreateModelInstance()
- %Delete()
- %DeleteExtent()
- %DeleteId()
- %DeleteModel()
- %DispatchClassMethod()
- %DispatchGetModified()
- %DispatchMethod()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %Exists()
- %ExistsId()
- %Extends()
- %GUID()
- %GUIDSet()
- %GetJSValidationCode()
- %GetLock()
- %GetParameter()
- %GetPropertyInfo()
- %GetSwizzleObject()
- %Id()
- %InitExtentData()
- %InsertBatch()
- %InvokeAction()
- %IsA()
- %IsModified()
- %IsNull()
- %IsReadOnly()
- %KillExtent()
- %KillExtentData()
- %LoadFromMemory()
- %LockExtent()
- %LockId()
- %New()
- %NormalizeObject()
- %ObjectIsNull()
- %ObjectModified()
- %Oid()
- %OnBeforeAddToSync()
- %OnCopyDataFromModel()
- %OnCopyDataToModel()
- %OnDeleteFinally()
- %OnDeleteModel()
- %OnDeleteSource()
- %OnDetermineClass()
- %OnGetPropertyInfo()
- %OnInvokeAction()
- %OnLoadModel()
- %OnNewSource()
- %OnOpenFinally()
- %OnOpenSource()
- %OnSaveFinally()
- %OnSaveSource()
- %OnStoreModel()
- %OnSubmit()
- %Open()
- %OpenId()
- %OpenModel()
- %OriginalNamespace()
- %PackageName()
- %PhysicalAddress()
- %PurgeIndices()
- %Reload()
- %RemoveFromSaveSet()
- %ResolveConcurrencyConflict()
- %RollBack()
- %Save()
- %SaveDirect()
- %SaveIndices()
- %SaveModel()
- %SerializeObject()
- %SetModified()
- %SortBegin()
- %SortEnd()
- %SubmitHandler()
- %SyncObjectIn()
- %SyncTransport()
- %UnlockExtent()
- %UnlockId()
- %ValidateIndices()
- %ValidateObject()
- %ValidateTable()
- XMLDTD()
- XMLExport()
- XMLExportToStream()
- XMLExportToString()
- XMLNew()
- XMLSchema()
- XMLSchemaNamespace()
- XMLSchemaType()
Storage
Storage Model: Storage (%WebStress.Scripts)
^WebStress.ScriptsD(ID) |
= | %%CLASSNAME
DefaultPort
DefaultServer
ErrorCheck
Name
PostRunCode
PreRunCode
SavedDate
SavedTime
XDataTable
LoopBackNumber
LoopBackPercent
SyncSave
Version
RecordMethod
OriginalPort
OriginalServer
RandomisationGenTime
RandomisationRoutine
ContainsCSPToken
RecordDateTime
|