Thursday, 6 February 2014

Testing code

Errors can include syntax errors, where you spell I wrong or forget to declare variables before use.
Another is logical errors, such as division by zero, infinite loops.

To test it, identify suitable test data and an expected outcome.
Test data is valid for extreme end of acceptable inputs.
Test data is out of range and should be rejected.
Test data that is invalid but only just on the limit of being unacceptable.
Erroneous, wrong type of input.