Data-Driven Test for Log-on verification

4 posts, 1 answers
  1. Mariko
    Mariko avatar
    39 posts
    Member since:
    Jun 2011

    Posted 12 Jul 2011 Link to this post

    Hi,

    I've created this post to avoid confusion with my other post.

    We have this test for Log on verification.
    Scenario 1 for the normal process(Valid Users) and Scenario 2 for the negative test(Invalid Users).
    We've put those scenarios in a datasource to be able to leverage the data-driven capability of the test studio.
    After running the test, we noticed that Scenario 2 behaves like Scenario 1. Which is not the expected.
    We later on observed that Test Studio doesn't closes the browser on every end of each iteration. So credentials for Iteration2 is actually the credentials for iteration1.  
    We tried adding a 'Clear Cached' step but it still behaves the same.
    We also tried to set the Behavior Property ClosesBrowser = True but still the same.
    We also tried your suggestion on my other post to put the 'Clear Cached' step on the 1st step but still no luck.
    And unfortunately, the design of our application page doesn't have a Log-off button.

    Any thoughts on this?

    Thanks,
    Mariko
  2. Answer
    Anthony
    Admin
    Anthony avatar
    19 posts

    Posted 13 Jul 2011 Link to this post

    Hi Mariko,

    The "Clear Cookies" step is not successful because it is likely targeting persistent cookies and not browser session cookies. Since the browser does not close between iterations of a data driven test, those persistent cookies remain.

    To close and reopen the browser between iterations, insert a script step at the end of your test. Its code will be as follows:

    //Close the active browser window
    ActiveBrowser.Window.Close();
     
    //Launch a new browser instance
    Manager.LaunchNewBrowser();

    Kind regards,
    Anthony
    the Telerik team
    Register today for a live 'What's New in Test Studio R1 2011 SP2' event on Tuesday, July 19 at 2pm EST!

    Have you looked at the new Online User Guide for Telerik Test Studio?
  3. Mariko
    Mariko avatar
    39 posts
    Member since:
    Jun 2011

    Posted 13 Jul 2011 Link to this post

    Thanks again Anthony! :)

    Hmm... just for another "nice to have", maybe you could add this close browser step on the "Add" toolbar so that adding of "script steps" are minimized.

    Cheers,
    Mariko
  4. Anthony
    Admin
    Anthony avatar
    19 posts

    Posted 14 Jul 2011 Link to this post

    Hello Mariko,

    Thanks again for the great feedback. I agree this would be a convenient addition and logged it as a Feature Request.

    Best wishes,
    Anthony
    the Telerik team
    Register today for a live 'What's New in Test Studio R1 2011 SP2' event on Tuesday, July 19 at 2pm EST!

    Have you looked at the new Online User Guide for Telerik Test Studio?
Back to Top