Highlighted
Absent Member.
Absent Member.
2113 views

How to setup this Load Test scenario

Hi,

 I would like to create below load test scenario.  Would appreciate if anyone could advise me.  Thanks in advance, Leanne.

 

Item 1) 100 users login, with 10 users login every 1min.

 

Item 2) After user login, the 100 users need to trigger below scenarios:
a) 20% of users need to trigger below business process 1 and 2 randomly and repeatedly for 1 hour:
- Business Process 1: Trigger Select_Product_A_action, then trigger Submit_Product_A_action (trigger these 2 continuous steps for 30% of time)
- Business Process 2: Trigger Select_Product_B_action, then trigger Submit_Product_B_action (trigger these 2 continuous steps for 70% of time)

 

b) 80% of users need to trigger below business process 3 and 4 randomly and repeatedly for 1 hour:
- Business Process 3: Trigger Select_Product_C_action, then trigger Submit_Product_C_action (trigger these 2 continuous steps for 40% of time)
- Business Process 4: Trigger Select_Product_D_action, then trigger Submit_Product_D_action (trigger these 2 continuous steps for 60% of time)

 

Understand that I need to create first user script with 20% user, second script with 80% user in Controller.  Each script setup with Init section that captures the Login action which executed only once, but how could I setup above item (2) ?  Thanks.

 

 

 

0 Likes
7 Replies
Highlighted
Honored Contributor.
Honored Contributor.

Re: How to setup this Load Test scenario

Hi @LeannAnn,

 

You need to create 1 script with 6 action blocks

action block 1: login
action block 2: Business process 1
action block 3: Business process 2
action block 4: Business process 3
action block 5: Business process 4
action block 6: logout

 

Take care in your script that you can login, perform businesses process 1 and logout.

Then make it work for login, businesses process 2 and logout.

Make this working for all the businesses processes.

 

In your Runtime settings in your scenario (on the controller or VuGen) edit the Run Logic, like in the attached screenshot.

 

NB: If this solves your problem / helps you on the way, consider acknowledging with Kudos. To kudo a post, select the thumbs up icon in the gray square by the post in the thread.
Highlighted
Absent Member.
Absent Member.

Re: How to setup this Load Test scenario

Hi asr_Dennis,
Thanks so much for your advice.

With your solution, can i start with ramp up 10 users every 1 min (i.e. 10min ramp up duration), then continue 1 hour load duration, i.e. 1 hour steady state whereby all users are running, then measure the response time and TPS for steady state from time 11th min to 70th min ?

Meantine, would like to confirm below setup will able to get same result right? but the disadvantages is created 2 scripts instead of 1, or there is other drawback ?

Script 1 - 20 Users
Run - Random
BusinessProcess 1 block - 30%
BusinessProcess 2 block - 70%

Sript 2 - 80 users
Run - random
BusinessProcess 3 block - 40%
BusinessProcess 4 block - 60%
0 Likes
Highlighted
Honored Contributor.
Honored Contributor.

Re: How to setup this Load Test scenario

Hi @LeannAnn,

 

Provided are the runtime settings not the configuration of the scenario in the controller.

See attached screenshot for the scenario in the controller.

 

Just 1 script needed.

Add the script to the scenario with 100VU.

Each VU will run through the Runlogic provided by me in my previous post.

So 20% through the first block and the other 80% through the second block.

 

You can measure response time and you are the one who decides what to measure.

You can measure response times from actions and steps and from transactions you provide in your script.

 

The first two you can control with the Run-time Settings -> General -> Miscellaneous.

Look at the item: Automatic Transactions.

There are two select boxes, check the ones you would like to use.

 

In your script you can add your own transactions with:  lr_start_transaction and  lr_end_transaction.

More on transactions http://lrhelp.saas.hp.com/en/latest/help/function_reference/Content/c_vuser/etc/lrFuncRef_c_Transaction_Funcs.htm

 

Best practice:

Do not forget to monitor your infrastructure and get a picture of that same infrastructure.

Know what you are going to test.

 

 

 

NB: If this solves your problem / helps you on the way, consider acknowledging with Kudos. To kudo a post, select the thumbs up icon in the gray square by the post in the thread.
Highlighted
Honored Contributor.
Honored Contributor.

Re: How to setup this Load Test scenario

@LeannAnn,

 

Just a quick note.

In the Run-logic I put the login in the INIT block and the logout in the END block.

This represents that the vusers login only once and perform the actions in the RUN block for the duration of the test.

(Vusers iterate in the RUN block during the time of the test)

If the test is over, all the vusers logout.

 

You can also choose a different approach: put the login and logout in the RUN block.

