|
本帖最后由 zjjak47 于 2012-3-5 18:15 编辑
大家帮我看看,搞不懂啊~
#include "lrs.h"
Action()
{
lr_start_transaction("winsocket");
lrs_create_socket("socket1", "TCP", "RemoteHost=172.16.10.11:9088", LrsLastArg);
lrs_send("socket0", "buf0", , LrsLastArg);
lrs_receive("socket0", "buf1", LrsLastArg);
lrs_close_socket("socket0");
lrs_save_param (“socket0”, "buf1", "testsocket", 302, 3);
lr_output_message("The buffer's size is: %s",lr_eval_string("<testsocket>"));
if(strcmp(lr_eval_string("<testsocket>"),"shi")==0)
lr_output_message("winsocket",LR_PASS);
else
lr_output_message("winsocket",LR_FAIL);
return 0;
}
给位老师给看看,为什么返回结果明明不正确,但是显示pass呢,Virtual User Generator单独试运行脚本的时候也会返回pass,但是会有字符串长度不一样的提示~~本人刚接触,不是很理解,请各位指教~ |
|