Good and excellent for VS 2012, but issues with VS2013: 01) Tests hang - the first one gets a green arrow but then nothing happens; 02) Test names are full qualified name in stead of just the method name.
Works fine with 2013. Essential to enable use of more common/free testing tools, e.g. when creating open/shared source solutions (people may want to open and run tests without the premium visual studio/MSTest version available).
I have the same issues in VS 2013 Update 3. In ActivityLog.xml there is "Could not load file or assembly 'xunit.runner.visualstudio.settings, Version=0.99.8.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.".
I am trying to run something similar to the following:
N:\Projects>"C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" "N:\Projects\bin\Debug\IntegrationTests.dll" /usevsixextensions:true /testcasefilter:"TestCategory=Foo" /settings:"N:\Projects\mock.runsettings"
But nothing I do to the TestCaseFilter parameter has any effect. It will always run every test in IntegrationTests.dll. Is there some way to get this to work properly? I am running VS 2013.
(As an aside, the /settings flag does not appear to do anything, either. The settings are always overwritten by the settings from VS.)
After upgrading xUnit test runner to version 0.99.6 I cannot run unit tests for class library running on .NET 3.5 anymore. I get the following error:
Could not find test executor with URI 'executor://xunit/VsTestRunner2'. Make sure that the test executor is installed and supports .net runtime version 2.0.50727.5477.
I'm running tests in VS 2012. Downgrading xunit test runner to version 0.99.3 fixed the problem.
Could you advise on what could cause this? Is this a bug in xUnit runner 0.99.6, or is there possibly anything wrong with my VS 2012 setup?
I have VS 2012 Update 3.
I try to run my tests with xUnit.net runner 0.99.0 but no chance.
There is test output
------ Run test started ------
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.FormatException: Input string was not in a correct format.
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseDecimal(String value, NumberStyles options, NumberFormatInfo numfmt)
at Xunit.TestClassCallbackHandler.OnTest(XmlNode xml)
at Xunit.TestClassCallbackHandler.OnXmlNode(XmlNode xml)
at Xunit.XmlNodeCallbackHandler.System.Web.UI.ICallbackEventHandler.RaiseCallbackEvent(String eventArgument)
at System.Web.UI.ICallbackEventHandler.RaiseCallbackEvent(String eventArgument)
--- End of inner exception stack trace ---
I have a similar issue (using FsCheck) - my tests all pass so far but as soon as one test throws a exception I get a TargetInvocationException due to a NullReferenceException.
I checked/debuged the FsCheck code and the problem seems not to be in the our code there.
Here is a stacktrace (in german - sorry):
System.Reflection.TargetInvocationException: Ein Aufrufziel hat einen Ausnahmefehler verursacht. ---> System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
bei Xunit.TestClassCallbackHandler.OnTest(XmlNode xml)
bei Xunit.TestClassCallbackHandler.OnXmlNode(XmlNode xml)
bei Xunit.XmlNodeCallbackHandler.System.Web.UI.ICallbackEventHandler.RaiseCallbackEvent(String eventArgument)
bei System.Web.UI.ICallbackEventHandler.RaiseCallbackEvent(String eventArgument)
--- Ende der internen Ausnahmestapelüberwachung ---
bei System.RuntimeMethodHandle.InvokeMethod(Object target, Object arguments, Signature sig, Boolean constructor)
bei System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object parameters, Object arguments)
bei System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object parameters, CultureInfo culture)
bei Xunit.Sdk.ExecutorCallback.CallbackEventHandlerCallback.Notify(String value)
bei Xunit.Sdk.Executor.OnTestResult(ITestResult result, ExecutorCallback callback)
bei Xunit.Sdk.Executor.RunTests.<>c__DisplayClass12.<.ctor>b__11(ITestResult result)
bei Xunit.Sdk.TestClassCommandRunner.Execute(ITestClassCommand testClassCommand, List`1 methods, Predicate`1 startCallback, Predicate`1 resultCallback)
bei Xunit.Sdk.Executor.ThreadRunner(Object threadStart)
bei System.Threading.ThreadHelper.ThreadStart_Context(Object state)
bei System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, B
After upgrading to Version 0.99.0 from Version 0.9.5.4, my xUnit.net tests completely refuse to run. The first one gets a green arrow, and then nothing more happens. Tried creating a new empty solution. MsTests work fine. My development flow is now completely crippled! Is there a way to quickly downgrade?
I was able to download the ASP.NET WebStack source code, which contains ~ 14k tests written in xUnit.net 1.9.1, and they discovered and ran fine with the 0.99.0 runner in VS2013.
I then upgraded the tests to use xUnit.net 1.9.2, and once again, they all discovered and ran correctly.
Can either of you provide a repro project that demonstrates the problem you're having?
Hi, got the exactly same problem
i can reproduce on any solution - even empty, with an empty test method - co i guess it could be a visual studio configuration problem or something like that
when debuging i get an exception thrown after the end of the test
- details http://pastebin.com/uT3PH7hu
also couldn't find the symbols for xUnit 1.9.2 so i could debug further are they located anywhere public? (i know i could build mine, but that's not the same)
Thank you. The Codeplex link did the job, and now everything works ok again.
I can confirm that I get the same exception. I have provided the test project I used (although I can also reproduce this with ANY test). I have also provided an IntelliTrace file of the exception.
Please note that when running the test normally (not debugging it), no exception is reported. The test just hangs.
On a sidenote, the test NAME is different in the 0.99 version. Instead of just the local method name, I get the whole qualified method name. (Which pretty much makes it impossible to read the most significant part if you have Test Explorer docked in the default fasion.)
I can confirm that I have the same issues running VS2013 on Win8.1, xunit runner 0.99:
01) Tests hang - the first one gets a green arrow but then nothing happens;
02) Test names are full qualified name in stead of just the method name.
The TargetInvocation issue will be fixed in 0.99.1.
The test name will be configurable in 0.99.1 (and default back to the short name).
I an new to VS and xunit. I had created two tests in two separate files, when tried to run 'All Tests' only test present in one file got executed, other test didn't execute, can someone please let me know how to do that
We have solution with unmanaged c project that we test from managed c# code using xunit via c# interop wrapper. We're using tests that are defined as unsafe. After running tests and changing something in c# code build fails with following error: 'The command "copy C:\devel\project\Debug C:\devel\project\managed.Tests\bin\Debug\*" exited with code 1.'. Try to manually delete c:\devel\project\managed.Tests\bin\Debug\unmanaged.dll ends with system error 'Cannot delete file, because file is open in vstest.executionengine.x86.exe' (it may not sound like that in english version of windows, it's loose translation from my native language :)). The solution is to close visual studio and open it again, then build succeeds. Resharper runner works fine, on the other hand.
Thanks for awesome piece of software, we're using it extensively, it's the only problem we've with it.
Have you tried with the latest runner? This problem may be solved now through a different bug fix (we now automatically shut down the VS execution engine after running tests, which should unlock all DLLs).
I’m having a problem with running all xUnit.net tests in the solution. Test runner terminates with out of memory exception and in the Task manager I can see that vstest.executionengine.exe memory usage constantly grows and finally the process crashes. There are about 4000 tests, we are doing lot of mocking with Moq and ninject automocking kernel, somehow I suspect that's the guilty party for this.
But, when I try to run same tests inside Resharper Unit test session, all tests are run successfully without any excessive memory usage.
When the TFS build is configured to run the tests, same thing happens on the build server machine, out of memory.
My question would be, is there something we could configure so that VS test runner behaves the same as Resharper test runner so that we can run these tests as part of TFS build?