WebSetHttpTag Function

Action

This functions allows to add an unique HTTP header tag to every web request of a load test. This can be used to correlate timing or accuracy problems during a load test with results of in-depth analysis tools.

Include file

WebAPI.bdh

Syntax

WebSetHttpTag( in sHeader : string,
               in nFlags  : number );
Parameter Description
sHeader Specify any valid HTTP header (name of the tag header).
nFlags Specify any combination of the following values:
WEB_TAG_FLAG_ProjectName
HTTP header contains the name of the used Silk Performer project:PN=<ProjectName>
WEB_TAG_FLAG_TestName
HTTP header contains the name of the used Silk Performer project:TE=<ProjectName>
WEB_TAG_FLAG_UserGroup
HTTP header contains the name of the Silk Performer user-group to which the virtual user sending the request belongs: UG=<UserGroup>
WEB_TAG_FLAG_Profile
HTTP header contains the name of the Silk Performer profile which the virtual user sending the request uses: PF=<Profile>
WEB_TAG_FLAG_Workload
HTTP header contains the name of the Silk Performer workload which the virtual user sending the request uses: WL=<Workload>
WEB_TAG_FLAG_Transaction
HTTP header contains the name of the Silk Performer transaction which the virtual user sending the request is currently executing: TN=<Transaction>
WEB_TAG_FLAG_UserId
HTTP header contains a unique user id (cross loadtest): VU=<Id>
WEB_TAG_FLAG_BrowserSession
HTTP header contains a browser session id. This session id is incremented when the virtual user logically opens a browser: SI=<BrowserSessionId>
WEB_TAG_FLAG_PageContext
HTTP header contains a information about what document in the currently processed page is loaded. If it is a named frame then the value starts with the frame name. After a dot the page-unique document number is appended. Note that if embedded documents get cached this number need not be progresional: PC=<FrameName>.<DocId>
WEB_TAG_FLAG_RequestId
HTTP header contains a user-unique request id: ID=<RequestId>
WEB_TAG_FLAG_Timer
If the current request gets issued in a page context (page-level API) the HTTP header contains the specified timer name (if omitted the name is empty): NA=<TimerName>
WEB_TAG_FLAG_WorkloadType
HTTP header contains the Silk Performer workload type: WT=<WorkloadType>
Possible workload types:
  • 0: SteadyState
  • 1: Increasing
  • 2: Dynamic
  • 3: Queuing
  • 4: Monitoring
  • 5: AllDay
  • 6: Verify
  • 7: SingleUser
WEB_TAG_FLAG_Agent
HTTP header contains the name of the used Silk Performer agent: AN=<AgentName>
WEB_TAG_FLAG_LineNumber
HTTP header contains the line number of the currently executed Silk Performer function: LN=<LineNumber>
WEB_TAG_FLAG_Time
HTTP header contains the current controller time in the format of seconds since 1970: TI=<ElapsedSeconds>

Example

dcltrans
transaction TInit
begin
  WebSetHttpTag("MyTag",
  WEB_TAG_FLAG_RequestId |
  WEB_TAG_FLAG_UserId |
  WEB_TAG_FLAG_ProjectName |
  WEB_TAG_FLAG_UserGroup |
  WEB_TAG_FLAG_Profile |
  WEB_TAG_FLAG_LineNumber);
end TInit;