Can someone help me? I have a web test which I've created but I want to run that test multiple times, however for each iteration I need to change the windows login details. This is because the username and password needed for the application on test are tied to a specific windows login and this is testted by that application. Therefore I need to ensure the correct windows login is used when a different username and password are used to access the application on test. Basically I want to be able to do something like the Run As feature in windows through my web test in QTP if possible.
i.e for run 1 I need to be logged in to windows as user 1, for run 2 I need to be logged in as user 2 and so on. Is there something like the Windows Run As feature I could use to acheive this and store the windows login details in a database or Excel spreadsheet from which the details can be taken each time the test is run?
<font class="small">Code:</font><hr /><pre>
wshShell.run("runas /noprofile /user:%computername%\administrator " & Chr(34) & "cmd /c\" & Chr(34) & WScript.Arguments(0) & "\" & Chr(34) & Chr(34))
'Replace the string --> yourpassword~ below with
'the password used on your system. Include tilde "~"
Re: How to develop QTP tests which set windows log
It is not basic. I've missed dependency.
Why should we keep something in the memory in between cycles?
How about this scenario:
(that is more simple and more realistic, also):
User (Window and application) identities are located in Excel on NetWork or on MasterMachine for remote LogOn
1. LogOn into Win (No matter how: Runas or you can do it forcefully remotely)
2. Read Flag (cycle counter), what Excel Row to use
2. Read Excel (row, that you know already)
3. Increment Flag count and write it down into the same place for next cycle flag what current row is.