This is a migrated thread and some comments may be shown as answers.

About browser instance

8 Answers 122 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Michel
Top achievements
Rank 1
Michel asked on 19 Jan 2011, 09:42 PM
Hi,

I would like to create a test that will be reuse in many lists.This test is a login on my secured web site. But after the test finish, the browser instace close and the next test can not execute because it try to retreive a control on the main page After the longin process....

How can I do this ?

Thanks
Michel

8 Answers, 1 is accepted

Sort by
0
Accepted
Stoich
Telerik team
answered on 20 Jan 2011, 01:36 PM
Hi Michel,
    there are two ways to do it:

You can try using the Recycle Browser option.
Open QA edition and go to Test Lists tab.
Select your TestList and click on the Edit Settings icon.
Scroll down through the menu that comes up and check the RecycleBrowser checkbox (see screenshot 1). Try whether your TestList works properly now.

Depending on the type of login your application uses and your browser settings this may or may not work.

The second option is to use the TestAsStep feature from the GUI to add the login test as a subtest to each of your tests that require you to be logged in. This will definitely work - the only drawback is that you'll need to manually add the TestAsStep to each test.

I hope I've managed to answer this question for you, please let me know if there's anything else I can help you with.

All the best,
Stoich
the Telerik team
Interested in Agile Testing? Check out Telerik TV for a recording of Automated Testing in the Agile Environment
0
Shelly
Top achievements
Rank 1
answered on 20 Jan 2011, 09:26 PM
Stoich, will the Recycle Browser option also work when I execute the recorded test to validate that it works before adding it to my test list?  I find it frustrating that I can't execute tests from the Record tab with the same options/settings as when I run them from the test list. 
Thanks,
Shelly
0
Stoich
Telerik team
answered on 21 Jan 2011, 05:50 PM
Hello Michel,
    In QA edition the only way to execute tests outside of a TestList is Quick Execution. You're right - some options that you can set for a TestList will not be available with when you execute a test this way.
With Quick Execution you can only execute the test you've currently opened. In this context there's really no reason to use RecycleBrowser because you're not able to "chain" different tests in any meaningful way. So there's no closing and launching of new browser involved.

I hope I've managed to explain this properly - don't hesitate to ask if you have any more questions!

Best wishes,
Stoich
the Telerik team
Interested in Agile Testing? Check out Telerik TV for a recording of Automated Testing in the Agile Environment
0
Shelly
Top achievements
Rank 1
answered on 01 Feb 2011, 09:44 PM
Stoich, I get what you are saying, however it doesn't help me.  My problem isn't as much about chaining tests together as doing a quick execute in the currently open browser.  I think perhaps I should have created a new thread.

Our application requires login.  We can't store our pw's in a test file without encryption, it would be a security violation.  So, it would be convenient to login to the application one time, then use it for all recording sessions and quick executions.  Otherwise, every single time I use quick execute to validate that my recorded test works, I have to login.  This can become really old very quickly when working on editing a test, etc.  It would be great if the Quick Execute button had the same options the Record function supports -- either launch new browser, or specify an existing browser session to use.

I think this might have already been logged as a feature request after I discussed with Dan, but I wanted to come back to this thread and better explain my problem.

Thanks,
Shelly
0
Cody
Telerik team
answered on 02 Feb 2011, 07:31 AM
Hi Shelly,

Yes I am sorry but Quick Execute must launch a new browser window. We have had this feature request quite a few times but we haven't been able to implement it yet.

On a different note there is a KB article that shows how to store and use encrypted passwords, complete with working code samples. Maybe this will help you out.

Greetings,
Cody
the Telerik team
Interested in Agile Testing? Check out Telerik TV for a recording of Automated Testing in the Agile Environment
0
Kevin
Top achievements
Rank 1
answered on 13 May 2011, 10:01 PM
Here's my vote for Quick Execution of a web test to allow running the test in an existing browser window (Internet Explorer preferred). 
In Test Studio 2011.1.502.0, quick execute of a web test always launches a new browser window, so I have to chain tests together for login etc.

Thanks,
Kevin
0
Konstantin Petkov
Telerik team
answered on 13 May 2011, 10:16 PM
Hi Kevin,

Thanks for writing.

Have you tried our new "Run From Here" and "Run Selected" option? With the recorder attached to an IE instance you can select the step to start from, right click, open the Run menu and choose "From Here". That will execute the rest of the test in QuickExe mode within the active browser.

I hope that helps.

Best wishes,
Konstantin Petkov
the Telerik team
Do you think you know all the new features coming out in Test Studio R1 2011? Think again - we have some surprises and will share them with you in the What's New in Test Studio R1 2011 Webinar on May 12th.
Register Today!
0
Kevin
Top achievements
Rank 1
answered on 16 May 2011, 06:46 PM
Thanks Konstantin --
That is very helpful.  I didn't realize that Run From Here or Run Selected would execute in the existing browser and then let me continue recording in the same browser after the run.

Kevin
Tags
General Discussions
Asked by
Michel
Top achievements
Rank 1
Answers by
Stoich
Telerik team
Shelly
Top achievements
Rank 1
Cody
Telerik team
Kevin
Top achievements
Rank 1
Konstantin Petkov
Telerik team
Share this question
or