I want to integrate FsCheck tests with NUnit tests. Specifically, when I declare several FsCheck properties, I want them to be visible and runnable from the VS runner. I have found the following description of xUnit usage alongside FsCheck (under "Implementing IRunner to integrate FsCheck with mb|x|N|cs|Unit"), but this is not what I want. Is there a way to do it?
FsCheck and NUnit integration
1.1k Views Asked by Lakret At
2
There are 2 best solutions below
0
roundcrisis
On
Just for reference, there is now a FsCheck.Nunit integration nuget package It works for F# 3.1 only (at the moment)
Usage:
Add the nuget package (it will add also a file into the project that is expected)
[<Property>]
let maxLe (x:float) y =
(x <= y) ==> (lazy (max x y = y))
if you want verbose output you can add Verbose = true to the Property attribute
Related Questions in .NET
- Does compiler optimize operation on const variable and literal const number?
- What is the point of definnig Asp.net Intrinsic Objects In different places and what is the different betwen them?
- Deleting Orphans with Fluent NHibernate
- IOrderedEnumerable to vb.net IOrderedEnumerable Conversion
- What is this namespace ITypeOfObjectsBoundToListBox ? Couldn't find it
- .net rest service with JSON string and consumed with java client
- What is best way to check if any of the property of object is null or empty?
- Telerik's WPF RadColorPicker NoColorText property not working
- Possible consequences of duplicate ProgId for different classes
- How are multiple requests to Task.Run handled from a resource management standpoint?
- Optimizing C++ call from C#
- Make a per-web-application object available to Web API and SignalR controllers
- System.ComponentModel.DataAnnotations.Schema namespace conflict
- LINQ Except/Distinct based on few columns only, to not add duplicates
- Not displaying content by its URL string - absolute urls
Related Questions in UNIT-TESTING
- How to write tests for classes with inheritance
- PHPunit call magic methods
- Convert IEnumerable to IObservable with variable Period
- How to a run specific code before & after each unit test in Python
- Unit testing a class A that derives from an abstract class B
- Is there another way to unit test business logic in mvc
- Some of my tests show prepended with junit.framework
- Selenium Driver Service not found exception
- Can not convert from Class<PowerMockRunner> to Class<? extends Runner>
- AngularJS Unit Testing - multiple mocks and providers
- How to use Sinon.js FakeXMLHttpRequest with superagent?
- Get Mock with AutoMock.Create<>()
- Mock service that takes unitOfWork in constructor
- Cleanest method for creating a pytest test fixture that takes in dynamic text data
- g++ 5.1.0 not building project, clang shows unknown error
Related Questions in F#
Related Questions in NUNIT
- How to programmatically tell NUnit to repeat a test?
- how to ignore a RUN test
- How to test MvvmCross MvxCommand<int> with NUnit
- How does Nunit generate TestResult.xml
- Fake calling Namespace to test reflection
- Change name of NUnit test
- When selenium test runs by Jenkins and nUnit, the browser doesn't come up however there are valid results
- I cannot debug two projects at once - one with Resharper NUnit tests
- TeamCity - The process cannot access the file * because it is being used by another process
- Nunit runsTestCase with a TestCaseSource with the first iteration having no parameters? Why?
- NUnit TestFixture with no-arg constructors
- Role Manager not enabled. Even after changing web.config
- NHibernate SchemaExport.Execute does not create table
- Why are nUnit tests just getting ignored when using TestCaseSource?
- Dependencies in Unit Tests
Related Questions in FSCHECK
- How to easily filter out a discriminated union case in FsCheck?
- FsCheck test change the range of values used for testing
- Testing a list of types with FsCheck
- Is FSCheck suitable for testing type construction?
- Scoping contant FsCheck generator to each test
- Best way to generate random indices into an array?
- how to check if a path is well formed with FsCheck in FSharp
- How to pass FsCheck Test Correctly
- FsCheck and NUnit integration
- How do I just generate data with fscheck?
- Can't figure out how to make a generator from a generator
- FsCheck Generator for List with Pairwise Restrictions (C#)
- How to run the specific test on FsCheck using replay?
- How to add explicit edge cases to a generator / arbitrary in FsCheck w/ C#?
- How do I make use of FsCheck custom generators from C#?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Can you elaborate why using that is not what you want? That's the way to feed the result of an FsCheck test back to NUnit. You'd write FsCheck tests much like normal NUnit tests, and attribute them with a Test attribute (or whatever the name is in NUnit).
If you want tighter integration with NUnit, you'll have to become familiar with the NUnit plugin model. NUnit integration is next up on my todo list. For an example of how to integrate with XUnit.NET, have a look at the FsCheck.Xunit project in the source. From the FsCheck side, it should be fairly similar, but NUnit's plugin model is fairly different from XUnit's.