修改外部JMeter测试计划的线程组(JMX文件) [英] Modify Thread Group of an external JMeter Test Plan (JMX File)

查看:144
本文介绍了修改外部JMeter测试计划的线程组(JMX文件)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序将从用户那里获取jmx文件作为测试计划并执行它.我已经在应用程序的后端(1个JMeter客户端和多个JMeter服务器)进行了JMeter分布式设置.

My application will take jmx file as test plan from user and execute it. I've JMeter distributed setup at the backend of my application (1 JMeter client and multiple JMeter servers).

我面临的挑战是执行测试计划所需的#threads.

The challenge I'm facing is with the #threads required to execute the test plan.

  1. 如果我从用户那里显式获取#instances(执行测试的JMeter服务器)和#threads,如何在执行之前使用此线程组配置用户提供的测试计划?这将使我能够预先通过群集和计算机容量来验证这些值.

我已经阅读了有关包含控制器"的信息,但这必然要求用户测试计划具有测试片段".

I had read about Include Controller, but that necessarily requires user test plan to have Test Fragment.

  1. 如果没有明确说明,如何验证用户测试计划中的线程组配置?假设用户在测试计划中放置了较大的#thread,这可能会使我的JMeter服务器计算机过载,那么如何验证该值并可能警告用户限制#threads?

推荐答案

  1. 没有"#threads_per_instance"这样的东西.在JMeter世界中,如果您以分布式模式运行JMeter 每个服务器(或从服务器或负载生成器)执行客户端提供的.jmx测试计划 ,因此,如果用户上载线程组中具有100个线程的文件,而您有1个从服务器-您将有100个用户.如果您有2个奴隶-您将有200个用户,等等.

  1. There is no such a thing as "#threads_per_instance" in JMeter world, if you run JMeter in distributed mode each server (or slave or load generator) executes .jmx test plan provided by the client as it is so if user uploads file with 100 threads in a Thread Group and you have 1 slave - you will have 100 users. If you have 2 slaves - you will have 200 users, etc.

另一件事是,您无法预先确定一个JMeter从站可以模拟多少个线程,因为它主要取决于测试的性质:请求/响应大小,前置/后置处理器的数量,断言,侦听器等.我建议实现某种形式的JMeter从属运行状况监视,并在CPU或RAM或网络使用率开始超过80%时警告用户.使用 JMeter PerfMon插件

Another thing is that you cannot tell how many threads you will be able to simulate from a single JMeter slave beforehand as it mainly depends on the nature of the test: request/response size, number of pre/post processors, assertions, listeners, etc. I would recommend implementing some form of JMeter slaves health monitoring and warn the user if CPU or RAM or Network usage starts exceeding 80%. It can be easily achieved using JMeter PerfMon Plugin

我们不知道在您的应用程序"中使用了哪些技术.所以这个问题太广泛了. JMeter .jmx脚本只是XML文件,因此您应该可以使用 XML解析器以提取所有线程组中的线程数并验证".它以某种方式.

We don't know what technologies are being used in "your application" so this question is too broad. JMeter .jmx scripts are just XML files so you should be able to use XML parser to extract the number of threads in all Thread Groups and "validate" it somehow.

这篇关于修改外部JMeter测试计划的线程组(JMX文件)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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