-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tests not being picked up by Visual Studio #6
Comments
@idg10 would you be able to help? |
Hi, sorry, I somehow missed the original notification. I'll take a look. I've not been able to use F# in production for a while, so I've not actually looked at this for some time. It's quite possible that it just doesn't work right now with .NET Core 2.1. Will look at it now. |
OK, a couple of things:
To deal with 1, you'll need to change your project's target framework to some version of .NET Framework, rather than .NET Core, e.g., change your test project <TargetFramework>net472</TargetFramework> Also, modify your test thus: open Fuchu
[<Tests>]
let simpleTest =
testCase "A simple test" <|
fun _ -> Assert.Equal("2+2", 4, 2+2) However, that alone won't be enough, because it appears that my test adapter is encountering exceptions from the 'Cecil` library it uses, and I've not yet worked out why. |
The library has very few dependencies. It supports dotnet core as can be seen here: https://github.com/mausch/Fuchu/blob/master/Fuchu/Fuchu.fsproj#L4 |
The version on NuGet doesn't. That file in GitHub didn't support it at the time I wrote the earlier comment - it looks like you added support for .NET Standard 2.0 about 3 weeks after I wrote that comment, which is great, but until that change makes it out to a version accessible through NuGet I don't think I can do anything. |
Let's fix that then. 😄 |
Is this better: https://www.nuget.org/packages/Fuchu/1.1.0 ? |
OK, and only slightly over a year later there's a preview. Fuchu.Adapter 2.0.0-preview.4 is now up on NuGet (well, it's "validating" right now, but should be visible soon) and works with modern-style projects. More work is required before we can get to a non-preview release. (It currently spews out a lot of debug info into the Test Output window, and there's also #11 to be dealt with, for example. And also quite a lot of TODOs in the code.) But basic support for .NET Core, and building on current versions of things is in place. |
That's cool! |
Hi, I'm pretty new to the .NET world but my tests are not being picked up by VS. I've tried it in both VS2017 and VS2019 Preview.
I'm using .NET Core 2.1.
This is my test, copied straight from the Fuchu docs:
I have installed both Fuchu and Fuchu.Adapter via Nuget into my test project. Other tests I've got using XUnit and UnQuote are being picked up and run fine.
Am I missing anything?
The text was updated successfully, but these errors were encountered: