0

I'm new to JMeter and I'm having some trouble with it.

I want to control my throughput per minute via the "Constant Throughput Timer" timer, however, it only applies to the HTTP requests, and not the transactions controllers.

Let me explain a bit further, I want to simulate an user experience where the user performs X clicks every minute. However, each "click" can gather different "resources". for instance, sometimes it will get him a jps, some js, a png and a css, some other times, it'll only get him a jsp. I want to manage throughput per minute for each transaction controller, but I can't manage to do it.

Can it be done? If yes can someone help me with it? I also tried using jp@gc Throughput Shaping Timer without success.

My test plan looks like this:

Test Plan
    -Thread group 1
        -Transaction Controller A
            -Transaction Controller Page X (first clic)
                -Http request 1 (.jps)
                -Http request 2 (.js)
                -Http request 3 (.png)
                -Http request 4 (.css)
            -Transaction Controller Page Y (seconde clic)
                -Http request 5 (.jps)
                -Http request 6 (.js)
                -Http request 8 (.css)
            -Transaction Controller Page Z (third clic)
                -Http request 9 (.jps)
                -Http request 11 (.png)
                -Http request 12 (.css)
            ...
            -Transaction Controller Page ZZZ (twelveth clic)
                -Http request 111 (.jps)
                -Http request 112 (.js)
                -Http request 113 (.png)
                -Http request 114 (.css)
    -Thread group 2
        -Transaction Controller B
            -Transaction Controller Page X² (first clic)

...
...

Thanks, and sorry for my bad English

  • Do you really need to measure downloading the JS, PNG, CSS, and JPS resources? Browsers typically cache those kinds of things, so even if your web page uses other resources, the browser does not necessary need to re-download them every time. – user246 Apr 8 '16 at 0:18
  • Yes, if i'm not mistaken, you need to explicitely specify if the resources are cachable or not, and i'm using some(shitty) product that doesn't allow me to do that. my browser always download them over and over again. – rhamdi Apr 8 '16 at 8:58
  • actually, i don't really have problems with js, png etc, i only used them for a clearer explanation. i have many iframes in my pages due to the product i'm using, so i have multiple "get" for a single page. – rhamdi Apr 8 '16 at 9:13
1

To control your throughput per minute you have to use either Constant Throughput Timer or Throughput Shaping Timer. But I would recommend you to use Constant Throughput Timer (Since I haven't use Throughput Shaping Timer).

Actually, Constant Throughput Timer can only pause the threads to reach specified "Target Throughput" value so make sure you provide enough virtual users (threads) to generate desired "requests per minute" value.

You can try with these:

  1. Give enough number of threads to achieve this.
  2. Constant Throughput timer doesn't work with the duration which lasts less than a minute. So make your test run for few minutes!!!
  3. You have to use Constant Throughput Timer at the root level of your test scripts like "Test Plan" level.

To see your desired throughput, you can use Transactions per Second Listener.

Hope, this will satisfy your query!! Thanks.

0

You could design this scenario using a "Recorder". First, you need to record your script and you have to add "HTTP Cookie Manager" in your script manually after recording is done.Enable "Clear Cache Each Iteration". This will render your page resource every time it sends a request and clear the cache before a new incoming request. And to manage throughput per minute you could use "Constant Throughput Timer". Do not include multiple CTT in your test script as it will lead to a hoax. Use CTT in Test Plan level,not in thread group level.For further detail check JMeter blog about Constant Throughput Timer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.