Re: Weird unit testing bug?

"Charlie Poole" <[email protected]>
Newsgroups gmane.comp.windows.dotnet.nunit.user
Message-ID <005201c83c58$ad4a5ea0$6401a8c0@FERRARI>
Hi David, 

> >Can you get this down to a simple test case and submit a bug report?
> 
> After a lot of trial and error, I've narrowed down the cause 
> of my problems. When I run from NAnt or NUnit GUI, I'm using 
> a .nunit project file, which loads some five test assemblies. 
> Under these circumstances, the tests fail. However, if I load 
> the failing test assembly alone, then the tests pass just fine. 

Also, when you run from TD.NET, it is using its own code to 
load each assembly separately.
 
> I wonder if we're not using the .nunit file in the correct 
> way? In our solution, we have a /test folder off the solution 
> directory. Inside that folder, is one folder per test 
> project. Each test project has its own config files which get 
> copied into the /test folder as part of the build process. 
> However, the .nunit file only references one of these config 
> files. We don't set ApplicationBase, and have PrivateBinPath 
> set to "Use automatically generated path". I'll go away and 
> read the documentation a little more closely and experiment 
> with the settings.

Config files have to be in the same directory as the assembly
they are for. Are your assemblies in the test directory?
Depending on the settings in your .nunit file, nunit-console
decides whether to load each assembly into a separate appdomain
or run them all in one appdomain. You can force it to run one
way or the other using the /domain option on the command line.
Setting this to /domain:Multiple and removing any setting for
the config file from the .nunit file will probably work.

If not, send us a copy of your .nunit file if your company
security allows it. ;-)

Charlie

Charlie

> If I still can't figure it, I'll probably ditch the .nunit 
> project and just specify the test assemblies manually.
> --
> David Keaveny
> Developer, Enterprise Applications, Fairfax Digital
> 
> P.S. Sorry about the huge disclaimer our mail systems tack on 
> to the end of all outbound emails!
> 
> The information contained in this e-mail message and any 
> accompanying files is or may be confidential. If you are not 
> the intended recipient, any use, dissemination, reliance, 
> forwarding, printing or copying of this e-mail or any 
> attached files is unauthorised. This e-mail is subject to 
> copyright. No part of it should be reproduced, adapted or 
> communicated without the written consent of the copyright 
> owner. If you have received this e-mail in error please 
> advise the sender immediately by return e-mail or telephone 
> and delete all copies. Fairfax does not guarantee the 
> accuracy or completeness of any information contained in this 
> e-mail or attached files. Internet communications are not 
> secure, therefore Fairfax does not accept legal 
> responsibility for the contents of this message or attached files.
> 
> --------------------------------------------------------------
> -----------
> SF.Net email is sponsored by:
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for just about 
> anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> Nunit-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/nunit-users
> 



-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.