The first login works, but when the second iteration begins it fails as the web page is still logged.
I have include a "clear browser cookie" and "execution delay" step at the beginning of the test but it appears to do nothing.
It is an ASP.NET application with forms authentication (using cookies) that is being tested.
Any suggestion to help debug this problem?
As a side question: will I be able to include this test "as a step" in other tests that are bound to a different data-source or do I need to create one single spreadsheet?
5 Answers, 1 is accepted
First check out this KB article. It might be exactly what you're looking for.
In your test script, are you logging out at the end of the test? For your specific problem you might be needing to close and reopen the browser in order for the logoff to be realized. You can do this in a coded step with these two lines of code:
ActiveBrowser.Close();
Manager.LaunchNewBrowser();
For data binding in general there are two possible approaches that the tool supports:
1) A subtest is databound to its own data source. The subtest will execute all rows of its datasource before returning to the parent test
2) The subtest inherits data from the parent test. When setup this way the subtest will execute just once for the current row of data before returning to the parent test.
Which approach to use is completely up to you. It all depends on how you wish to architect your tests. Kind regards,
Cody
the Telerik team
I have to close the browser at the start of the tests so that each iteration logs in correctly - I cant put the logout at the end of the test as its used as a step in other tests.
However whilst developing the test, I lose the debugger controls and ability to single step/breakpoints etc... because they seem to be lost when the new browser is opened at start.
Any guidance?
No I am sorry but that is a limitation in our current design. Our Visual Debugger will only work with the first initially opened browser that the framework automatically opens. It doesn't work with any subsequent popups or manually opened browsers.
Maybe you can work with your developers to figure out how to always be in logged off state when the browser first opens.
Cody
the Telerik team
Real show stopper for us...
I think I have a solution for you. With just one more line of code we can make the browser recycle happen on subsequent iterations, not the first iteration. Try this code and see if it does what you want:
if
(0 != Data.IterationIndex)
{
ActiveBrowser.Close();
Manager.LaunchNewBrowser();
}
Cody
the Telerik team