Types of errors. Testing.

Syntax error or Compilation error are the most common error occurred due to typing mistakes or if you don't follow the proper syntax of the specific programming language. 

Examples:

  • missing brackets, eg opening a bracket, but not closing it

  • missing semicolon

  • errors in the sequence of expressions

Runtime error (Execution error)Run Time errors are generated when the program is running and lead to abnormal behavior or termination of the program. The general cause of Run time errors is because your program is trying to perform an operation that is impossible to carry out.

Example: 

  • Dividing any number by zero, 

  • Accessing any file that doesn't exist,

  • Negative value under a square root,

  • Calling invalid functions,

  • Not handling certain input correctly (ex. not appropriate data type),

  • Out of bounds of array indices.

Logical error. The logical error will cause your program to perform undesired operations that you didn't intend your program to perform. These errors occur generally due to improper logic used in the program.

Examples: 

  • errors in the performed computation, eg. using multiplication (a * b)  instead of adding (a + b)

  • errors in the performed condition, eg. using "<" instead of "<="

  • unintentionally creating a situation where an infinite loop may occur

  • incorrectly using brackets in calculations

  • unintentionally using the same variable name at different points in the program for different purposes.


Normal data is test data that is typical (expected) and should be accepted by the system.

Extreme data is test data at the upper or lower limits of expectations that should be accepted by the system.

Erroneous data is test data that falls outside of what is acceptable and should be rejected by the system.



Последнее изменение: Thursday, 18 April 2024, 12:56