1.下载
官网或者破解版,目前主要版本是11、12
2.破解(此部分为转载)
1. 下载破解文件lm70.dll和mlr5lprg.dll两个文件
lm70.dll替换到x:\Program Files\Mercury\LoadRunner\bin
mlr5lprg.dll文件,分别要覆盖以下两个文件夹: x:\Program Files\Mercury\LoadRunner\bin
x:\Program Files\Mercury\LoadRunner\bin\tulip\bin
2. 运行清除注册表工具见附件
3. 打开license管理器,点击添加new license,将老license复制进去
golba-100: AEAMAUIK-YAFEKEKJJKEEA-BCJGI
web-10000: AEABEXFR-YTIEKEKJJMFKEKEKWBRAUNQJU-KBYGB
golba是全局协议license,上限100个并发
web是http协议license,上限10000个并发
提供一个超级license 最高支持6.5w个并发:AEACFSJI-YJKJKJJKEJIJD-BCLBR
———————————————— 版权声明:本文为CSDN博主「码上笔记」的原创文章,遵循CC 4.0 by-sa版权协议,转载请附上原文出处链接及本声明。 原文链接:https://blog.csdn.net/ak57193856/article/details/79066222
3.新增测试脚本
File->new->WEB(HTTP/HTML)或webservice->先保存,新建文件夹存放所有的脚本,命名要规范
4.WEB(HTTP/HTML)测试:
1.脚本默认是C语言,且无法更改
2.由4个部分组成:
1.vuser_init method: a virtual user initialization method
2.Action Methods: The main test method, http requests, assertions are here to achieve, equivalent to testcase, meaningful name changed to best
3.vuser_end method: Similar to tear down
4.globals.h file: Here you can import the class library, define global variables
3. commonly used functions:
Looking function: help-> Function Reference
get function: web_url ()
Lane 1. Copy Reference Sample, and substitute the correct url parameters, remove unwanted parameters
post function: web_submit_data ()
1. Copy Reference in the sample, the correct replacement url, removing unnecessary parameters
2. POST data manually entered, the default is ItemData, in the form of key-value pairs
4. Add the assertion
1. Automatically generated assertion by search function function name:
insert -> new step -> search function name -> fill in the parameters -> the generating function -> copy and paste function is a function of the above request to the web (next)
Write function (string asserted) 2. Manual:
web_reg_find("Fail=NotFound",
"Search=Body",
"Text=200",
LAST);
web_get_int_property(HTTP_INFO_RETURN_CODE);
3. The two predicate function: web_reg_find (); web_get_int_property ()
5.web services testing
1. generation request function
add service call -> Servies: import services(导入server的WSDL文件);选择 -> 选择Operation -> 选择PortName ->(如需则)输入input arguments -> ok ->生成web_service_call()函数
2.添加断言
与WEB/HTTP断言一样
6.执行测试:
准备:
1.vuser -> runtimeSettings:
2.run logic: iteration count(迭代/循环次数)
3.general - > miscellaneous: continue on error, define each action as a transaction;
4.log -> enable log,选择log级别
执行:点三角或F5
7.查看结果
tree -> snat shot : 实时的数据
view -> test results: 图标形式的,可以导出为html文档
查看log
8.性能测试(scenario):
1.tools -> create scenario: manual scenario,group name,保存结果路径,add script
2.开始:start scenario
3.结果:Results -> Analyze Results
4.导出报告:Reports - > new Report -> 选择模板、通用设置、内容、另存为想要的格式
9.其他
1.配置参数
1.点击右上角parameter list
2.新增parameter
3.选择保存参数值的外部文件
4.输入值
5.设置读取机制和格式等
6.脚本里调用形式为{para}