lr_abort函数
上一篇 /
下一篇 2012-08-13 09:54:46
/ 个人分类:LR
lr_abort函数用来终止脚本的运行。
在9.5的帮助文档中是这样描述的:
如果终止了action里脚本的运行,将会直接运行vuser_end中的脚本。
当你用这个函数结束脚本的运行,它的状态将会是stop,这里应该指的是在controller中运行后在analysis中的状态
我们使用该函数可以手动来终止脚本的运行,试了一下该函数得到以下结论:
如果在vuser_init中运行此函数,将会直接终止,不在运行之后的函数,包括aciton和vuser_end;
如果有新建的action,在action中或新建的action中使用该函数,都将直接终止运行,直接运行vuser_end里的脚本。
帮助中的示例:
int status; status = web_url("Login",
"URL=https://secure.computing.com//login.asp?user=(username)&session={ssid}",
"RecContentType=text/html", LAST);
if (status == LR_FAIL) {
lr_error_message("Error: %s", "Unable to login to secure computing");
收藏
举报
TAG: