This is a migrated thread and some comments may be shown as answers.

System.Threading.ThreadAbortException when running test

5 Answers 583 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 1
Steve asked on 31 Aug 2012, 09:04 AM
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()

5 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 05 Sep 2012, 01:31 PM
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
0
Steve
Top achievements
Rank 1
answered on 25 Sep 2012, 10:28 AM
here is a zip file with soloution (VS2010) and html file .\HTMLTestPage\HTMLTestPage.html
0
Plamen
Telerik team
answered on 28 Sep 2012, 03:16 PM
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
0
Adam
Top achievements
Rank 1
answered on 19 Dec 2012, 02:01 AM
I have this same issue and it does appear to be a resharper runner issue.
Using the VS2012 test explorer it works just fine.
0
Plamen
Telerik team
answered on 21 Dec 2012, 05:07 PM
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
Tags
General Discussions
Asked by
Steve
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Steve
Top achievements
Rank 1
Adam
Top achievements
Rank 1
Share this question
or