Highlighted
Absent Member.
Absent Member.
318 views

Siebel protocol scripting with LR

Hi,

When i record complete journey in action part, the script works fine, but when i try to record login in vuser_int and logout in vuser_end then script will pass in first iteration but fails in second iteration.

Coud you please help me with your suggestions as how to over come this issue.

My business requirement is that a user will login once and works for 8 hours and logout.
0 Likes
5 Replies
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Siebel protocol scripting with LR

Hi Nagaraju,

If you are runing the script multiple times then the code which is in action part only runs for every iteration, and the code in vuser init will run only for first time.

So you have to place the login code in vuser action.

-Krishna rajapantula
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Siebel protocol scripting with LR

Hi Krishna,

Thanks for your response.

Actually i am aware that only action part will repeat for multiple itetrations.

If i place the login code and logout code both in action part, then every time a user logs in creates a account(This is the journey in my script)and logs out.

But i want to simulate a different kind of scenario where in a user must login once and should create multiple accounts and then should logout once his job is done.

Why does my script works fine when i record complete journey in action part but fails when record login and logout in vuser_int and vuser_end respectively.

Any comments on this please .
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Siebel protocol scripting with LR

Hi nagaraj,

where exactly you want to use this script..?

In BAC/BSM or for load testing purpose.

As I told you before if you are trying to running the script multiple times since your login code is there in vuser init section it will try to execute the code which is in action part second time, and it will fail becuase it was not able to login there is not code in action part for that.

If you want to achevie your gola may be you have to use for loop using time functions.

Again if the script is for monitoring purpose i don't think it is best practice.

-With Regards,
Krishna Rajapantula
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Siebel protocol scripting with LR

Krishna,

I want to use my script for load testing, i.e to give bench marking for a server.

I have one doubt,

If i place login code in V_int, transactions in action part and logout code in V_end and run for two iterations then,

During 1st iteration a user logs in and does some transactions and in 2nd iteration(the vuser is still not logged out) as only action part repeats and the Vuser is still logged in, he must be able to continue with
action part and then logout at the end of second iteration rite?

But this is not happening.

and thanks for your advice will try with for loop as well.
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Siebel protocol scripting with LR

Hi,

 

Your script is context sensitive. Which means the script is dependant on earlier actions to proceed hence script failure.

Workaround :

Try and record your business process twice, the first in Action() and second time in Action2().

Now run your script for multiple iterations on Action2(), keeping login in init() and logout in end()

If it still does not work check for the context for which the script is dependant upon.

 

Hope this helps.

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.