Performing negative testing
Testing changes always come in two parts: was the entity changed correctly, and was everything else left unchanged? That second aspect can sometimes be overlooked, so ensure you include it in your testing. For every positive test case you write, consider the equivalent negative case; here is an example:
- If one user is deleted, are other users still available?
- Does a user have the access they should and are they barred from areas they shouldn’t have access to?
- Is the configuration updated correctly, and are the other configuration options unchanged?
We already saw the catastrophic example of the missed WHERE
clause. The positive test for that change passed – the faulty customer did have their conference number updated. The only problem was that all the other numbers in the cloud were changed simultaneously. This is a problem when it’s unclear how widely the configuration is used. A setting might be local to one...