Testing and debugging refer to the activities of detecting and eliminating errors in a program, so the program produces the desired result on all events. Every programmer should be conscious of the fact that rarely does an app run perfectly the first time. No matter how thoroughly the design is performed, and however much care is taken in coding, one cannot say that the program would be 100 percent error-free. It is therefore essential to make efforts do detect, isolate, and fix any mistakes that are likely to be within the program.
Kinds of Errors
There might be other mistakes, Some obvious and others not so obvious. All these mistakes can be categorized under four kinds, namely, syntax errors, run-time errors, logical errors, and grammatical mistakes.
Syntax error: Any breach of rules of the language leads to syntax errors. The compiler can detect and isolate these mistakes. When syntax errors are found, the compilation fails and is terminated after listing the mistakes and the line numbers in the source application, where the errors have occurred. Bear in mind, in some instances, the line number may not precisely indicate the area of the error. In other instances, on syntax error might cause a long list of mistakes. Correction of a couple of errors at the start of the program may eliminate the whole list.
Run-time errors: Errors such as a mismatch of date types or referencing anti debugging an out of array element go unnoticed by the compiler. A program with these errors will run, but produce erroneous results and for that reason, the name run-time mistakes are given to such mistakes. Isolating a run-time mistake is generally a tricky task.
Logical errors: As the title implies, these errors are associated with the logic of the program implementation. Such activities as taking a wrong path, failure to look at a specific condition, and erroneous order of evaluation, of statements belong to the category. Logical errors do not appear as compile-generated error messages. Instead, they cause erroneous results. These errors are primarily because of poor comprehension of the issue, incorrect translation. Of the algorithm to the program.
Testing is the process of assessing and executing a program with the intention of detecting errors by anti debugging, which might be fit to any of the four types discussed above. We are aware that while the compiler can detect syntactic and semantic errors, it cannot detect run-time and logical errors that appear during the implementation of the program. Testing, therefore, should contain necessary actions to detect all possible errors in the program. It is, however, important not to forget it is impractical to obtain all errors.