Friday, April 24, 2009

Program Testing

 A program represents the logical elements of system. For a program to run satisfactorily, it must compile and' test data correctly and tie in properly with other programs. Achieving an error-free program is the responsibility of the programmer. Program testing checks for two types of errors: syntax and logic. A syntax error is a program statement that violates one or more rules of the language in which it is written. Improperly defined field dimension or omitted key words are comma syntax errors. These errors are shown through error messages generated. The computer. A logic error, on the other hand, deals with incorrect data fields, out-of-range items, and invalid combinations. Since diagnostics d not detects logic errors, the programmer must examine the output carefully for them.

When a program IS tested, the actual output is compared with expected output. When there is a discrepancy, the sequence of instructions must be traced to determine the problem. The process is facilitated by breaking the program down into self-contained portions, each of which can be checked at certain key points.The idea is to compare program values against desk-calculated values to isolate the problem.

No comments:

Post a Comment