How to Correlate Scripts - Siebel

Correlation Library

To assist you with correlation, Siebel has released a correlation library file as part of the Siebel Application Server version 7.7. This library is available only through Siebel. The library file, ssdtcorr.dll, is located under the siebsrvr\bin folder for Windows and under siebsrvr/lib for Linux installations.

The library file, ssdtcorr.dll, must be available to all machines where a Load Generator or Controller reside. Support for this library requires VuGen 8.0 and higher. The following steps describe how to enable correlation with this library.

  1. Copy the DLL file into the bin folder of the product installation.

  2. Open a multi-protocol script using the Siebel-Web Vuser type.

  3. Enable UTF-8 support in the Recording Options > HTTP Properties > Advanced node.

  4. Open the recording option's Correlation node and click Import. Import the rules file, WebSiebel77Correlation.cor, from the \dat\webrulesdefaultsetting folder. If you are prompted with warnings, click Override.

  5. To revert to the default correlation, delete all of the Siebel rules and click Use Defaults.

    When using the Siebel correlation library, verify that the SWE count rules (where the left boundary contains the SWEC string) are not disabled.

Correlation Rules

VuGen's native built-in rules for the Siebel server detect the Siebel server variables and strings, automatically saving them for use at a later point within the script. The rules list the boundary criteria that are unique for Siebel server strings.

When VuGen detects a match using the boundary criteria, it saves the value between the boundaries to a parameter. The value can be a simple variable or a public function.

In normal situations, you do not need to disable any rules. In some cases, however, you may want to disable rules that do not apply. For example, disable Japanese content check rules when testing English-only applications.

Another reason to disable a rule is if the Controller explicitly requires an error condition to be generated. View the rule properties in the recording options and determine the conditions necessary for your application.

Simple Variable Correlation

In the following example, the left boundary criteria is _sn=. For every instance of _sn= in the left boundary and ; in the right, VuGen creates a parameter with the Siebel_sn_cookie prefix.

In the following example, VuGen detected the _sn boundary. It saved the parameter to Siebel_sn_cookie6 and used it in the web_url function.

/* Registering parameter(s) from source 
web_reg_save_param("Siebel_sn_cookie6", 
"LB/IC=_sn=", 
"RB/IC=;", 
"Ord=1", 
"Search=headers", 
"RelFrameId=1", 
LAST);
...
web_url("start.swe_3", 
"URL=http://cannon.hplab.com/callcenter_enu/start.swe?SWECmd=GotoPostedAction=;SWEDIC=true=;_sn={Siebel_sn_cookie6}=;SWEC={Siebel_SWECount}=;SWEFrame=top._sweclient=;SWECS=true", 
"TargetFrame=", 
"Resource=0", 
"RecContentType=text/html", 
"Referer=http://cannon.hplab.com/callcenter_enu/start.swe?SWECmd=GetCachedFrame=;_sn={Siebel_sn_cookie6}=;SWEC={Siebel_SWECount}=;SWEFrame=top._swe", 
"Snapshot=t4.inf", 
"Mode=HTML", 
LAST);

Function Correlation

In certain instances, the boundary match is a function. Functions generally use an array to store the runtime values. In order to correlate these values, VuGen parses the array and saves each argument to a separate parameter using the following format:

<parameter_name> = <recorded_value> (display_name)

The display name is the text that appears next to the value, in the Siebel Application.

VuGen inserts a comment block with all of the parameter definitions.

/* Registering parameter(s) from source task id 159
    // {Siebel_Star_Array_Op33_7} = ""
    // {Siebel_Star_Array_Op33_6} = "1-231"
    // {Siebel_Star_Array_Op33_2} = ""
    // {Siebel_Star_Array_Op33_8} = "Opportunity"
    // {Siebel_Star_Array_Op33_5} = "06/26/2003 19:55:23"
    // {Siebel_Star_Array_Op33_4} = "06/26/2003 19:55:23"
    // {Siebel_Star_Array_Op33_3} = ""
    // {Siebel_Star_Array_Op33_1} = "test camp"
    // {Siebel_Star_Array_Op33_9} = ""
    // {Siebel_Star_Array_Op33_rowid} = "1-6F"
    // */

In addition, when encountering a function, VuGen generates a new parameter for web_reg_save_param, AutoCorrelationFunction. VuGen also determines the prefix of the parameters and uses it as the parameter name. In the following example, the prefix is Siebel_Star_Array_Op33.

web_reg_save_param("Siebel_Star_Array_Op33", 
    "LB/IC=`v`", 
    "RB/IC=`", 
    "Ord=1", 
    "Search=Body", 
    "RelFrameId=1", 
    "AutoCorrelationFunction=flCorrelationCallbackParseStarArray", 
    LAST);

