Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Better Workaround for FsCheck Integration
CalvinDale
#1 Posted : Friday, August 21, 2015 9:03:24 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 3/23/2012(UTC)
Posts: 6
Location: Vancouver, WA

Thanks: 1 times
Just curious if there might be another (better) way to get NCrunch to work with FsCheck than the technique outlined here: http://simonhdickson.github.io/blog/2013/11/16/fscheck/

“Side note
I probably should point out that I have had some problem with using FsCheck, if you have you're using NCrunch you might notice the tests don't get picked up. However, I have found that if you include the following code in your module it works:

Code:
[<Fact>]
let ``ignore this test`` () =
    ()

This (for some reason) causes NCrunch to see all the other tests too.”


Indeed this technique works; but it would be nice not to have to add the extra test to every file.
Remco
#2 Posted : Friday, August 21, 2015 10:21:28 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
Hi,

It's possible that someone may have found a way, but to my knowledge at the moment there is no other way. The reason for this is because of the way the compiler binds dependencies into assemblies. For NCrunch to detect the presence of a test framework, an assembly/project must reference known binaries from this test framework.

This creates problems when working with derivatives/extensions of test frameworks that don't use the original binaries. Although FsCheck does depend on xUnit, your code won't reference the xUnit binaries unless you declare a dependency somewhere (as you have done above).

I haven't yet found a satisfactory way of solving this problem that doesn't annihilate the performance of the NCrunch engine.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.033 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download