2016年7月7日

摘要: 环境:Loadrunner版本:8.0自建一个test.html文件:<html><head><meta name="google1" content="google2"/><title>google3</title></head><body>google4:<input type="text" n 阅读全文
posted @ 2016-07-07 22:12 帅胡 阅读(2870) 评论(0) 推荐(0)
摘要: 最近使用loadrunner中需要录制文件的上传和下载,上传功能模块利用录制可以直接实现,下载无法实现,在网上找到了一段代码,自己动手试验了下,发现没有用 辛苦找到的,还是记录下吧 (1)LoadRunner上传文件 web_submit_data("importStudent.do", "Acti 阅读全文
posted @ 2016-07-07 22:06 帅胡 阅读(4312) 评论(0) 推荐(0)
摘要: 一、LR中参数的使用 LR中参数默认使用“{}”来表示,如果想要修改,可以再General Options/Parameterization设置参数的边界字符 经常用到的函数: lr_save_string("字符串",参数名),把字符串保存为参数 void lr_save_datetime(con 阅读全文
posted @ 2016-07-07 22:04 帅胡 阅读(3819) 评论(0) 推荐(0)
摘要: 有些时候需要在某个字符串的前面用0补齐,以便满足长度的格式要求。 在LoadRunner中可以封装出一个函数来处理这种问题: /* Function to pad a string to x characters adding the required character at the start 阅读全文
posted @ 2016-07-07 21:53 帅胡 阅读(422) 评论(0) 推荐(0)
摘要: 参考《Search & Replace function for LoadRunner》: http://ptfrontline.wordpress.com/2009/03/13/search-replace-function-for-lr/ LoadRunner中没有直接的函数支持查找并替换字符串 阅读全文
posted @ 2016-07-07 21:47 帅胡 阅读(548) 评论(0) 推荐(0)
摘要: LoadRunner中有lr_save_int() 和lr_save_string() 函数,但是没有保存浮点数到变量的lr_save_float函数。《lr_save_float() function for LoadRunner》这篇文章介绍了如何写一个这样的函数: http://ptfront 阅读全文
posted @ 2016-07-07 21:44 帅胡 阅读(550) 评论(0) 推荐(0)
摘要: 参考《SHA-1 hash for LoadRunner》: http://ptfrontline.wordpress.com/2010/03/02/sha-1-hash-for-loadrunner/ 包含SHA1算法的头文件sha1.h: /* ************************* 阅读全文
posted @ 2016-07-07 21:42 帅胡 阅读(987) 评论(0) 推荐(0)
摘要: 《Base64 Encode/Decode for LoadRunner》这篇文章介绍了如何在LoadRunner中对字符串进行Base64的编码和解码: http://ptfrontline.wordpress.com/2009/09/30/base64-encodedecode-for-load 阅读全文
posted @ 2016-07-07 21:40 帅胡 阅读(590) 评论(0) 推荐(0)
摘要: 通过JConsole监控Tomcat 1、打开tomcat5的bin目录中的catalina.bat文件,在头部注释部分的后面加上: set JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote.port=8999 -Dcom.sun.manage 阅读全文
posted @ 2016-07-07 21:35 帅胡 阅读(366) 评论(0) 推荐(0)
摘要: Google的搜索框是典型的AJAX应用,用户在输入关键字的同时,前端页面通过xmlhttp与后台服务器动态交互,根据用户输入的关键字查找匹配的内容,向用户提示建议的搜索项,也就是所谓的“google suggest”。 如果使用LoadRunner进行测试,采用AJAX(Click and Scr 阅读全文
posted @ 2016-07-07 21:31 帅胡 阅读(403) 评论(0) 推荐(0)
摘要: 什么是AJAX? Ajax, shorthand for Asynchronous JavaScript and XML, is a web development technique for creating interactive web applications. The intent is 阅读全文
posted @ 2016-07-07 21:27 帅胡 阅读(410) 评论(0) 推荐(0)
摘要: 一般情况下,我们都是通过Run-Time Settings来设置Think Time(思考时间),可以设置回放脚本时忽略思考时间,或者是设置回放随机的一段思考时间。 By default, when you run a Vuser script, the Vuser uses the think t 阅读全文
posted @ 2016-07-07 21:24 帅胡 阅读(529) 评论(0) 推荐(0)
摘要: Error -27728: Step download timeout (120 seconds) has expired when downloading non-resource(s) [MsgId: MERR-27728] LR默认使用120秒作为每一个HTTP请求连接和接收和timeout时 阅读全文
posted @ 2016-07-07 21:21 帅胡 阅读(750) 评论(0) 推荐(0)
摘要: LR在WebService虚拟用户协议中支持两种方式测试WebService,一种是通过“Add Service Call”的方式,一种是Import SOAP的方式。 Import SOAP的方式需要导入定义好的XML请求文件。 取到WebService返回的XML数据后,可以使用XPath的方式 阅读全文
posted @ 2016-07-07 21:14 帅胡 阅读(698) 评论(0) 推荐(0)
摘要: LoadRunner如何在脚本运行时修改log设置选项?答案是使用lr_set_debug_message函数: lr_set_debug_message Sets the message level for the script execution. int lr_set_debug_messag 阅读全文
posted @ 2016-07-07 21:11 帅胡 阅读(931) 评论(0) 推荐(0)
摘要: 方法一、LR + SiteScope 方法二、使用rstatd包 1、下载rpc.rstatd-4.0.1.tar.gz 2、解压缩 tar -zxvf rpc.rstatd-4.0.1.tar.gz 3、配置 ./configure 4、编译 make 5、安装 make install 6、启动 阅读全文
posted @ 2016-07-07 21:03 帅胡 阅读(1444) 评论(0) 推荐(0)
摘要: LoadRunner中的web_get_in_property函数可用于返回上一个HTTP请求的相关信息,包括HTTP请求返回码、下载大小、下载时间等: The web_get_int_property function returns specific information about the 阅读全文
posted @ 2016-07-07 20:51 帅胡 阅读(921) 评论(0) 推荐(0)

导航