2.3.2 Testing Flashcards
Testing
“Assessing the performance and functionality of a program under various conditions to make sure it works. Programmers need to consider all the devices the program could be used on and what might cause it to crash.”
Iterative testing
“Each module of a program is tested as it is developed.”
Syntax error
“Rules of the language have been broken, so the program will not run. Variables not being declared before use. Incompatible variable types (e.g., sum = A); using assignments incorrectly (e.g., 2 + 2 = x); keywords misspelt (e.g., PRNT(“Hello”)).”
Logical error
“The program runs but does not give the expected output. Division by zero. Infinite loop. Memory full. File not found.”
Test data
“Values used to test a program – normal, boundary and erroneous.”
Test data: Normal
“Data supplied to a program that is expected. Using a program written to average student test scores as an example, if allowed scores are 0 – 100, normal test data would include all the numbers within that range.”
Test data: Boundary
“Data supplied to a program designed to test the boundaries of a problem. Using a program written to average student test scores as an example, if allowed scores are 0 – 100, boundary test data could be -1, 0, 1, 99, 100 and 101.”
Test data: Invalid
“Data of the correct type but outside accepted validation limits. Using a program written to average student test scores as an example, if allowed scores are 0 – 100, invalid test data could be -5, 150, etc.”
Test data: Erroneous
“Data of the incorrect type that should be rejected. Using a program written to average student test scores as an example, if allowed scores are 0 – 100, erroneous data might be the string “hello”, the real number 3.725, etc.”