Write data from a file and create a batch file in LoadRunner
I got this scenario and I want to check with you any opinion in order to create a better script.
I got the credentials to authenticate (more than 500 users) into a intranet webpage in a excel file. I must read this file, extract the username and create a batch file (it could be a .vbs file also) with a sentence to run a service with the username, not with the user I'm scripting which is actually an admin user. Once the service is running I can open the webpage and proceed with the authentication...
I was thinking to:
1. Read excel file.
2.Extract the username and password, create a .vbs file with the sentence to run the service, something like:
set oS= Wscript.CreateObject("WScript.Shell")
oS.Run "runas /profile /user:XXX\YYY ""C:\Program Files\AAAs\Service.exe"""
where YYY is the username
3. Run this file
4. The service is running so I can launch the browser and authenticate, script continues...
I must repeat these steps for the 500 users...
Do you think is there any other better approach?
Re: Write data from a file and create a batch file in LoadRunner
Any ideas, guys?
Actually, I don't think this is a good idea because I'll have to write/read a file for each user and this scenario includes around 500 users...