当前位置: 首页 > 知识库问答 >
问题:

jmeter线程组未运行所有用户

哈涵容
2023-03-14

我正在运行一个记录的测试计划。我在线程组中分配了5个不同的用户,上升周期为5,循环计数为1。

这就是发生的情况:

开始测试。

测试运行没有错误,并且当我在视图结果树中检查时,似乎5个用户正确执行,但当我在系统中检查时,只有2或3个用户注册。我删除注册的用户,并运行脚本一次又一次的2或3个用户注册(有些时间不一样)的5个用户。

我不明白怎么会让我的测试表现得那样...为什么我的测试计划没有为5个用户运行?

我已经检查了我的机器上正在使用的资源,但它们都很好,没有问题。

Jmeter的日志如下:

2015/01/23 12:54:11 INFO  - jmeter.util.BSFTestElement: Registering JMeter version of JavaScript engine as work-round for BSF-22 
2015/01/23 12:54:12 INFO  - jmeter.protocol.http.sampler.HTTPSamplerBase: Cannot find .className property for htmlParser, using default 
2015/01/23 12:54:12 INFO  - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for text/html is  
2015/01/23 12:54:12 INFO  - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for application/xhtml+xml is  
2015/01/23 12:54:12 INFO  - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for application/xml is  
2015/01/23 12:54:12 INFO  - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for text/xml is  
2015/01/23 12:54:12 INFO  - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for text/vnd.wap.wml is org.apache.jmeter.protocol.http.parser.RegexpHTMLParser 
2015/01/23 12:54:12 INFO  - jmeter.gui.util.MenuFactory: Skipping org.apache.jmeter.protocol.http.control.gui.WebServiceSamplerGui 
2015/01/23 12:54:12 INFO  - jmeter.gui.util.MenuFactory: Skipping org.apache.jmeter.protocol.http.modifier.gui.ParamModifierGui 
2015/01/23 12:54:12 INFO  - jorphan.exec.KeyToolUtils: keytool found at 'C:\Program Files (x86)\Java\jre1.8.0_25\bin\keytool' 
2015/01/23 12:54:12 INFO  - jmeter.protocol.http.proxy.ProxyControl: HTTP(S) Test Script Recorder SSL Proxy will use keys that support embedded 3rd party resources in file E:\Pruebas no Funcionales\JMeter\apache-jmeter-2.12\apache-jmeter-2.12\bin\proxyserver.jks 
2015/01/23 12:54:12 INFO  - jmeter.samplers.SampleResult: Note: Sample TimeStamps are START times 
2015/01/23 12:54:12 INFO  - jmeter.samplers.SampleResult: sampleresult.default.encoding is set to ISO-8859-1 
2015/01/23 12:54:12 INFO  - jmeter.samplers.SampleResult: sampleresult.useNanoTime=true 
2015/01/23 12:54:12 INFO  - jmeter.samplers.SampleResult: sampleresult.nanoThreadSleep=5000 
2015/01/23 12:54:54 INFO  - jmeter.services.FileServer: Default base='E:\Pruebas no Funcionales\JMeter\apache-jmeter-2.12\apache-jmeter-2.12\bin' 
2015/01/23 12:54:54 INFO  - jmeter.gui.action.Load: Loading file: E:\Pruebas no Funcionales\JMeter\JMScripts\Solicitud_Credito.jmx 
2015/01/23 12:54:54 INFO  - jmeter.services.FileServer: Set new base='E:\Pruebas no Funcionales\JMeter\JMScripts' 
2015/01/23 12:54:54 INFO  - jmeter.save.SaveService: Testplan (JMX) version: 2.2. Testlog (JTL) version: 2.2 
2015/01/23 12:54:54 INFO  - jmeter.save.SaveService: Using SaveService properties file encoding UTF-8 
2015/01/23 12:54:54 INFO  - jmeter.save.SaveService: Using SaveService properties version 2.7 
2015/01/23 12:54:54 INFO  - jmeter.save.SaveService: Using SaveService properties file version 1618048 
2015/01/23 12:54:54 INFO  - jmeter.save.SaveService: All converter versions present and correct 
2015/01/23 12:54:54 INFO  - jmeter.protocol.http.control.CookieManager: Settings: Delete null: true Check: false Allow variable: true Save: true Prefix:  
2015/01/23 12:54:55 INFO  - jmeter.services.FileServer: Set new base='E:\Pruebas no Funcionales\JMeter\JMScripts' 
2015/01/23 12:55:06 INFO  - jmeter.engine.StandardJMeterEngine: Listeners will be started after enabling running version 
2015/01/23 12:55:06 INFO  - jmeter.engine.StandardJMeterEngine: To revert to the earlier behaviour, define jmeterengine.startlistenerslater=false 
2015/01/23 12:55:06 INFO  - jmeter.engine.StandardJMeterEngine: Running the test! 
2015/01/23 12:55:06 INFO  - jmeter.samplers.SampleEvent: List of sample_variables: [] 
2015/01/23 12:55:06 INFO  - jmeter.samplers.SampleEvent: List of sample_variables: [] 
2015/01/23 12:55:06 INFO  - jmeter.gui.util.JMeterMenuBar: setRunning(true,*local*) 
2015/01/23 12:55:06 INFO  - jmeter.engine.StandardJMeterEngine: Starting ThreadGroup: 1 : Carga_Usuarios 
2015/01/23 12:55:06 INFO  - jmeter.engine.StandardJMeterEngine: Starting 1 threads for group Carga_Usuarios. 
2015/01/23 12:55:06 INFO  - jmeter.engine.StandardJMeterEngine: Thread will continue on error 
2015/01/23 12:55:06 INFO  - jmeter.threads.ThreadGroup: Starting thread group number 1 threads 1 ramp-up 1 perThread 1000.0 delayedStart=true 
2015/01/23 12:55:06 INFO  - jmeter.threads.ThreadGroup: Started thread group number 1 
2015/01/23 12:55:06 INFO  - jmeter.engine.StandardJMeterEngine: All thread groups have been started 
2015/01/23 12:55:06 INFO  - jmeter.threads.JMeterThread: jmeterthread.startearlier=true (see jmeter.properties) 
2015/01/23 12:55:06 INFO  - jmeter.threads.JMeterThread: Running PostProcessors in forward order 
2015/01/23 12:55:06 INFO  - jmeter.threads.JMeterThread: Thread started: Carga_Usuarios 1-1 
2015/01/23 12:55:06 INFO  - jmeter.services.FileServer: Stored: Filecnx.csv 
2015/01/23 12:55:06 INFO  - jmeter.protocol.http.sampler.HTTPHCAbstractImpl: Local host = CONSULT0002 
2015/01/23 12:55:06 INFO  - jmeter.protocol.http.sampler.HTTPHC4Impl: HTTP request retry count = 0 
2015/01/23 12:55:06 INFO  - jmeter.protocol.http.sampler.HTTPHC4Impl: Setting up HTTPS TrustAll scheme 
2015/01/23 12:55:06 INFO  - jmeter.util.JsseSSLManager: Using default SSL protocol: TLS 
2015/01/23 12:55:06 INFO  - jmeter.util.JsseSSLManager: SSL session context: per-thread 
2015/01/23 12:55:56 INFO  - jmeter.threads.JMeterThread: Thread is done: Carga_Usuarios 1-1 
2015/01/23 12:55:56 INFO  - jmeter.threads.JMeterThread: Thread finished: Carga_Usuarios 1-1 
2015/01/23 12:55:56 INFO  - jmeter.engine.StandardJMeterEngine: Notifying test listeners of end of test 
2015/01/23 12:55:56 INFO  - jmeter.services.FileServer: Close: Filecnx.csv
2015/01/23 12:55:56 INFO  - jmeter.gui.util.JMeterMenuBar: setRunning(false,*local*) 

