如何基于场景使用jmeter创建脚本 [英] How to create a script using jmeter for scenario based

查看:214
本文介绍了如何基于场景使用jmeter创建脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用JMeter进行性能测试,我想记录并运行以下场景 5分钟300个用户(登录)-> 20分钟150个用户(评估保存)-> 5分钟40个用户(提交评估),当用户同时登录20分钟50个用户(浏览). 请参考屏幕截图以供参考. 我想根据场景创建脚本.

I want to perform performance testing using JMeter, I have the following scenario which i want to record and run 5 min 300 users(Login) -> 20 min 150 users(assessment save) -> 5 min 40 users (Submit assessment) when users login simultaneously 20 min 50 users (Browsing). Please refer screenshot for reference. I want to create a script on the basis of the scenario.

推荐答案

  1. 使用JMeter的 HTTP(S)测试分别记录所有用例脚本记录器.记录后,请确保关联任何动态参数,并通过1-2个用户/循环运行它并查看线程组.其他选项包括使用吞吐量控制器加权开关控制器,选择取决于您的要求和用户用例的实现.请参阅运行具有已定义百分比概率的JMeter采样器指南有关使用上述测试元素进行自定义工作负载分配的全面信息.
  1. Record all your use cases separately using JMeter's HTTP(S) Test Script Recorder. After recording make sure to correlate any dynamic parameters and validate your test by running it with 1-2 users/loops and looking into View Results Tree listener to inspect request and response details.
  2. When it comes to distributing virtual users to perform different workload tasks normally different real user groups should be represented by different Thread Groups. Other options are in using Throughput Controller, Switch Controller or Weighted Switch Controller, the choice depends on your requirements and user use cases implementation. See Running JMeter Samplers with Defined Percentage Probability guide for comprehensive information on using above test elements for custom workload distribution.

这篇关于如何基于场景使用jmeter创建脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