可我不爱喝茶~~~

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;

TAG: 性能测试

 

评分:0

我来说两句

日历

« 2022-01-16  
      1
2345678
9101112131415
16171819202122
23242526272829
3031     

数据统计

  • 访问量: 3073
  • 日志数: 6
  • 书签数: 1
  • 建立时间: 2006-12-29
  • 更新时间: 2009-04-03

RSS订阅

Open Toolbar