如果你需要其他信息,请告诉我...谢谢!

共有1个答案

戚兴思
2023-03-14

我已经找到了这个问题的答案。脚本没有任何问题,只是发送的与城市和城镇相关的数据之间存在冲突。脚本发送了一个固定值的城市和城镇属于该城市。

当城市不同时,这不是问题,因为组合框包含了所有的城市,但是当城镇不同时,脚本会插入一个在城镇组合框中不存在的值,因此它会显示一个错误验证,从而停止该用户的流量,但是在JMeter中没有显示任何错误。因此,当用户具有相同的城市和城镇时,他们被插入,但如果他们没有,它显示没有错误,但没有插入到DB中。

 类似资料:
  • 线程组顾名思义,线程组表示JMeter在测试期间将使用的线程组。 线程组元素是任何测试计划的起点。 线程组提供的控件允许: 设置线程数。 设置加速期。 设置执行测试的次数。 前面已在“添加/删除测试元素”部分中说明了在测试计划中添加线程组的步骤。 下图显示了线程组的控制面板部分。 线程组控制面板包括: 线程组名称。 线程数(您正在测试的用户数)。 加速时间(您希望允许线程组从0到3个用户的时间)。

  • 我是jmeter的新手,尝试对我的应用程序进行性能测试。我想每秒生成100个请求,但是我的服务器需要3-4秒来响应每个请求。我正在运行1分钟的测试,这意味着在时间跨度内激发的请求数应该是60k。然而,jmeter实际上在发送下一个请求之前等待响应。这不是我要找的。 我如何确保jmeter每秒发送一个新的请求(100 req/sec),而不等待响应,这样每分钟触发的请求数就是60k。 我尝试使用恒定

  • 更新了问题和图像。 是否有任何方法可以暂停所有线程,直到任何线程执行samplerA为止(不管线程数是多少,这只需要执行一次),在执行这个sampler之后,所有线程都可以继续执行。单击以获取图像

  • 我有一个Spring批处理应用程序,它从DB表中读取记录并在Writer类中调用REST API以获取要缓存的数据。然而,我观察到并非线程池中的所有线程都在运行。它们只是以4-5的批处理运行,因为应用程序需要5小时才能进行120K调用。以下是Spring批处理上下文 任务执行者: 批量作业: 读卡器配置:请注意,数据源的连接数为20 min/max

  • 当我编译并运行StartThreads类时,我会得到一个包含1到1000000的整数列表,其中包含false,最后显示true;现在我想弄清楚的是,为什么threadone类应该打印一次MyVariables类中的实例变量时却什么也不打印?公共类MyVariables{public boolean startApp=false;}

  • 我在努力理解这个问题,但无法解决。这是我的问题。 我有、