Can an IF \ THEN be used in a VuGen Script? (602 Views)
Reply
Established Member
l_day75
Posts: 1
Registered: ‎07-22-2013
Message 1 of 2 (602 Views)

Can an IF \ THEN be used in a VuGen Script?

Does anyone know of a way to incorporate an If\Then statement into a VuGen script?

 

What I have is a HTTP script that records a person hitting our website then clicking on the Browse by Category link.  Now, for the Select Category I have parameterized the categories in a file, selecting a random URL each occurrence. What I need the IF \ THEN to be able to do is read what parameter was used during that occurrence and then based on the selection, pull an item from a different parameter list.

 

for example if during iteration 1 CPUs was selected as the category, then during the next action where an item is placed in the cart, I want the item number (also a parameter) to be pulled from the CPUItemList parameter file. Second iteration, let's say Education was used from the Category parameter list, so during the Add Item action, the item number should be pulled from the EduItemList parameter file, etc.

 

Can this be done, if so, any help would be greatly appreciated.

Thank You

HP Expert
Suerte13cr
Posts: 736
Registered: ‎09-14-2011
Message 2 of 2 (589 Views)

Re: Can an IF \ THEN be used in a VuGen Script?

Vugen script accepts code in C, so you can make ifs, fors, whiles, etc. Use F1 and you can see what functions you can use.

 

Regards,

Mario M.

HP LR/PC Support

If you are customer you can try posting on our internal forums for more personalized support.

LoadRunner:
http://h30499.www3.hp.com/t5/LoadRunner-Support-Customer/bd-p/loadrunner-support-customer-forum

Performance Center:
http://h30499.www3.hp.com/t5/Performance-Center-Support/bd-p/performance-center-support-customer

How to:
http://www.youtube.com/watch?v=4ChlysWupWM

If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.