AutoBogus
fsharp-hedgehog
AutoBogus | fsharp-hedgehog | |
---|---|---|
2 | 5 | |
418 | 270 | |
- | 0.0% | |
0.0 | 6.7 | |
over 1 year ago | 9 months ago | |
C# | F# | |
MIT License | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
AutoBogus
-
Best practices for organising Mock Data & Repositories in Testing
To do all this you need test though...and that's where ]Bogus](https://github.com/bchavez/Bogus) and Auto Bogus come in handy. They both generate semi random test data that you can use to populate whatever method you've decided to use. You can setup rules so for specific fields, they have built in generators for common things like names and addresses. Auto Bogus can be used to populate large/complicated objects with data automatically (it can be slow if you don't use .WithRecursiveDepth() or.WithTreeDepth() )
-
LPT: There is a library called Bogus, you should know it exists much earlier than I did in my career.
Just be careful, this is an outstanding bug in this library that's been going on for years. If you try to dummy up an object with a large amount of properties, it ends up in some sort of deadlock (or just takes an extremely large amount of time). People seem to have also reproduced it with properties marked virtual. I sometimes deal with 3rd party vendor libraries and it would had been nice to be able to use this with the worst offenders.
fsharp-hedgehog
-
Resources to learn the F# ecosystem
Unit testing: I personally use FsUnit, specifically FsUnit.Xunit. There's some other libraries like Expecto and Hedgehog (property testing), but I haven't found a reason to use them. I recently started experimenting a little with Hedgehog. FsUnit integrates well into Visual Studio, since it sits nicely on top of NUnit and xUnit, and it's done everything I've needed so far.
-
What are you working on? (2021-06)
Looks cool. Is there a reason why you didn't use FsCheck or Hedgehog? They're built to generate random data for testing, and can return the seed if a test fails so you can rerun the test with the exact same data once you figure out what the problem is - which is useful if the failure condition is rare.
-
Mutation Testing
Haskell has QuickCheck and Hedgehog, and dotnet has both as well. F# is favored, but there's C# interop.
-
LPT: There is a library called Bogus, you should know it exists much earlier than I did in my career.
Dotnet has FsCheck and Hedgehog. Both are primarily aimed at F#, but C# is supported as well.
-
In praise of property-based testing
Hedgehog
What are some alternatives?
Json.NET - Json.NET is a popular high-performance JSON framework for .NET
FsCheck - Random Testing for .NET
fsharp-hedgehog-xunit - Hedgehog with convenience attributes for xUnit.net
CsCheck - Random testing library for C#
Bogus - :card_index: A simple fake data generator for C#, F#, and VB.NET. Based on and ported from the famed faker.js.
eShopOnContainers - Cross-platform .NET sample microservices and container based application that runs on Linux Windows and macOS. Powered by .NET 7, Docker Containers and Azure Kubernetes Services. Supports Visual Studio, VS for Mac and CLI based environments with Docker CLI, dotnet CLI, VS Code or any other code editor. Moved to https://github.com/dotnet/eShop.
MiniZinc.Net - MiniZinc <-> .NET
finnhub-dotnet - A .NET client for Finnhub API
proptest - Hypothesis-like property testing for Rust
Expecto - A smooth testing lib for F#. APIs made for humans! Strong testing methodologies for everyone!
StereoDB - Ultrafast and lightweight in-process memory database written in F# that supports: transactions, secondary indexes, persistence, and data size larger than RAM.