Posts: 34
Threads: 12
Joined: Feb 2009
Reputation:
0
02-25-2009, 10:12 PM
We have these requirements in our workplace... I just managed to learn to create tests individually and run them individually using QTP IDE (Run button).
Requirement 1:
I have 5 tests. I would like to have a script to run all of them in sequence. I am new to this testing domain.
Requirement 2:
Sometimes I might have to run one test so many times, every time let the test open a new browser window (should leave the earlier test browser window open). So if I ran the test 10 times, at the end, I will have 10 browser windows open.
Please give me some tips or share some info on how you do this?
Thanks for your time.
Posts: 34
Threads: 12
Joined: Feb 2009
Reputation:
0
02-26-2009, 10:32 PM
Thanks for the answer. I hit another issue.
Used the batch runner. As the first test updates/inserts values into the global data table to pass it between actions, I think the test becomes an unsaved one after it runs; then when test batch runner tries to go to the next test in the batch, it could not...saying "Unable to close unsaved test".
I checked test run settings.. etc. Is there any way, we can tell the test to save before closing after a run. Or is there any (script) programmatic way to do this.
For solution 2, we do not want to close the browser window after a test-run. In other words, simply open a new browser every time the test runs ignoring the existing browser windows.
Posts: 34
Threads: 12
Joined: Feb 2009
Reputation:
0
03-02-2009, 09:15 PM
I used the batch runner and I mentioned the following issue:
As the first test updates/inserts values into the global data table to pass it between actions, I think the test becomes an unsaved one after it runs; then when test batch runner tries to go to the next test in the batch, it could not...saying "Unable to close unsaved test".
I checked test run settings.. etc. Is there any way, we can tell the test to save before closing after a run. Or is there any (script) programmatic way to do this.
I guess I was wrong. Probably I clicked something while the batch runner was running the test and it made the test to "unsaved" status.
Actually Batch Runner works great.
Then I asked about the following requirement:
"Sometimes I might have to run one test so many times, every time let the test open a new browser window (should leave the earlier test browser window open). So if I ran the test 10 times, at the end, I will have 10 browser windows open."
Papu wrote a solution:
Soln Req 2:
For this in tools->option->web tab -> 'Advance' option->check the 'browser cleanup' check box under the 'run seting'
Also you can close all the browser programetically after finishing your test steps.(use systemutil.CloseDescendentProcesses() /systemutil.CloseProcessByWndTitle("Internet Explorer")
Actually, the above solution is to close the browser window each time a test session is over. I do not want to close the browser window, and still want the test to use a fresh another one every time it runs, leaving the open window as it is. Is this possible? Like the load testing.