有关LR的脚本问题,后台数据库是Oracle
各位大虾还请帮忙。我用LR录制了一个C/S的应用程序,协议采用的client/server中的winsocket协议,应用程序是在.Net中用C#开发的,后台数据库是Oracle10。
但录制的脚本不能运行,提示:
vuser_init.c(24): Error : callConnect - Connection refused. Error code : 10061.
vuser_init.c(24): Error : Timeout expired while trying to connect. Error code : 9017.
我多次运行脚本后发现,
所有偶数socket创建都成功了,创建语句:
lrs_create_socket("socket0", "TCP", "RemoteHost=dbserver.lan:1521",LrsLastArg);
所有奇数socket创建都失败了,创建语句是:
lrs_create_socket("socket1", "TCP", "RemoteHost=dbserver.lan:1336",LrsLastArg);
他们的不同就在于Oracle数据库端口不一致,创建奇数socket的端口不是Oracle数据库的端口。
请各位大虾费心,指点一二,谢谢了!
录制的脚本如下,
/********************************************************************** Created by Mercury Interactive Windows Sockets Recorder
*
* Created on: Wed Oct 12 09:52:17
*********************************************************************/
#include "lrs.h"
vuser_init()
{
lrs_startup(257);
lrs_create_socket("socket0", "TCP", "RemoteHost=dbserver.lan:1521",LrsLastArg);
lrs_send("socket0", "buf0", LrsLastArg);
lrs_receive("socket0", "buf1", LrsLastArg);
lrs_disable_socket("socket0", DISABLE_SEND);
lrs_close_socket("socket0");
lrs_create_socket("socket1", "TCP", "RemoteHost=dbserver.lan:1336",LrsLastArg);
lrs_send("socket1", "buf2", LrsLastArg);
lrs_receive("socket1", "buf3", LrsLastArg);
lrs_send("socket1", "buf4", LrsLastArg);
lrs_receive("socket1", "buf5", LrsLastArg);
lrs_send("socket1", "buf6", LrsLastArg);
lrs_receive("socket1", "buf7", LrsLastArg);
lrs_send("socket1", "buf8", LrsLastArg);
lrs_receive("socket1", "buf9", LrsLastArg);
lrs_send("socket1", "buf10", LrsLastArg);
lrs_receive("socket1", "buf11", LrsLastArg);
lrs_send("socket1", "buf12", LrsLastArg);
lrs_receive("socket1", "buf13", LrsLastArg);
lrs_send("socket1", "buf14", LrsLastArg);
lrs_receive("socket1", "buf15", LrsLastArg);
lrs_send("socket1", "buf16", LrsLastArg);
lrs_receive("socket1", "buf17", LrsLastArg);
lrs_send("socket1", "buf18", LrsLastArg);
lrs_receive("socket1", "buf19", LrsLastArg);
lrs_send("socket1", "buf20", LrsLastArg);
lrs_receive("socket1", "buf21", LrsLastArg);
lrs_send("socket1", "buf22", LrsLastArg);
lrs_receive("socket1", "buf23", LrsLastArg);
lrs_send("socket1", "buf24", LrsLastArg);
lrs_receive("socket1", "buf25", LrsLastArg);
lrs_send("socket1", "buf26", LrsLastArg);
lrs_receive("socket1", "buf27", LrsLastArg);
lrs_send("socket1", "buf28", LrsLastArg);
lrs_receive("socket1", "buf29", LrsLastArg);
lrs_send("socket1", "buf30", LrsLastArg);
lrs_receive("socket1", "buf31", LrsLastArg);
lrs_send("socket1", "buf32", LrsLastArg);
lrs_receive("socket1", "buf33", LrsLastArg);
lrs_send("socket1", "buf34", LrsLastArg);
lrs_receive("socket1", "buf35", LrsLastArg);
lrs_send("socket1", "buf36", LrsLastArg);
lrs_receive("socket1", "buf37", LrsLastArg);
lrs_send("socket1", "buf38", LrsLastArg);
lrs_receive("socket1", "buf39", LrsLastArg);
lrs_send("socket1", "buf40", LrsLastArg);
lrs_receive("socket1", "buf41", LrsLastArg);
lrs_send("socket1", "buf42", LrsLastArg);
lrs_receive("socket1", "buf43", LrsLastArg);
lrs_send("socket1", "buf44", LrsLastArg);
lrs_receive("socket1", "buf45", LrsLastArg);
lrs_send("socket1", "buf46", LrsLastArg);
lrs_receive("socket1", "buf47", LrsLastArg);
lrs_send("socket1", "buf48", LrsLastArg);
lrs_receive("socket1", "buf49", LrsLastArg);
lrs_send("socket1", "buf50", LrsLastArg);
lrs_receive("socket1", "buf51", LrsLastArg);
lrs_send("socket1", "buf52", LrsLastArg);
lrs_receive("socket1", "buf53", LrsLastArg);
lrs_send("socket1", "buf54", LrsLastArg);
lrs_receive("socket1", "buf55", LrsLastArg);
lrs_send("socket1", "buf56", LrsLastArg);
lrs_receive("socket1", "buf57", LrsLastArg);
lrs_send("socket1", "buf58", LrsLastArg);
lrs_receive("socket1", "buf59", LrsLastArg);
lrs_send("socket1", "buf60", LrsLastArg);
lrs_receive("socket1", "buf61", LrsLastArg);
lrs_send("socket1", "buf62", LrsLastArg);
lrs_receive("socket1", "buf63", LrsLastArg);
return 0;
} 大哥,第二个端口是变化的,是真正的进行数据交互的端口. 麻烦大虾再看看脚本出错的原因是什么呢?
谢谢了 麻烦大虾再看看脚本出错的原因是什么呢?
谢谢了
请问哪位同行兄弟用LR做测试,数据库服务器用的是Oracle阿
请问哪位同行兄弟用LR做测试,数据库服务器用的是Oracle阿,偶向你发出急救阿!!!!! 我在测的数据库是oracle的,可是我的c/s用vb.net开发的,结果生成的script返回是空的,求助啊!!! 我也有类似问题啊???哪位知道的麻烦解答一下,谢谢了 请高手下天山吧! 我也遇到了:"第二个端口是变化的,是真正的进行数据交互的端口.",对于这个动态端口怎么解决?B/S结构的系统录制的脚本好像可以用函数进行动态关联,但是这个不会弄?
用关联应该可以解决
用关联首先需要确定那些是动态值。既然确定第二个端口是动态的,就可以运用函数int web_reg_save_param (const char *ParamName, <List of Attributes>, LAST);来解决。两种方式:自动 关联和手工关联
自动关联:vuser-->scan script for correlations ,系统会自动对比脚本录制时的端口值与运行时的端口值,如果不一致就会让进行关联。
如果自动关联不成功就需要手工进行关联。网上好多介绍关于int web_reg_save_param (const char *ParamName, <List of Attributes>, LAST);使用的帖子,学习一下。 楼上说的是针对web,B/S结构的关联.
这里是针对C/S结构 那C/S结构怎么做? 我也遇到楼上的问题了,不知道怎么解决,急!!! 木有做过C/S的 没做过,关注
页:
[1]