property-based_testing
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| property-based_testing [2025/09/09 19:17] – plida | property-based_testing [2025/09/09 19:18] (current) – plida | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| ====== Property-based testing ====== | ====== Property-based testing ====== | ||
| - | PBT is an approach to testing in which we test the properties of a function rather than individual examples. Instead of a single test with specific input data, the framework generates hundreds of random cases. | + | PBT is an approach to [[software_testing|testing]] in which we test the properties of a function rather than individual examples. Instead of a single test with specific input data, the framework generates hundreds of random cases. |
| ==== Strengths of PBT ==== | ==== Strengths of PBT ==== | ||
| Line 17: | Line 17: | ||
| - Don't overuse PBT: for complex business logic, you also need regular tests. | - Don't overuse PBT: for complex business logic, you also need regular tests. | ||
| - Use a fixed seed for reproducibility. | - Use a fixed seed for reproducibility. | ||
| - | - Combine PBT with random-based and sample tests. | + | - Combine PBT with [[random-based_tests|random-based]] and sample tests. |
property-based_testing.1757445448.txt.gz · Last modified: by plida
