Preview lessons, content and tests

Computer Science & Programming solved. All in one platform.

1. To trial the platform and take tests, please take a few seconds to SIGN UP and SET UP FREE.
2. Searching for something specific? See our text overview of all tests. Scroll right for levels, and lists.

Join 36000+ teachers and students using TTIO.

Testing, purpose and types

When first written, many programs contain bugs (errors). The purpose of testing is to help the programmer remove such bugs and to ensure that the program functions as intended.

There are different types of testing:

  • Iterative testing is carried out while a program is being developed. The programmer writes a section of code (module) then tests it. The module may work fine, but more likely the programmer will amend or fix the code, and test it again. The process repeats (iterates) until the module works as intended.
  • Final (terminal) testing is carried out when all modules are complete and the program is tested as a whole to ensure that it functions as it should.

Suggested video

Types of Errors (Programming)

We distinguish between the following types of errors:

  • Syntax errors: errors due to the fact that the syntax of the language is not respected.

  • Semantic errors: errors due to an improper use of program statements.
  • Logical errors: errors due to the fact that the specification is not respected.

From the point of view of when errors are detected, we distinguish:

  • Compile time errors: syntax errors and static semantic errors indicated by the compiler.
  • Runtime errors: dynamic semantic errors, and logical errors, that cannot be detected by the compiler (debugging).

www.teachyourselfpython.com