51Testing软件测试论坛

标题: 选用oracle nca协议测试要注意哪些点? [打印本页]

作者: wuyqwuyq    时间: 2006-11-29 20:23
标题: 选用oracle nca协议测试要注意哪些点?
在选用oracle nca协议录制完脚本,进行回放的时候往往会出现
connect_server error的错误。

此时要从以下几个方面进行排查。


The above error occurs when LoadRunner is having problem connecting to the server. Some of the most common causes are

1. Make sure that your script is recorded in either of the following mode:
    a. HTTP mode, or
    b. HTML mode with non-HTML generated elements recorded in separate steps
    If not, regenerate (Tools -> Regenerate Vuser) your script.
    Note:If you have LoadRunner 7.51 SP1 or below, you will need to re-record.

2. Make sure that NCAJServSessionID is correlated correctly. While generating script, LoadRunner assume that the buffer ended with \r. However, there are cases that it ends with \n. LoadRunner currently does not check for the correct boundary. To verify, replay the script in extended log to find out the correct boundary. If needed, change the RB argument for the web_reg_save_param function.
    Example:
    web_reg_save_param("NCAJServSessionId", "LB=\r\n\r\n", "RB=\n", "ORD=1", "LAST");

3. On the web_url statement that has the NCAJServSessionID substituted, make sure that the resource argument is set to 0. This will ensure that the resource in which NCAJServSessionID is used is always downloaded regardless of what is set in Run Time Settings.
    Example:
    web_url("oracle.forms.servlet.ListenerSer",
        "URL=http://ABC-123<NCAJServSessionId>?ifcmd=getinfo&ifhost=mercury&ifip=123.45.789.12",
        "TargetFrame=",
        "Resource=0",
        "RecContentType=application/octet-stream",
    LAST);

4. Open the default.cfg file in the script directory using notepad and make sure that it has UseServletMode=2 under the [HttpConnectMode] section for an environment with Forms Listener Servlet.

5. Make sure that there are no changes on the server port number. LoadRunner replays the script with the port number that the application uses during the recording session, a change could cause a problem. To resolve the issue, find out the current port number and modify the connect_server statement to reflect the correct port number.

6. Make sure that you specify the correct SSL version. To do so, add following statement at the beginning of the script,
    web_set_sockets_options("SSL_VERSION", "3");
    Note: This is a web function. If only Oracle NCA was selected for Multi-Protocol Vuser, make the following changes to .usr file found in script directory:

Change

   AdditionalTypes=Oracle_NCA
   ActiveTypes=Oracle_NCA
   GenerateTypes=Oracle_NCA

   to

   AdditionalTypes=Oracle_NCA,HTTP
   ActiveTypes=Oracle_NCA,HTTP
   GenerateTypes=Oracle_NCA,HTTP

有时回放时出现错误,可通过如下方法进行解决
1.
Apply the LR80P23 and LR80P46 patches.
Then replace the "ncarp11i.dll" file with the one in attached.
This is the patch our R&D developped most recently.
2.
Add new parameter to script's default.cfg file under the section for [NCA_GENERAL].
Add as the next parameter:
E.g.
[NCA_GENERAL]
...
NcaTimerWaitMode=3



3.
Add Java_prop array to script,and use function:"nca_java_set_reply_property(JAVA_PROP)" before nca_connect_server to enable the jave_prop.
E.g.
char * JAVA_PROP[][] = {
       {"35", "getDStatus", "0"},
       {"35", "GetHostname", "0jameszh"},
       {"35", "UserHome", "C:\\Documents and Settings\\Administrator.JAMESZH"},
       {"35", "makeDirStat", "1"},
       {"35", "UGetProperty", "Administrator"},
       {"35", "OsName", "Windows 2000"},
       {"35", "FileOperation", "C:\\Documents and Settings\\Administrator.JAMESZH\\sysrt.bat,C,echo %WINDIR%"},
           {"35", "getCStatus", "0"},
           {"35", "getOsDir", "C:\\WINNT"},
           {"35", "getDStatus", "0"},
           {"35", "getEStatus", "0"},
           {"35", "GetPFStatus", "0"},
           {"35", "getLineCnt", "1"},
           {"35", "GetVString", "javatwain.dll=1.0"},
       {"36", "UserHome", "C:\\Documents and Settings\\Administrator.JAMESZH"},
             {"35", "", ""}
};

The first part of the array :"35" is the object name/id.
The second part:"getDStatus" is the Property value in execution log.
The third part:"0" is the Property value in client message.

About how to set up the Java_prop array,Add        "nca_java_set_reply_property(JAVA_PROP);" before nca_conncet_server.



4.Replay and you will find the successful result!

[ 本帖最后由 wuyqwuyq 于 2006-12-9 11:43 编辑 ]
作者: engleliu    时间: 2007-9-4 21:51
试试
作者: ppent    时间: 2007-9-5 10:57
楼主的文章很全面,非常好。
遗憾的是自己还没有Oracle NCA的测试经验,先收藏。
作者: freshrain    时间: 2007-12-4 16:36
标题: 楼主的附件是干什么使的?
楼主的这个ncarp11i.dll附件是干什么使的?
作者: iqpkeq    时间: 2011-11-18 16:53
我都不清楚 ORACL NCA协议是什么




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2