Loadrunner 8.1+中文包。
在Virus User Generator 中的设置如下:
一、录制选项:
1)脚本C语言,使用默认参数。
2)协议:Web (http/html)
3)录制:基于url的录制。
4)数据库:脚本选项生成脚本注释。
二、运行时设置:
默认值,没有做修改。
录制的脚本如下:
一、globals.h
#ifndef _GLOBALS_H
#define _GLOBALS_H
#include "lrun.h"
#include "web_api.h"
#include "lrw_custom_body.h"
#include "lrd.h"
static LRD_INIT_INFO InitInfo = {LRD_INIT_INFO_EYECAT};
static LRD_DEFAULT_DB_VERSION DBTypeVersion[] =
{
{LRD_DBTYPE_NONE, LRD_DBVERSION_NONE}
};
static LRD_CONNECTION * Con1;
static LRD_CURSOR * Csr1;
#endif // _GLOBALS_H
二、
vuser_init()
{
lrd_init(&InitInfo,DBTypeVersion);//程序在运行到这一步的时候就开始报错,百思不得其解。请高
手指点。
web_url("mcpback",
"URL=http://192.168.10.70:9090/mcpback/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTTP",
LAST);
web_concurrent_start(NULL);
web_url("prototype.js",
"URL=http://192.168.10.70:9090/mcpback/ui/js/
prototype.js",
"Resource=1",
"RecContentType=text/javascript",
"Referer=http://192.168.10.70:9090/mcpback/",
"Snapshot=t2.inf",
LAST);
web_url("cp.js",
"URL=http://192.168.10.70:9090/mcpback/ui/js/cp.js",
"Resource=1",
"RecContentType=text/javascript",
"Referer=http://192.168.10.70:9090/mcpback/",
"Snapshot=t3.inf",
LAST);
....
return 0
}