Highlighted
Established Member..
Established Member..
982 views

Manual Scenario Design question

Jump to solution
Hi All,

Could someone please advise me on the below

For ex : User Registration

I gave the Test duration as: 2 hrs
Ramp up : 10 vusers for every 20 secs
Method : Unique and Once
Iteration: 1
File : .csv (1000 username & passwords)

1) Script repeats 1000 times with unique usernames and passwords- Right?

2)Lets say 1000 vusers finished run the test 110 min’s i.e 1000 vusers takes the unique user name and password from the file. What happens in remaining 70 min’s? Because I gave only 1 iteration

3) For some reason if I need to do Registration again, data should be refreshed i.e data should be 0.- Right?

Thanks in advance!

Thanks,
Raj
0 Likes
1 Solution

Accepted Solutions
Highlighted
Absent Member.
Absent Member.

Re: Manual Scenario Design question

Jump to solution
Hi Raj,

If you set the test duration as 2 hours, the Vusers will continue to run for 2 hours after the ramp up is completes. In this case, the No. of iterations will not matter (unless you set the scenario to Run until completion).

So, if you want only single iteration, set the scenario to Run until completion

Also, in your case, you will have 1000 Vusers running multiple iterations.
As the parameter is set to Unique and update once, each Vuser will take a unique value. But this same value will be used in all iterations.

So, you need to set your parameter to update on each iteration (if you will be having multiple iterations).
In this case VuGen will give you an option to define what happens when the parameter is out of value.

Hope this answers your first 2 questions.
I am not sure I understood your 3rd question. If you mean to ask whether the parameter file values need to be updated, if you run the test again, then the answer is yes. Once the unique values are used, you need to provide new values.

Archana

View solution in original post

17 Replies
Highlighted
Absent Member.
Absent Member.

Re: Manual Scenario Design question

Jump to solution
Hi Raj,

If you set the test duration as 2 hours, the Vusers will continue to run for 2 hours after the ramp up is completes. In this case, the No. of iterations will not matter (unless you set the scenario to Run until completion).

So, if you want only single iteration, set the scenario to Run until completion

Also, in your case, you will have 1000 Vusers running multiple iterations.
As the parameter is set to Unique and update once, each Vuser will take a unique value. But this same value will be used in all iterations.

So, you need to set your parameter to update on each iteration (if you will be having multiple iterations).
In this case VuGen will give you an option to define what happens when the parameter is out of value.

Hope this answers your first 2 questions.
I am not sure I understood your 3rd question. If you mean to ask whether the parameter file values need to be updated, if you run the test again, then the answer is yes. Once the unique values are used, you need to provide new values.

Archana

View solution in original post

Highlighted
Absent Member.
Absent Member.

Re: Manual Scenario Design question

Jump to solution
You have an option to how to make use of the data when you move to the end of your data in the param file. When it reaches the out of value you have an option to abort vuser or continue with the last value or run in a cyclic manner. Vugen does not validates whether the data is unique or not but it make sure that it doesnt uses the data which it already used in the earlier iteration. When you provide the duration as 2 hours it will not limit to the specified iterations and it continues until the duration is reached to its maximum. So, make sure to provide the data or just run for the specified vusers with the available data.
Highlighted
Established Member..
Established Member..

Re: Manual Scenario Design question

Jump to solution
Hi Archana & Srinivas,

Thanks for your suggestions!

Could you please clarify me by giving little bit more info.

Basically I have to run 1000 Vusers by giving Unique and Once option and only 1 iteration.

Letâ s say I Gave the duration is 2 hrs.
Letâ s say controller finished within 1 hr to run 1000 vusers by taking unique password and usernames. Remember I gave only 1 iteration.

My question is, there is 1 more hr left. What happens in that 1 hr? Because I gave only 1 iteration and 1000 vusers with unique username and passwords?

What should do I need to do besides giving Unique and Once option for 1 iteration and 2 hrs duration for 1000 vusers to not to repeat the usernames and passwords and iterations.

The reason why I am asking little bit more info is , I need to present this info in front of the client.

Please advise me!

Thanks,
Raj
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Manual Scenario Design question

Jump to solution
Hi Raj,

