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

Browser recycling.

3 Answers 111 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
SD
Top achievements
Rank 1
SD asked on 27 May 2010, 02:44 AM
Hi Guys,

Lets say you have a bunch of tests in a test suite but you want 
only 2 to run while the browser recycle is enabled. 

How do you actually do it? I understand you need to override the recycleBrowser to be true but should 
that declaration resides in both tests ? Only in the first one ? 

Ta, 
SD.


3 Answers, 1 is accepted

Sort by
0
Missing User
answered on 28 May 2010, 09:45 PM
Hello SD,

It would probably be easiest to call your Inner Test during the Outer Test execution. You can do the following  call in the Outer Test:

InnerTest i = new InnerTest();
i.Initialize(true);
iInnerTestMethod();

Greetings,
Nelson Sin
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
SD
Top achievements
Rank 1
answered on 31 May 2010, 06:04 AM
Thanks for that Nelson, 

I was actually referring to the following scenario regardless if the Tests are grouped in a Test Case. 
In the example, I want the browser to be recycled between exe. of Test 1 & 2 but it should be the same session
between Tests 3 & 4...And then the browser to be recycled between the exc. of Tests 5 & 6...

[Test]
DoSomething1 ();
[Test]
DoSomething2 ();

[Test]
DoSomething3 ();
Keep the same broswer session  when moving to the next test 
should BrowserRecylce be overridden here ? 
[Test]
DoSomething4 ();

[Test]
DoSomething5 ();
[Test]
DoSomething6();
0
Missing User
answered on 01 Jun 2010, 11:38 PM
Hello again SD,

I forgot to mention I tried the scenario you mentioned, but there were issues in that the recycled browser instance was not being closed at the end of the test.

The code I posted was a work around to avoid this in that i.Initialize(true); will reuse the browser and avoid the browser remaining open at the end of the test suite run. 

This may actually be a bug, I would need to investigate further. You can do an explicit ActiveBrowser.Close() in the last test to use the recycled browser instance to make sure the test browser instance is closed. Both tests would need to have RecycleBrowser set to true.

Greetings,
Nelson
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
General Discussions
Asked by
SD
Top achievements
Rank 1
Answers by
Missing User
SD
Top achievements
Rank 1
Share this question
or