Jmeter获取登录的token_u014516643的博客-CSDN博客_jmeter提取token
<form action="" id="login-form" method="POST">
<input type="hidden" name="url" value="">
<input type="hidden" name="__token__" value="c3538902ea0f2c43f749f5fa9b0fc519" /> <!-- 账号 -->
<div class="group item">
<i class="fa fa-user" aria-hidden="true"></i>
<input class="form-itme" type="text" name="account" value="" placeholder="请输入账号">
</div>
<!-- 密码 -->
<div class="group item">
<i class="fa fa-lock" aria-hidden="true"></i>
<input class="form-itme" type="password" type="password" name="password" placeholder="请输入密码"
autocomplete="new-password" value="">
<!-- <a href="/index/user/resetpwd.html" class="group-link">忘记密码</a>-->
</div>
<!-- 登录按钮 -->
<div class="group submit">
<input type="submit" value="登录" class="btn-submit">
</div>
<span style="font-size: 12px;color: red; display: block; padding-top: 30px;">* 请使用谷歌浏览器登入</span>
</form>
正则表达式中的空格可以用空格,也可以用/s,我用了空格;
java正则表达式中出现空格_gohodo的博客-CSDN博客_正则表达式空格
正则表达式提取器中的“模板”和“匹配数字(0代表随机)” 不填不行
命令行执行压力测试脚本:
PS E:\Users\lxr\Downloads\software\压力测试工具\apache-jmeter-5.4.1\apache-jmeter-5.4.1\bin> .\jmeter.bat -n -t E:\Users\lxr\copy1website.jmx -l E:\Users\lxr\copy190-20-20.jtl
Creating summariser <summary>
Created the tree successfully using E:\Users\lxr\copy1website.jmx
Starting standalone test @ Sun Nov 14 19:09:48 CST 2021 (1636888188729)
Waiting for possible Shutdown/StopTestNow/HeapDump/ThreadDump message on port 4445
summary + 854 in 00:00:11 = 80.3/s Avg: 546 Min: 113 Max: 2261 Err: 0 (0.00%) Active: 99 Started: 99 Finished: 0
summary + 3104 in 00:00:30 = 103.3/s Avg: 1644 Min: 325 Max: 4911 Err: 0 (0.00%) Active: 190 Started: 190 Finished: 0
summary = 3958 in 00:00:41 = 97.3/s Avg: 1407 Min: 113 Max: 4911 Err: 0 (0.00%)
summary + 2769 in 00:00:30 = 92.0/s Avg: 2003 Min: 326 Max: 18781 Err: 0 (0.00%) Active: 189 Started: 190 Finished: 1
summary = 6727 in 00:01:11 = 95.1/s Avg: 1652 Min: 113 Max: 18781 Err: 0 (0.00%)
summary + 2286 in 00:00:30 = 76.1/s Avg: 2453 Min: 178 Max: 28184 Err: 0 (0.00%) Active: 170 Started: 190 Finished: 20
summary = 9013 in 00:01:41 = 89.4/s Avg: 1855 Min: 113 Max: 28184 Err: 0 (0.00%)
summary + 2387 in 00:00:26 = 90.2/s Avg: 1422 Min: 125 Max: 11934 Err: 0 (0.00%) Active: 0 Started: 190 Finished: 190
summary = 11400 in 00:02:07 = 89.6/s Avg: 1765 Min: 113 Max: 28184 Err: 0 (0.00%)
Tidying up ... @ Sun Nov 14 19:11:56 CST 2021 (1636888316638)
... end of run
Ramp-up Period 含义是爬坡时间,线程的循环是每个线程单独循环。