Home > Software engineering >  JMeter achieving constant through per user journey
JMeter achieving constant through per user journey

Time:09-23

I'm a novice trying to learn how to implement end-to-end JMeter performance tests with production scenarios. 

[Scenario and Load patterns below are, for example, not real; please ignore if there are obvious mistakes in the models selected.]

Below are the two scenarios which need to be concurrently executed to achieve the production load pattern. 

  1. Online Payment:- Purchase product by online payment
  2. Cash On Delivery:- Purchase product by marking Cash On Delivery

Each scenario has multiple API calls. 

  1. Online Payment: Login -> search product -> add to card -> view cart -> checkout -> select online payment -> payment gateway selection -> payment -> logout
  2. Cash On Delivery: Login -> search product -> add to card -> view cart -> checkout -> select online payment (as cash on delivery) -> logout

Below is the expected load pattern.

| Scenario               | users          | Transactions per Hour |
| --------               | -------------- | --------------        |
| Online Payment         | 30             |   100                 |
| Cash On Delivery       | 10             |   50                  |
| Total concurrent users | 40             |                       | 

One Transaction indicates simulation of all API calls sequentially (with think times).

I implemented scenarios in different Thread groups as below

Test Plan 
    -> Online Payment Thread Group
             -> Login Http Sampler 
             -> Think time
             -> search product Http Sampler 
             -> Think time
             -> ...... 
             -> logout product Http Sampler 
    -> Cash On Delivery  Thread Group
             -> Login Http Sampler 
             -> Think time
             -> search product Http Sampler 
             -> Think time
             -> ...... 
             -> cash on delivery Http Sampler
             -> Think time
             -> logout product Http Sampler   

I can set Threads/Users at thread group to achieve expected user concurrency. Given scenarios in different thread groups, they run parallel.

I'm not able to achieve Transactions per Hour. With Constant timer / throughput controller, I'm not able to control throughput at the scenario level.

Guidance on below would be of great help

  1. How to achieve Transactions per hour in the above scenario.
  2. Any Best practices to be followed.

Thank you in advance.

CodePudding user response:

Are you sure your numbers are correct? Because 100 transactions per hour means one transaction each 36 seconds for 1 user and if you have 30 users the number will be proportionally less.

I think you need to consider switching to Constant Throughput Timer, 100 transactions per hour == 1.6 transactions per minute

Another option is implementing pacing

  • Related