3 ms·
You can combine the model with property-based testing of that code to essentially try your model on the code and vice versa. You might also encode some of your
by nickpsecurity 9y ago
You can combine the model with property-based testing of that code to essentially try your model on the code and vice versa. You might also encode some of your expectations in there as preconditions, invariants, or postconditions that are checked at runtime during the tests. Throw a fuzzer like AFL at them.
Hwayne has write-ups on both of those concepts:
learntla.com
https://hillelwayne.com/post/pbt-contracts/ https://hillelwayne.com/post/pbt-contracts/
Here's one on contracts that even your management might like:
https://www.win.tue.nl/~wstomv/edu/2ip30/references/design-by-contract/index.html https://www.win.tue.nl/~wstomv/edu/2ip30/references/design-b...
- seattleeng 9y agoProperty-based testing seems to be an interesting idea and fairly easy to trial and then recommend to my teammates. The js library I stumbled upon even has TypeScript support and plays nicely with mocha, both of which are directly relevant to my work (https://github.com/jsverify/jsverify https://github.com/jsverify/jsverify)!