Then during one iteration the vuser logs in, performs a business process and logs out.

In the next iteration this will be repeated.

 

So in the first approach you will only (theoratically) measure 100 logins and 100 logouts.

You would like to run the test for one hour.

Suppose the duration of the second approach is 5 min for 1 vuser (login, business process logout).

So one vuser can perform this action 12 times in a hour.

In the second approach you will probably (theoratically) measeure 1200 logins and 1200 logouts. (12 times/hour/vu x 100 VU)

 

The way you choose approach 1 or 2 depends on the use of the application by your customer.

 

NB: If this solves your problem / helps you on the way, consider acknowledging with Kudos. To kudo a post, select the thumbs up icon in the gray square by the post in the thread.
Highlighted
Absent Member.
Absent Member.

Re: How to setup this Load Test scenario

Understand we should start measure the transaction response time and throughput when all are users running and before ramp down right, which is the steady state, instead of take measurement during ramp up and down ? Refer below scenario, we should measure response time and tps, from 5min till 1hour 5min right ?
- Total 100 concurrent users
- Ramp up 20 users per min
- From 5min onwards, all concurrent users are running, then load test 1 hour duration
- At 1hour 1hour 5min, ramp down 20 users per min

0 Likes
Highlighted
Honored Contributor.
Honored Contributor.

Re: How to setup this Load Test scenario

Hi @LeannAnn

 

Response time, throughput, hits per second etc. are all measured through the whole test execution. So including rampup and ramp down.

 

After the test has run, analyse the results file  with the HP Loadrunner Analysis tool.

With this tool you can choose a time period for which you would like to analyse the data.

So here you choose your time frame from one hour after rampup.

 

With HP Loadrunner Analysis you can change the granularity of graphs. You can filter out transactions, compare results of two tests, import external data from logiles or system resource monitoring.

Look for failed transactions in time, export RAW data to MS Excel etc.

You can even create reports HTML or word. You can use templates for analysis.

The tool can even help you when you see a spike in the response time.

 

This tool is a great advantage in performance testing. Especially when you integrated the system resource monitoring from the controller or via HP SiteScope for Loadrunner.

 

 

 

NB: If this solves your problem / helps you on the way, consider acknowledging with Kudos. To kudo a post, select the thumbs up icon in the gray square by the post in the thread.
Highlighted
Absent Member.
Absent Member.

Re: How to setup this Load Test scenario

Hi @dsr_Dennis,

Thanks for above response.  As I need to setup Load Test in Controller for below Internet Web scenario, appreciate if you could advise me for below questions.  Thanks a lot.  Leanne.

 

Requirement as per below:

- 1200 users visit the Web in 1 hour, average user visit time is 5min, Total 100 concurrent users (20user/min x 5min visiting time), Total transaction: 2800+960=3760 txns
- 80% user trigger Business Process 1 Block: Login action, Browse Product action, Logout action, i.e. 2880 txns.

- 20% user trigger Business Process 2 Block: Login action, Browse Product action, Submit Order action, Logout action. i.e. 960 txns.

- Each action triggers 1 HTTP request with target server response time 6 secs, and think time of 10 secs. 

- User iteration pacing time is 5min

 

Question 1) Can I determine the number of user to ramp up and down by dividing 100 concurrent users with 5 min user visiting time, i.e. start run 20users every min in Controller ?

 

Question 2) As I need to measure the performance for above requirements 1200users in 1hour generate 3760txns, could you advise which of below option 1 or 2 can meet the requirement and why select the option.  If both not suitable, appreciate you to suggest the option.

Option 1: ramp up 5min -> Run Duration 50min -> ramp down 5min

Option 2: ramp up 5min -> Run Duration 1hour -> ramp down 5min

 

Question 3) If choose above option 1, will the test able to generate enough transaction volume (3760txns) because the users will be ramp down during last 5min, i.e. before 1hour, which the Transaction actions will be stopped right, or LoadRunner will wait for vuser to trigger the all vuser blocks in the iteration before stop the vusers ?

 

Question 4) Understand that Controller's Duration section will trigger the Run action block in script, how about Controller's Start vuser section, is that Run action block in script will be triggered by Controller Start Vuser section as well, when we ramp up vuser ? 

 

Question 5) In addtional to verify the performance for entire test duration, I have another requirement that need to verify the transaction response time and transaction per seconds from the period when all concurrenct users are running and before ramp down user (i.e. exclude ramp up and down period), so can we specify the time interval in LoadRunner (graph or any component) to verify the performance ?  Or I need to extract the data to generate the statistics manually ?

 

 

Thanks again,

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.