可我不爱喝茶~~~
loadrunner学习笔记---与公司的技术论坛同步更新
上一篇 /
下一篇 2008-12-10 19:58:39
/ 个人分类:性能测试
之前,一直在做一些loaderrunner函数的
学习,主要是因为时间的缘故,没有好好的整理,现在将一部分整理好的贴上来和大家共同学习下!
为了练习En,所以偶尔有用E文做注解的习惯,希望大家能谅解,如果实在看不惯,就叫我假洋鬼子好了!
【080905】
1,lr_abort(); same function as the phrase "break" in C language;
2,lr_output_message(); same as 'printf' in C language; write the message on the log, the message is black;
3,lr_error_message(); same as "system.err.println" in
java languae.after run the scrīpt having this function , you will see red message on the log;
4,lr_save_string(); asign string to parameters
Remmeber:
TWO VAR IN LOADRUNNER scrīpt:
LR_PASS means 0;
LR_FAIL means 1;
【08-09-06 LR处理XML】
1、Lr_xml_extract();
char * xml_input = // defined a char pointor;
"<acme_org>"
" <accounts_dept>"
"<employee>"
" <name>John Smith</name>"
"<cubicle>227</cubicle>"
"<extension>2145</extension>"
"</employee>"
"</accounts_dept>"
"<engineering_dept>"
"<employee level=\"manager\">"
"<name>Sue Jones</name>"
"<extension>2375</extension>"
"</employee>"
"</engineering_dept>"
"</acme_org>";
lr_save_string (xml_input,"xmlput");
lr_xml_extract("XML={xmlput}",
"XMLFragmentParam=Result1",
"Query=/acme_org/accounts_dept/employee",LAST);
lr_output_message(lr_eval_string("Extracted:{Result1}"));
note: To store the value of XML String to parameter Result1;
相关阅读:
- 网站性能测试指标二 (fishy, 2008-12-02)
- Web性能测试种类与全面测试模型 (caption, 2008-12-02)
- 性能测试的问题分析和总结 (fishy, 2008-12-03)
- LoadRunner性能测试应用(连载五) (fishy, 2008-12-03)
- LoadRunner性能测试应用(连载六) (caption, 2008-12-04)
- 性能测试调优过程 (fishy, 2008-12-05)
- 谈谈常用的性能测试方法(策略)和测试要点 (fishy, 2008-12-05)
- LoadRunner性能测试应用(连载七) (fishy, 2008-12-05)
- 一个性能测试的案例(转自51) (静澜, 2008-12-08)
- LoadRunner性能测试应用(连载八) (fishy, 2008-12-09)
收藏
举报
TAG:
性能测试