With the settings you have, this is what will happen:
- The Vusers will continue running for the entire 2 hours. They will complete as many as iterations as it can (depending on the "Pacing" Run-Time Setting)
- Each Vuser, during the 1st iteration will take a unique value from the parameter file. So say, in the 1st iteration, Vuser1 has value1, Vuser2 has value2 and so on.
Now, for the 2nd iteration, Vuser1 will still use Value1, Vuser2 will use value2 and so on.
This is because you have instructed to update the parameter only once


I believe, what you want to achieve is that:
- The scenario should run for 2 hours - probably you want to capture the monitoring data for 2 hours
- But the script should run for only one iteration

For that, you can set the scenario duration to 2 hours, and abort the Vuser after 1st iteration in the script using lr_abort() function. As the number of iterations will be limited to 1, Unique and Update once setting will take care that Vusers do not repeat the parameter values.

I would suggest you try the "Simulate Parameter" Option in the "Parameter List" window. You can change various parameter options available, and see how the Vusers pick up values in the Controller.

Hope this helps.

Archana
Highlighted
Established Member..
Established Member..

Re: Manual Scenario Design question

Jump to solution
Hi Archana,

Awesome! Got it!
Thanks a lot!

Thanks,
Raj
0 Likes
Highlighted
Established Member..
Established Member..

Re: Manual Scenario Design question

Jump to solution
Hi Archana,

One more final question.

1)For Ajax TruClient Protocol Script, where do I need to insert the lr_abort () function in script on the embedded mode (please see the attached screenshot).

2)I think for Ajax TruClient Protocol Script , it's LR.abort(). Am I correct?

Please advise me!

Thanks,
Raj
0 Likes
Highlighted
Established Member..
Established Member..

Re: Manual Scenario Design question

Jump to solution
Hi Archana,

One more final question.

1)For Ajax TruClient Protocol Script, where do I need to insert the lr_abort () function in script on the embedded mode (please see the attached screenshot).

2)I think for Ajax TruClient Protocol Script,I believe it's LR.abort().Correct me If I am wrong.

Please advise me!

Thanks,
Raj
0 Likes
Highlighted
Established Member..
Established Member..

Re: Manual Scenario Design question

Jump to solution
Hi Archana,

Attachment is got corrupted.That's why I am reposting the same query.

One more final question.

1)For Ajax TruClient Protocol Script, where do I need to insert the lr_abort () function on the embedded mode(see the below script).

Script # :

1.Navigate to http://xxxxxxxxxxxx?
2.Type"xxx" in Username textbox.
3.Type"xxx" in Password textbox.
4.Click on to Click here to log in image.
5.Click on Bill History Button.
6.Click on Logout.
7.Verify You have successfully.....'s Visible Text contains "You have scuccessfully logged out"



2)I think for Ajax TruClient Protocol Script,I believe it's LR.abort().Correct me If I am wrong.

Please advise me!

Thanks,
Raj
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Manual Scenario Design question

Jump to solution
Hi Raj,

I am not sure about the Ajax TruClient protocol.
In general, you need to place the function, at the end of the action section.

If it is in C language, use
lr_abort();

For Java, use
lr.abort();

You can also try the function
lr_exit(LR_EXIT_VUSER_AFTER_ACTION, LR_PASS);

Archana
Highlighted
Absent Member.
Absent Member.

Re: Manual Scenario Design question

Jump to solution
Here is a sample code for your case

Web_reg_find(â Text=Bank of America Home Loansâ ,â Savecount=abc_count1â ,LAST);
Web_url --------------------------
- - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - -
If(atoi(lr_eval_string(â {abc_count1}â ))>0)
{
Lr_end_transaction(â Server response1_Transâ ,LR_PASS);
Else
{
Lr_end_transaction(â Server response1_Transâ ,LR_FAIL);
Lr_exit(lr_exit_iteration_and_continue,LR_FAIL);
}
Highlighted
Established Member..
Established Member..

Re: Manual Scenario Design question

Jump to solution
Hi Archana,

It sounds in my script, I have to place after the 7th step.

If you get a chance,could you please confirm this with other folks which u know.

Thanks a lot!

Thanks,
Raj
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.