nunit-core team mailing list archive
-
nunit-core team
-
Mailing list archive
-
Message #03056
Re: [Bug 1064804] Re: Test throws an exception in NUnit but works when running in MSTest or as a Console application
I've found several reports of people complaining about a similar issue,
although there's not much information in them. In general they seem to be
related to the host of the application, that is, works in console but
breaks in ASP.NET, for instance.
The first thing I would try is to simulate with NUnit what MSTest (I guess)
does. Start by running the tests using nunit-console.exe and see if
anything changes.
Then if your project is compiled for >= .NET 4.0 please modify the
nunit-console.exe.config file by forcing the nunit to run under >= .NET 4.0
ONLY: http://msdn.microsoft.com/en-us/library/w4atty68.aspx
https://groups.google.com/forum/?fromgroups=#!topic/microsoft.public.axapta.programming/zrcHzjLHBm4
http://mailarchiver.org/mail/topic/web-applications-crashes-when-using-netbusinessconnector-11521030
https://community.dynamics.com/product/ax/f/33/p/22895/36688.aspx
On Wed, Oct 10, 2012 at 8:25 AM, Mun Wai Chan
<munwai@xxxxxxxxxxxxxxxxxxxx>wrote:
> Sorry, I misunderstood you. Is below what you meant?
>
> I loaded the unit test dll using the NUnit gui and went to Tools ->
> Settings -> Assembly Isolation.
>
> Tried running in all 3 options
>
> 1) Run tests directly in NUnit process.
> 2) Run tests in single separate process.
> 3) Run tests in a seperate process per Assembly.
>
> And all 3 options crashes the NUnit gui.
>
> --
> You received this bug notification because you are a member of NUnit
> Developers, which is subscribed to NUnit V2.
> https://bugs.launchpad.net/bugs/1064804
>
> Title:
> Test throws an exception in NUnit but works when running in MSTest or
> as a Console application
>
> Status in NUnit V2 Test Framework:
> New
>
> Bug description:
> Hi,
>
> I have a simple test which throws an error when I run it using NUnit
> (fails on both NUnit GUI/console and Resharper in VS). However, if ran
> using Visual Studio's Test -> Debug option or as a Console
> application, it runs fine. The code is exactly the same for the 3
> different projects types (NUnit, Console and MSTest).
>
> Source code for NUnit test:
>
> using System.Net;
> using Microsoft.Dynamics.BusinessConnectorNet;
> using Microsoft.VisualStudio.TestTools.UnitTesting;
>
> namespace TestProject1
> {
> [TestClass]
> public class UnitTest1
> {
> [TestMethod]
> public void TestMethod1()
> {
> Axapta ax = new Axapta();
> ax.LogonAs("User1", "Globe", new NetworkCredential("User1",
> "pwd", "Globe"), default(string), default(string),
> "A6BuildTestAos:6004", default(string));
> ax.Logoff();
> }
> }
> }
>
> Error:
>
> FatalExecutionEngineError was detected.
> The runtime has encountered a fatal error. The address of the error was
> at 0x5785ca87, on thread 0x792c. The error code is 0xc0000005. This error
> may be a bug in the CLR or in the unsafe or non-verifiable portions of user
> code. Common sources of this bug include user marshaling errors for
> COM-interop or PInvoke, which may corrupt the stack.
>
> Thanks in advance.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/nunitv2/+bug/1064804/+subscriptions
>
> _______________________________________________
> Mailing list: https://launchpad.net/~nunit-core
> Post to : nunit-core@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~nunit-core
> More help : https://help.launchpad.net/ListHelp
>
--
You received this bug notification because you are a member of NUnit
Developers, which is subscribed to NUnit V2.
https://bugs.launchpad.net/bugs/1064804
Title:
Test throws an exception in NUnit but works when running in MSTest or
as a Console application
Status in NUnit V2 Test Framework:
New
Bug description:
Hi,
I have a simple test which throws an error when I run it using NUnit
(fails on both NUnit GUI/console and Resharper in VS). However, if ran
using Visual Studio's Test -> Debug option or as a Console
application, it runs fine. The code is exactly the same for the 3
different projects types (NUnit, Console and MSTest).
Source code for NUnit test:
using System.Net;
using Microsoft.Dynamics.BusinessConnectorNet;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace TestProject1
{
[TestClass]
public class UnitTest1
{
[TestMethod]
public void TestMethod1()
{
Axapta ax = new Axapta();
ax.LogonAs("User1", "Globe", new NetworkCredential("User1", "pwd", "Globe"), default(string), default(string), "A6BuildTestAos:6004", default(string));
ax.Logoff();
}
}
}
Error:
FatalExecutionEngineError was detected.
The runtime has encountered a fatal error. The address of the error was at 0x5785ca87, on thread 0x792c. The error code is 0xc0000005. This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code. Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack.
Thanks in advance.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nunitv2/+bug/1064804/+subscriptions
References