Hi,
When I run my unit tests using the IDE all my tests passed and when I run the same tests using MSTest.exe all the tests failed. Please advice!
Thanks,
Hi,
When I run my unit tests using the IDE all my tests passed and when I run the same tests using MSTest.exe all the tests failed. Please advice!
Thanks,
MSTest.exe error
Richo
Kolchak
I am getting this on all tests MyClassInitialize threw exception. System.NullReferenceException: System.NullReferenceException: Object reference not set to an instance of an object..
David Sceppa
Hello,
You can try several things here.
1. If you're using a testrunconfig file and you're specifying deployment files there, make sure you call it from the commandline,
MSTest.exe /testcontainer:MyUnitTest.dll /runconfig:localtestrun.testrunconfig
2. If you're not using a testrunconfig file (you don't need deployment items for all of the tests in your project), you can specify attributes in a per test basis; use the DeploymentItem attribute and specify an absolute path to your reference
3. Make sure you added all references to your project as Projects references (from the Add reference dialog, hit the Projects tab).
If these do not solve your problem, take a look at this thread that may be helpful:
http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=324809&SiteID=1
Please let me know if this helps
David Gorena Elizondo
[MSFT] VSTS
Ting-fang Zheng
zaidm
I deleted my ClassInitialize() and now when i run the test the assemblies references are not getting copy to the out folder on test results. Please advice!
Thanks,