Discussion Forum

Welcome to the Discussion Forum, we encourage you to REGISTER on our forum and participate in the debate.For more details Click here

Online Advertising

Viewers now you can promote Your Websites/Blogs/Products by using our online advertising program.Using this feature you can place your Ads in my blog and can attract the people logging over here.To place your ads, just sign in my Guest Book and leave your details over there.

Sunday, May 24, 2009

Parameterization in OpenSTA

Consider the Scenario, parameterizing the Username and Password in Login screen,
1.Record the script
2.Create a dataset for username and password in different notepads and save it with extension .fvr
3.Copy the created files and place it in the Data Folder of OpenSTA installation directory,
Ex:C:\Program Files\OpenSTA\Repository\Data
4.Under the Definition section of the recorded script place the following lines,
CHARACTER*512 fileuser, FILE = "users", SCRIPT
CHARACTER*512 filepassword, FILE = "password", SCRIPT
CHARACTER*100 currentUsername, LOCAL
CHARACTER*100 currentPassword, LOCAL
Note:
users - filename of the file that contains the username
password - filename of the file that contains the password
5.In the script recorded, above the Post url where the login data will be passed, place the following code,
ACQUIRE MUTEX "Logn"
NEXT fileuser
NEXT filepassword
SET currentusername = fileuser
SET currentpassword = filepassword

LOG "User: ", fileuser, " - Password: ", filepassword
LOG "User: ", currentUsername, " - Password: ", currentPassword

RELEASE MUTEX "Logn"
Note:
Make sure you use the mutex, or each thread may not use a distinct value from the list/file.
6.In the Post Url section replace the values passed in login with the variables we have created i.e currentusername for Username and currentpassword for Password.
7.Run the Script, different values will be passed for different iterations from the file created.

2 comments:

Arulraj said...

Hi sagar, thanks for leaving ur comment in my blog, i will have ana eye on your blog too..

Unknown said...

Great post with nice details withI have the add link but I end up creating two pages ............I read it very seriously .
Visit Also Here:--
Open ad posting
Free ad posting

Post a Comment

Free advertising


Lowes Coupon
How to Blog

Free Advertising