...
/Limits of Property-Based Testing
Limits of Property-Based Testing
Let's learn the limitation of property-based testing.
We'll cover the following...
A property verifies invariants of our code, that is, properties of our code that stay the same regardless of the input. Sometimes, the wrong code can maintain the same invariants that we’re testing.
1.
Are properties enough to ensure that our code works and behaves correctly?
Show Answer
Q1 / Q1
Did you find this helpful?
Example
Let’s see an example. Imagine we have a property that asserts that when we concatenate two strings, then we can use String.contains?/2
to verify that the concatenated string contains both the ...