Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/anderscan/fast-check-workshop
fast-check-hero-workshop
https://github.com/anderscan/fast-check-workshop
Last synced: about 1 month ago
JSON representation
fast-check-hero-workshop
- Host: GitHub
- URL: https://github.com/anderscan/fast-check-workshop
- Owner: AndersCan
- License: gpl-3.0
- Created: 2019-08-21T20:46:42.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-09-18T14:26:04.000Z (over 5 years ago)
- Last Synced: 2024-10-23T08:25:46.200Z (3 months ago)
- Language: TypeScript
- Size: 68.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fast-check-workshop
fast-check-hero-workshop> Program testing can be used to show the presence of bugs, but never to show their absence!
> -Edsger W. Dijkstra# Glossary
## Property
> Property: an attribute, quality, or characteristic of something.For example, a property of the function below is that it always returns `0`.
```javascript
function getZero() {
return 0;
}
```## Unit testing vs Property testing
> Unit test — testing with constants (static)
> Property test — testing with variables (dynamic)## Arbitrary
Think of this as a your _variable (random value)_. An _arbitrary_ is what you will use as input.In reality it is a value that you can shrink and seed.
## Bias
> Smart: biased by default - by default it generates both small and large values, making it easier to dig into counterexamples without having to tweak a size parameter manually## Shrinking
After finding a failing case, attempt to `shrink` the arbitrary value(s) and produce another failing case.Used to find the _minimal counterexample_
## Seed
Seeding a `random` function with the same seed will make it repeat the same output for every run.# Model based testing
A model is a simplified/abstract version of a real system.Ref: [Model based testing](https://github.com/dubzzz/fast-check/blob/master/documentation/1-Guides/Tips.md#model-based-testing-or-ui-test)