51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 4530|回复: 4
打印 上一主题 下一主题

[原创] 选用oracle nca协议测试要注意哪些点?

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2006-11-29 20:23:05 | 只看该作者 回帖奖励 |正序浏览 |阅读模式
在选用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 编辑 ]

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?(注-册)加入51Testing

x
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

5#
发表于 2011-11-18 16:53:10 | 只看该作者
我都不清楚 ORACL NCA协议是什么
回复 支持 反对

使用道具 举报

该用户从未签到

4#
发表于 2007-12-4 16:36:37 | 只看该作者

楼主的附件是干什么使的?

楼主的这个ncarp11i.dll附件是干什么使的?
回复 支持 反对

使用道具 举报

该用户从未签到

3#
发表于 2007-9-5 10:57:04 | 只看该作者
楼主的文章很全面,非常好。
遗憾的是自己还没有Oracle NCA的测试经验,先收藏。
回复 支持 反对

使用道具 举报

该用户从未签到

2#
发表于 2007-9-4 21:51:19 | 只看该作者
试试
回复 支持 反对

使用道具 举报

本版积分规则

关闭

站长推荐上一条 /1 下一条

小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

GMT+8, 2024-11-14 17:39 , Processed in 0.069236 second(s), 29 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

快速回复 返回顶部 返回列表