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:

sagar said...

Sometimes I respond to comments, but this year it really hasn't been very often, but I do try and go to their blog and comment on one of their posts. I very seldom check to see if anyone has responded to any comment I make.

Please Read:
Enter to my " 1st FUNNY CONTEST " held at my blog . Winners will get a free 120*120 Adspot on my Blog for a period of 1 Month. END DATE: 13 june 2009

SEO Status of this blog:

1) Google PR #2
2) Alexa Ranking: 140,082
3) Backlinks: 5000+
4) Daily Unique Visits: 250 - 350
5) Daily Pageviews: 1000+

Arulraj said...

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

Post a Comment

Free advertising


Lowes Coupon
How to Blog

Free Advertising