In the application I'm testing, I have many type of login ID for different scenarios but after login the flow of application is common. So I was thinking to automate flow after login separately and write a script with data of Login-id/Pass in an excel sheet and execute them together. Can we do it? I have doubts in this. Not getting exactly how I should proceed?
How do you mean "execute them together"? I mean you could always use a For/Next loop and go through each ID from the Excel sheet, log it in, make sure it works, and then continue with the regular program flow. The pseudocode might look like:
Connect to excel sheet via ADO
totRecords = total records in excel sheet
For i = 0 to totRecords
Go to login page
thisLogin = ExcelRow(i)
thisPassword = ExcelRow(i)
do the login using the data
Proceed with your regular execution
Note, in the above pseudocode you could also bring the main code branch into the for/next loop and run the full suite of testing for each login. I mean, this is part of the reason that we automate, so that we can get the greatest number of test cycles done as we can, in the time given. Plus automated testers can run overnight, you can't [img]/images/graemlins/smile.gif[/img]
9 out of 10 people I prove wrong agree that I'm right. The other person is my wife.
But I wanted to use this for Load Testing and I looked into script file and unable to understand how I can use For-Next Loop here. See,
Set HTTPTask = LoadTesting.HTTPTaskByName("Task1")
Set VirtualUser = LoadTesting.CreateVirtualUser("VirtualUser1")
Set VirtualUser.Task = HTTPTask
This is my Load Testing script:
Lets suppose I have recorded the Common Flow as Task1. Now If I'll make
for Login only and call 'Test1' in Test2 then at a time just one type of user is executing in the script. But I want to get a feel that multiple type of users (with separate login ids) are logging in at the same time.