gpt4 book ai didi

JMeter test setup(JMeter测试设置)

转载 作者:bug小助手 更新时间:2023-10-25 22:29:01 28 4
gpt4 key购买 nike



I have a problem with setup my stress test.
I need auto increasing accesses on HTTP web page, stop test when load time of page will be more than 10 seconds and track number of accesses at this point.
Can someone help me, please?

我在设置压力测试时遇到了问题。我需要在HTTP网页上自动增加访问量,当页面加载时间将超过10秒时停止测试,并跟踪在这一点上的访问量。有没有人能帮帮我?


A tried it with Concurency Thread group

A尝试使用并发线程组


更多回答

Please provide enough code so others can better understand or reproduce the problem.

请提供足够的代码,以便其他人能够更好地理解或重现问题。

优秀答案推荐


  1. Gradually increasing load can be simulated using any Thread Group even the "normal" one via Ramp-up period input field


    enter image description here



  2. You can stop the test in 2 ways:



    • using Auto Stop Listener (however it will track the average response time)


      enter image description here



    • using JSR223 PostProcessor and the following Groovy code:


        if(prev.getTime() >= 10000) {
      prev.setStopTest(true)
      log.info('Number of threads when response time exceeded 10 seconds was: ' + ctx.getThreadGroup().getNumberOfThreads())
      }




  3. The number of active threads at any given moment of time using i.e. Active Threads Over Time listener or the equivalent chart from HTML Reporting Dashboard or last line of the above Groovy code




更多回答

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com