Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

load testing - missing items in jmeter result tree

here is structure of my test.

recording controller
    transaction controller
        homepage (transaction controller)
            HTTP Request 1
                Response Assertion (response code = 200)
            HTTP Request 2
                Response Assertion (response code = 200)
            HTTP Request 3
                Response Assertion (response code = 200)
            ....
        login (transaction controller)
            HTTP Request 1
                Response Assertion (response code = 200)
            ....
        logout (transaction controller)
            HTTP Request 1
                Response Assertion (response code = 200)
            ....
    View Results Tree

Test is placed inside Ultimate Thread Group (up to 20 threads at once). I placed into each HTTP Request Response Assertion.

When run the the test and after that look in the result tree everything is green, so OK. But when I clicked through result tree I recognised, that sometimes some items are missing, but not every time. see: for example:

transaction controller
    homepage
    login
    (logout is missing !!!)

Question is why?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

With Ultimate Thread Group you don't have fixed number of loops/iterations, so if you specify some "Hold load for" time span and a thread (virtual user) will be shut down "in the middle" of test execution, i.e. somewhere at homepage transaction - it will simply not be able to finish all the remaining requests.

Like

  • if you set Hold Load For to 1 second - only 1 request will be executed
  • if you set Hold Load For to 5 seconds - a couple of requests will be executed
  • if you set it to 5 minutes - most probably all the requests will be executed at least once, but the number of the requests will mostly depend on your application response time

So if you want the whole sequence to be executed - switch to "normal" Thread Group and specify the desired number of iterations

Also using JMeter GUI mode and View Results Tree listener for executing load tests is not the best idea, you should be running your JMeter tests in command-line non-GUI mode and use HTML Reporting Dashboard for results analysis.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...