CsCheck specification testing

a month ago by AnthonyLloyd to c/dotnet

Random testing library for C#. Contribute to AnthonyLloyd/CsCheck development by creating an account on GitHub.
zetroot 1 point a month ago path: 0 25963351, hotness: undefined, score: 1, children: 3
AnthonyLloyd 1 point a month ago

This is a feature specification testing just added to CsCheck. FsCheck doesn't have something similar.

CsCheck and FsCheck cover the same sort of testing areas but do things in very different ways. I'd say CsCheck is more complete but I'm biased.

path: 0 25963351 25964110, hotness: undefined, score: 1, children: 2
zetroot 2 points a month ago

@AnthonyLloyd
I definitely should try it. I've been doing some property based testing with FsCheck from time to time for the past 5 years and i find it a thing from another world. Too much F# and academia;-) Not for "bloody enterprise", lol.

path: 0 25963351 25964110 25968596, hotness: undefined, score: 2, children: 1
AnthonyLloyd 1 point a month ago

It can be the very best tool sometimes. If you have a property to test, or if you have an oracle, or a brute force method. For example you want to refactor a complex method. Just take a copy of that method in the tests as the oracle and set up a Sample test so that they always agree and refactor away. You can also put a Faster test on it at the same time and prove it's 3x faster say. It's just more robust than a few examples.

path: 0 25963351 25964110 25968596 25970021, hotness: undefined, score: 1, children: 0
dotnet
dotnet

@programming.dev

login for more options
1884
591
13

Getting started

Useful resources

IDEs and code editors

Tools

Rules

  • Rule 1: Follow Lemmy rules
  • Rule 2: Be excellent to each other, no hostility towards users for any reason
  • Rule 3: No spam of tools/companies/advertisements
  • Rule 4: Submit the original source. If a post reports on something found on another site, submit the latter

Related communities

Wikipedia pages

go to feed...