Unable to run multiple tests in a row using Safari

5 posts, 0 answers
  1. Chris
    Chris avatar
    8 posts
    Member since:
    Jan 2011

    Posted 07 Mar 2011 Link to this post

    Hello,

    We are currently running into a issue using safari where we are unable to run more than a few test cases in one run.  This even happens with the Sample code that ships with WebAii. 

    Here is what I did in the sample code.
    1. In app.confg change configuration\WebAii.Settings\defaultBrowser="Safari"
    2. Build
    3. Open Test List Editor
    4. Run the first 5 test cases

    Here is the output from the run:
    Passed QuickStarts_VSTS_CS.UsingAspNetDevSrv.UseAspNetDevServer 
     
    Failed QuickStarts_VSTS_CS.AjaxSupport.WaitingForMultiplePageChanges Initialization method QuickStarts_VSTS_CS.AjaxSupport.MyTestInitialize threw exception. System.TimeoutException: System.TimeoutException: Wait for condition has timed out. 

    Failed QuickStarts_VSTS_CS.TestRegions.AccessingTestRegions Assert.IsTrue failed.  

    Failed QuickStarts_VSTS_CS.TestRegions.AccessingElementsUsingTestRegions Test method
    QuickStarts_VSTS_CS.TestRegions.AccessingElementsUsingTestRegions threw exception:
    ... 

    Failed QuickStarts_VSTS_CS.TestRegions.UsingFindParamAttributeWithTestRegions Test method QuickStarts_VSTS_CS.TestRegions.UsingFindParamAttributeWithTestRegions threw exception:
    ... 

    Error QuickStarts_VSTS_CS.AjaxSupport.WaitingForSinglePageChange The agent process was stopped while the test was running. 


    The first one always passes for me. After that however is seems the environment gets in a bad state and nothing will pass from that point onwards.

    Is this a known issue with Safari? 
    Does anyone know of any workarounds?

    We are currently blocked by this and I need to find a workaround as soon as possible.

    Thanks,
    Chris

  2. Chris
    Chris avatar
    8 posts
    Member since:
    Jan 2011

    Posted 07 Mar 2011 Link to this post

    I also ran some further testing to see what would and would not work for 4 of the supported browers listed on the main Telerik site.

    Here are the 4 browsers I used
    1. Internet Explorer 9.0.8080.16413
    2. FireFox 3.6.13
    3. Safari 5.0.3
    4. Chrome 9.0.597.107

    I took 5 test cases from QuickStarts_VSTS_CS project that ships with the Telerik binaries.  None of the test cases I picked specify a specific browser and pull the value from the app.config.

    1. QuickStarts_VSTS_CS.WebAii2Samples.JavascriptReturnsObject
    2. QuickStarts_VSTS_CS.WebAii2Samples.JavascriptEventNotifications
    3. QuickStarts_VSTS_CS.WebAii2Samples.ChainedFindExpressions
    4. QuickStarts_VSTS_CS.WebAii2Samples.MouseEvents
    5. QuickStarts_VSTS_CS.WebAii2Samples.JavascriptReturnsJson

    Here are the results I recieved:
    Internet Explorer: 5/5 PASSED
    FireFox:                5/5 PASSED
    Safari:                  0/5 PASSED
    Chrome:                0/5 PASSED

    When I debug into the failures the following call to the active browser never seems able to suceed.

    ActiveBrowser.NavigateTo(Path.Combine(TestContext.TestDeploymentDir, "WebAii2Pages/JavascriptFunctions.html"));

    This leaves me with the following questions.

    • Is a browser i am currently running against not supported?
    • If all of these browsers are supported does anyone have any ideas I can try to make these test cases pass for all browsers?

    Thanks,
    Chris

  3. Chris
    Chris avatar
    8 posts
    Member since:
    Jan 2011

    Posted 08 Mar 2011 Link to this post

    Any ideas at what could be wrong?  We are currently blocked by this.

    Thanks,
    Chris
  4. Kashyap
    Kashyap avatar
    6 posts
    Member since:
    Oct 2008

    Posted 10 Mar 2011 Link to this post

    Chris,

    We also had the same issue its issue with WebAii library that thinks it killed the Safari instance before spawning a new one but there is some delay before the process is actually killed. Long story short put Thread.Sleep() delays between tests of order of 2 - 5 seconds to make it work reliably. I have seen it show the same issue for Firefox too.

    Thanks,
    Kashy
  5. Chris
    Chris avatar
    8 posts
    Member since:
    Jan 2011

    Posted 10 Mar 2011 Link to this post

    That is the best answer I have been given so far.  I will give it a try and let you know.

    Thanks,
    Chris
Back to Top