Groovy testing with Combinations and Permutations
https://groovy.apache.org/blog/testing_permutations_combinations
/CC @PMinborg @jqwik @ApacheGroovy @pavelicii @foojay @spockframework @jlink
#groovylang #combinations #permutations #allpairs #propertybasedtesting
#groovylang #combinations #permutations #allpairs #propertybasedtesting
π₯³ Just released @βfast-check/vitest to simplify integration of fast-check with @vitest and make usage of #PropertyBasedTesting even simpler in #vitest π₯°
#NPM package available at: https://www.npmjs.com/package/@fast-check/vitest
If you're interested into pushing such integration further, join the discussion opened on vitest side: https://github.com/vitest-dev/vitest/discussions/2212
#propertybasedtesting #Vitest #npm
Practical example of #PropertyBasedTesting in #TypeScript, using fast-check to test a sorting algorithm: https://github.com/dubzzz/fast-check/blob/main/packages/fast-check/documentation/HandsOnPropertyBased.md
#propertybasedtesting #typescript
So this is the sort of bug that randomized testing is really good at finding. Out of curiosity, what are the barriers to making it standard practice to use #PropertyBasedTesting for assembly code? The oracle is easy, it's just an equivalent written in not-assembly code.
https://www.phoronix.com/news/Linux-m68k-strcmp-Always-Broken
One of the neat little synergies between #PropertyBasedTesting and #Fuzzing is that you can use proptest to generate very high-quality seed corpuses for mutation fuzzers. Generating a large, complex seed corpus can give any mutation fuzzer a massive head-start!
I just created https://github.com/nextest-rs/nextest/pull/718 which fuzzes the filter expression parser using this technique.
#propertybasedtesting #fuzzing
An enduring puzzle is the lean pub book #PropertyBasedTesting booklet I cowrote still sells the occasional update. It says 20% complete, last update celebrates its' seventh birthday three days from now... (no one has returned it as far as I can tell, but also no other feedback).
#AdventOfPBT #Day5 π π
Wanna try #PropertyBasedTesting with #FastCheck? Everything is ready for you on codesandbox! https://codesandbox.io/s/advent-of-pbt-day-5-6ekxo?file=/src/index.spec.ts&previewwindow=tests
π‘ Tip: With Property Based, try to think out of the box. Don't try to generate the precise inputs expected by your functions but some data making you able to generate ins and outs at the same time. Or at least know a bit on the outs.
π Today's topic: respace
π₯ Answer tonight!
More details: https://dev.to/dubzzz/advent-of-pbt-2021-day-5-3227
#adventofpbt #day5 #propertybasedtesting #fastcheck