VuGen uses the parameters at a later point within the script. In the following example, the parameter is called in web_submit_data.

web_submit_data("start.swe_14",    "Action=http://cannon.hplab.com/callcenter_enu/start.swe",    "Method=POST",    "RecContentType=text/html",    "Referer=",    "Snapshot=t15.inf",    "Mode=HTML",    ITEMDATA,    "Name=SWECLK", "Value=1", ENDITEM,    "Name=SWEField", "Value=s_2_1_13_0", ENDITEM,    "Name=SWER", "Value=0", ENDITEM,    "Name=SWESP", "Value=false", ENDITEM,    "Name=s_2_2_29_0", "Value={Siebel_Star_Array_Op33_1}", ENDITEM,    "Name=s_2_2_30_0", "Value={Siebel_Star_Array_Op33_2}", ENDITEM,    "Name=s_2_2_36_0", "Value={Siebel_Star_Array_Op33_3}", ENDITEM, ...

During replay, Vusers do a callback to the public function, using the array elements that were saved as parameters.

Note: Correlation for the SWEC parameter is not done through the correlation rules. VuGen handles it automatically with a built-in detection mechanism. For more information, see below.

SWEC Correlation

SWEC is a parameter used by Siebel servers representing the number of user clicks. The SWEC parameter usually appears as an argument of a URL or a POST statement. For example:

GET /callcenter_enu/start.swe?SWECmd=GetCachedFrame=;_sn=2-mOTFXHWBAAGb5Xzv9Ls2Z45QvxGQnOnPVtX6vnfUU_=;SWEC=1=;SWEFrame=top._swe._sweapp HTTP/1.1

or

POST /callcenter_enu/start.swe HTTP/1.1
...
\r\n\r\n
SWERPC=1=;SWEC=0=;_sn=2-mOTFXHWBAAGb5Xzv9Ls2Z45QvxGQnOnPVtX6vnfUU_=;SWECmd=InvokeMethod...

VuGen handles the changes of the SWEC by incrementing a counter before each relevant step. VuGen stores the current value of the SWEC in a separate variable (Siebel_SWECount_var). Before each step, VuGen saves the counter's value to a VuGen parameter (Siebel_SWECount).

In the following example, web_submit_data uses the dynamic value of the SWEC parameter, Siebel_SWECount.

Siebel_SWECount_var += 1;
lr_save_int(Siebel_SWECount_var, "Siebel_SWECount");
web_submit_data("start.swe_8", 
    "Action=http://cannon.hplab.com/callcenter_enu/start.swe", 
    "Method=POST", 
    "TargetFrame=", 
    "RecContentType=text/html", 
    "Referer=", 
    "Snapshot=t9.inf", 
    "Mode=HTML", 
    "EncodeAtSign=YES", 
    ITEMDATA, 
    "Name=SWERPC", "Value=1", ENDITEM, 
    "Name=SWEC", "Value={Siebel_SWECount}", ENDITEM, 
    "Name=SWECmd", "Value=InvokeMethod", ENDITEM, 
    "Name=SWEService", "Value=SWE Command Manager", ENDITEM, 
    "Name=SWEMethod", "Value=BatchCanInvoke", ENDITEM, 
    "Name=SWEIPS",... 
    LAST);

Note that the SWEC parameter may also appear in the referrer URL. However, its value in the referrer URL usually differs from its value in the requested URL. VuGen handles this automatically.

Back to top

Correlate SWECount Parameters

The SWECount parameter value is usually a small number consisting of one or two digits. It is often difficult to determine where to replace the recorded value with a parameter.

In the web_submit_data function, VuGen only replaces it in the SWEC field.

In URLs, VuGen only replaces the value when it appears after the strings "SWEC=" or "SWEC`".

The parameter name for all the SWECount correlations is the same.

Back to top

Correlate ROWID Parameters

In certain cases, the rowid is preceded by its length, encoded in hexadecimal format. Since this length can change, this value must be correlated.

For example, the following string is comprised of a length value and RowID, xxx6_1-4ABCyyy, where 6 is the length, and 1-4ABC is the RowID.

If you define parameters to correlate the string as

xxx{rowid_Length}_{rowid}yyy

then using this enhanced correlation, VuGen generates the following function before the string:

web_save_param_length("rowid", LAST); 

This function gets the value of rowid, and saves its length into the parameter rowid_length in hexadecimal format.

Back to top

Correlate SWET (timestamp) Parameters

The SWETS value in the script, is the number of milliseconds since midnight January 1st, 1970.

VuGen replaces all non-empty timestamps in the script, with the parameter {SiebelTimeStamp}. Before saving a value to this parameter, VuGen generates the following function:

web_save_timestamp_param("SiebelTimeStamp", LAST);

This function saves the current timestamp to the SiebelTimeStamp parameter.

Back to top