|
使用LoadRunner对Tuxedo压力测试simpapp的可运行脚本
我网上找了个脚本,自己对相关连接信息稍作修改,脚本如下:
#include "lrt.h"
Action()
{
char* data_input;
char* data_output;
long buflen_input;
long buflen_output;
char string[] = "<?xml version='1.0' encoding='GB2312'?><root><jydm>trans_bdyw_8712_main</jydm><jrqd></jrqd><jdbh></jdbh><jydlx></jydlx><zdbs>ttyp12</zdbs><zfbz>A</zfbz><zfxt>009</zfxt><zfjd></zfjd><gyh>351980301001</gyh><gzh>351980301</gzh><jyrq>20090331</jyrq><jysj>161504</jysj><jsrq>20090331</jsrq><wdip></wdip><xtgzh>99999</xtgzh><ptyybs>TS_CX</ptyybs><khmc></khmc><zh>4367421930033675263</zh><khdh></khdh></root>";
lrt_tuxputenv("WSNADDR=//42.1.96.16:9001");//对应WSL的端口
data_input = lrt_tpalloc("STRING", "", sizeof(string));
lrt_strcpy(data_input, string);
data_output = lrt_tpalloc("STRING", "", 1024);
buflen_input = lrt_tptypes(data_output, type, NULL);
tpresult_int = lrt_tpcall("TOUPPER", data_input, sizeof(string), &data_output, &buflen_output, 0);
lr_output_message("Call:%d", tpresult_int);
lr_output_message("Result:%d\t%s", buflen_output,data_output);
return 0;
}
编译报错:
Action.c(11): Error: C interpreter run time error: Action.c (11): Error -- Unresolved symbol : lrt_register_file_line.
Action.c(11): Notify: CCI trace: Compiled_code(0): Action().
报错信息中的函数lrt_register_file_line我在loadrunner帮助文档中找不到,是什么函数,为什么会报错,请大家帮忙,谢谢了! |
|