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
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.
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.