System.Threading.ThreadAbortException when running test

6 posts, 0 answers
  1. Steve
    Steve avatar
    2 posts
    Member since:
    Aug 2012

    Posted 31 Aug 2012 Link to this post

    I have a simple Nunit test runing,

     

     

     




    [Test]
    public void SampleWebAiiTest()
    {
    // Launch a browser instance
    Manager.LaunchNewBrowser(BrowserType.InternetExplorer);
    // The active browser
    ActiveBrowser.NavigateTo("http://localhost/HTMLTestpage.htm");
    HtmlMainScreen homepage = new HtmlMainScreen(ActiveBrowser.Find);
    homepage.TextField1.Text = "Automation Test";
    homepage.OkButton.Click();
    Assert.AreEqual("Automation Test", homepage.Div1.InnerText, "Elements are not equal");
    }

    HtmlMainScreen attached.

    The test pass but I get the following exception. I am runing Visual Studio 2010 on Windows 7 (64bit) and using jetbrains resharper 7.0 to run the unit test

    System.Threading.ThreadAbortException

    Thread was being aborted.

    at

    ArtOfTest.WebAii.Messaging.Process.BrowserRemoted.AsyncListenerThreadEntry() at System.Threading.ExecutionContext.runTryCode(Object userData) at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart()

  2. Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 05 Sep 2012 Link to this post

    Hello Steve,

    To troubleshoot this error, we need a local reproduction. Is it possible for you to share a copy of the 'HTMLTestpage.htm' file?

    As an alternative you can record a Fiddler trace of that page. With that trace we'll be able to "simulate" your app in order to reproduce the problem.

    If you regard that information as sensitive, you can attach it to a support ticket which is confidential, unlike this forum thread.  

    All the best,
    Plamen
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  3. Steve
    Steve avatar
    2 posts
    Member since:
    Aug 2012

    Posted 25 Sep 2012 Link to this post

    here is a zip file with soloution (VS2010) and html file .\HTMLTestPage\HTMLTestPage.html
  4. Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 28 Sep 2012 Link to this post

    Hi Steve,

    I have executed your test multiple times via the NUnit GUI and as you can see in this video it works as expected. Please try disabling or uninstalling the ReSharper plugin. The ReSharper test runner is untested by Telerik and can cause different problems, like this one for example. We recomend using the JustCode tool instead, which also includes a unit test runner feature.

    Regards,
    Plamen
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  5. Adam
    Adam avatar
    1 posts
    Member since:
    Sep 2012

    Posted 18 Dec 2012 Link to this post

    I have this same issue and it does appear to be a resharper runner issue.
    Using the VS2012 test explorer it works just fine.
  6. Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 21 Dec 2012 Link to this post

    Hi Adam,

    Thank you for letting us know that the issue is related to the Resharper tool. I'm glad to hear that everything works now using the VS2012 test explorer.

    Kind regards,
    Plamen
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
Back to Top