-
Notifications
You must be signed in to change notification settings - Fork 156
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
NUnit/FsCheck.NUnit does not work with mono #115
Comments
No, not known to work to me at least - and that error message seems to indicate that the FsCheck NUnit addin is not being loaded. Try installing the vanilla NUnit 2.6.x runners and check if it works with that in the first instance. By the way, this wouldn't surprise me - NUnit is extremely picky with loading addins. I hope their story improves a lot with NUnit 3. The structure is basically one big workaround to force the NUnit Visual Studio addin to actually load the FsCheck addin. |
I've already been using NUnit with Sounds like I may need to look into running tests from the command line. Should that work? |
Yes, trying cmd line is what I meant. |
Thanks, I'll give that a try.
Is there anything in the works for v3? The beta release notes say:
|
Yes, something is in the works, see #98. |
Can you try with FsCheck.NUnit 2.0.4 which I just released. See #117, basically I fucked up 2.0.3... |
I'm having the same issue with 2.0.4 so I thought I'd try cloning the repo and running the FsCheck.NUnit tests in the examples. I never got that far due to the following build errors:
|
FWIW, in my project's tests I added this at the end of the file: [<assembly: RequiredAddin("FsCheck addin")>]
do() The tests were all still ignored but this time the message was:
|
Ok, thanks for trying all that! I'm hopeful we'll get this to work but unfortunately there seem to be a bunch of issues. Did it run with the command line runner? To build FsCheck, I think maybe paket/package restore hasn't kicked in correctly. Can you try running ./build.sh from the root folder. If that doesn't work send the output of it. For using FsCheck.NUnit NuGet in your project, please send:
|
I had trouble with that too, but should have it figured out soon: https://twitter.com/dotb52/status/623383545973731328 |
I had to make the bash script executable first by doing
After that the projects would build but the NUnit example tests failed in Xamarin Studio with:
|
I tried:
but got the following output:
There was also a stack trace. |
I managed to get something to run from the command line by running:
but all I got was this:
|
As for providing an example project, I think if we can get the examples to work that would be a good start. |
See #113, although it's beyond me why that would work. But if it does, and it works for VS also, might as well use it going forward - we could get rid of the install.ps1 in that case. With the command line runner, you probably have to put FsCheck.NUnit.Addin in bin/addins or some crazy shit like that. http://nunit.org/index.php?p=nunitAddins&r=2.6.4 |
The compile warnings are just warnings, nothing to worry about. Have a look at the travis build if you want to compare. |
I added the
|
I believe this should be unnecessary since NUnit is supposed to load Addins it finds within test assemblies, but I did it anyway and got the same results. I'm not totally sure it was even being found or loaded. |
Yeah, I see the exact same behavior with mono under windows. No idea what to do about it though. The xunit runner works fine. Also no idea why it says "runtime version not supported", bloody useless error message (at least it could us which version it needs, or something.) |
I just managed to get my (non-FsCheck) tests running from the command line by adding the
I then added FsCheck and wasn't able to build the test project due to errors in
The test suite builds again but unfortunately I'm seeing the same message in the console:
|
I tried this approach with the examples project. I ran this:
and got this output:
|
It dawned on me that this is almost certainly the same Mono bug we're waiting for in the xunit 2 thread #86 #97. This has to do with AppDomain support in mono, though I don't know specifics (the commandlines above all work with .NET, btw). Anyway, try the following which did something for me:
|
I get this:
|
It works if I use |
Yes, one is expected to fail. Same Mono bug then, reportedly fixed in Mono 4.3. |
The problem now is that everything I'm trying to test fails with I think I may need to resort to using Xunit for now, but also happy to keep debugging. |
Sure, don't know what else to try really. |
To clarify, those errors appear to be a result of using |
Marked as up-for-grabs since I neither use NUnit or mono (though the latter may change shortly-ish, the former will not) so I won't be actively debugging this. Happy to make changes to support this though. |
Could you try with NUnit 3 and FsCheck.NUnit beta, as explained in #98. I expect it to get rid of a bunch of these gnarly dependency issues. |
Going to close this as we're moving to NUnit 3 anyway, so I don't expect anyone to really look into this further. Please test #98 though, |
Is FsCheck.NUnit known to work in Xamarin Studio on OS X?
I've structured my tests as in the examples but none of them run and all produce the following message:
The text was updated successfully, but these errors were encountered: