Closed ArtemyB closed 7 years ago
Thanks @ArtemyB !
I believe this is due to new versions of Expecto. I will update soon.
@ArtemyB can you try the latest version please?
@ArtemyB Sometimes the Visual Studio VSIX Test adapter integration can be tricky. If you are still getting the same exception then close VS and remove the previous Expecto.VisualStudio.TestAdapter folders from %TEMP%\VisualStudioTestExplorerExtensions\
.
I'm now getting the following error message:
------ Load Playlist started ------
========== Load Playlist finished (0:00:00,0039991) ==========
------ Discover test started ------
System.InvalidOperationException: Die Sequenz enthält keine Elemente.
bei System.Linq.Enumerable.Single[TSource](IEnumerable`1 source)
bei <StartupCode$Expecto-VisualStudio-TestAdapter>.$Discovery.DiscoverTests@81-2.Invoke(FlatTest flatTest)
bei Microsoft.FSharp.Collections.IEnumerator.map@111.DoMoveNext(b& )
bei Microsoft.FSharp.Collections.IEnumerator.MapEnumerator`1.System-Collections-IEnumerator-MoveNext()
bei System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
bei Microsoft.FSharp.Collections.SeqModule.ToArray[T](IEnumerable`1 source)
bei Microsoft.FSharp.Collections.ArrayModule.OfSeq[T](IEnumerable`1 source)
bei Discovery.DiscoverProxy.DiscoverTests(String source)
bei Discovery.Discoverer.Microsoft-VisualStudio-TestPlatform-ObjectModel-Adapter-ITestDiscoverer-DiscoverTests(IEnumerable`1 sources, IDiscoveryContext discoveryContext, IMessageLogger logger, ITestCaseDiscoverySink discoverySink)
========== Discover test finished: 0 found (0:00:00,7852373) ==========
Sorry, for the German error message. It means: "The sequence is empty"
Do you have any async test? (I could repro the problem with adding testCaseAsync to the test cases. )
I think expecto-adapter does not support async test currently, but I created a new issue for that #4.
Yes indeed, I have async tests. After commenting them out it works. Good catch!
@adamchester I've tested it on the very simple test project and it works. 🎉 However it still doesn't work with the project I'm currently working with. But the errors are different. I'll try briefly describing what the tests are.
The project uses C++ graph DB library with .NET bindings (Sparksee to be precise). During the tests a DB (and a file for it) is created. It also requires some not-.NET DLLs to be linked. While running the tests as a console app all is ok, but during the test discovery process the exceptions appears: System.Reflection.TargetInvocationException --> System.TypeInitializationException --> System.IO.IOException
. So as I understood it can not create a file for DB.
I'm not sure that these explanations suffice, so if you need more details I'll provide it. And thank you for the update. 🙂
@mgyongyosi ok, thank you. I am not getting the same exceptions for now, but the details you've provided could be useful someday. 🙂
@ArtemyB thanks for the feedback! I'm keen to understand the problem you described in more detail.
Any chance you raise a new issue with instructions on how to reproduce it?
That what I get in Output:
Couldn't figured out by myself how to solve the problem. :c