Share this page

# Oracle NCA correlation

The following steps describe different items in Oracle NCA scripts that may need correlation.

In this topic:

## Correlate statements for load balancing

VuGen supports load balancing for multiple application servers. You correlate the HTTP return values with the nca_connect_server parameters. The Vuser then connects to the relevant server during test execution, applying load balancing. The following steps describe how to correlate statements for load balancing.

1. Record a multi-protocol script.

Record a multi-protocol script for Oracle NCA and web protocols. Perform the required actions and save the script.

2. Define parameters for host and host arguments.

   Define two variables, serverHost and serverArgs, for parameterization:

       web_set_max_html_param_len("512");
       web_reg_save_param("serverHost", "NOTFOUND=ERROR",
           "LB=<PARAM name=\"serverHost\" value=\"","RB=\">", LAST);
       web_reg_save_param("serverArgs", "NOTFOUND=ERROR",
           "LB=<PARAM name=\"serverArgs\" value=\"","RB=\">", LAST);

3. Assign values to serverHost and serverArgs:

       web_url("step_name", "URL=http://server1.acme.com/test.htm", LAST);

4. Modify the nca_connect_server statement from:

   nca_connect_server("199.203.78.170", 9000"/*version=107*/, "module=e:\\appsnca...fndnam=apps ");

   to:

   nca_connect_server("{ serverHost }", "9000"/*version=107*/, "{serverArgs}");

The script should now look like this:

    web_set_max_html_param_len("512");
    web_reg_save_param("serverHost", "NOTFOUND=ERROR",
        "LB=<PARAM name=\"serverHost\" value=\"","RB=\">", LAST);
    web_reg_save_param("serverArgs", "NOTFOUND=ERROR",
        "LB=<PARAM name=\"serverArgs\" value=\"","RB=\">", LAST);
        web_url("step_name", "URL=http://server1.acme/test.htm", LAST);
    nca_connect_server("{serverHost}","9000"/*version=107*/,"{serverArgs}");

### Correlate the icx_ticket variable

The icx_ticket variable, is part of the information sent in the web_url and nca_connect_server functions:

    web_url("fnd_icx_launch.runforms",
    "URL=http://ABC-123:8002/pls/VIS/fnd_icx_launch.runforms\?ICX_TICKET=5843A55058947ED3=;RESP_APP=AR=;RESP_KEY=RECEIVABLES_MANAGER=;SECGRP_KEY=STANDARD", LAST);

This icx_ticket value is different for each recording. It contains cookie information sent by the client. To correlate your recording, add web_reg_save_param before the first occurrence of the recorded icx_ticket value:

    web_reg_save_param("icx_ticket", "LB=TICKET=", "RB==;RES", LAST);
    ...
    web_url("fnd_icx_launch.runforms",
    "URL=http://ABC-123:8002/pls/VIS/fnd_icx_launch.runforms\?ICX_TICKET={icx_ticket}=;RESP_APP=AR=;RESP_KEY=RECEIVABLES_MANAGER=;SECGRP_KEY=STANDARD", LAST);

Note: The left and right boundaries of web_reg_save_param may differ depending on your application setup.

## Correlate the JServSessionldroot values

The JServSessionIdroot value is a cookie that the application sets to store the session ID. In most cases, VuGen automatically correlates this value and inserts a web_reg_save_param function. If VuGen did not add this function automatically, you add it manually, replacing all of its occurrences with the parameter name.

To identify the value that you need to correlate, open the Execution log (View > Output Window) and locate the response body.

    vuser_init.c(8):     Set-Cookie: JServSessionIdroot=my1sanw2n1.JS4; path=/\r\n
    vuser_init.c(8):     Content-Length: 79\r\n
    vuser_init.c(8):     Content-Type: text/plain\r\n
    vuser_init.c(8):     \r\n
    vuser_init.c(8):     81-byte response body for "http://ABC-123/servlet/oracle.forms.servlet.ListenerServlet?ifcmd=getinfo=;
                              ifhost=anyco=;ifip=123.45.789.12" (RelFrameId=1)
    vuser_init.c(8):     /servlet/oracle.forms.servlet.ListenerServlet?JServSessionIdroot=my1sanw2n1.JS4\r\n

To correlate this dynamic value, insert a web_reg_save_param function before the first occurrence and then replace the variable value with the parameter name throughout the script. In this example, the right and left boundaries are \r and \n, but you should check your specific environment to determine the exact boundaries in your environment.

    web_reg_save_param("NCAJServSessionId","LB=\r\n\r\n","RB=\r","ORD=1",LAST);
    web_url("f60servlet",
        "URL= http://ABC-"123/servlet/oracle.forms.servlet.ListenerServlet?ifcmd=getinfo=;" "ifhost=anyco=;ifip=123.45.789.12", LAST);
    web_url("oracle.forms.servlet.ListenerSer",
        "URL=http://ABC-123{NCAJServSessionId}?ifcmd=getinfo=;" "ifhost=anyco=;ifip=123.45.789.12", LAST);

https://admhelp.microfocus.com VuGen,Professional Performance Engineering,Performance Engineering for Developers 8942
Tips to improve your search results... OpenText™ Virtual User Generator Help Center OpenText™ VuGen Help 26.1-26.3 All View Local Help Center View Online Help Center Version: