Testing
Learn basics of testing programs.
Last updated
Learn basics of testing programs.
Last updated
When a computer system is being developed, it goes through various testing stages in the following order:
Testing is vital for finding errors in certain parts of a computer system. Finding and fixing these errors is very important for improving the user experience and also helps reduce chances of cybersecurity incidents.
Testing is not done to prove that the program "works most of the times", although ensuring functionality and reliability is important in testing, the primary goal is to uncover defects and vulnerabilities in the system. A good test should show up an error.
In order to test, you don't necessarily need to know how the program works, you just need to know what it's supposed to do.
Test data has to be carefully selected. It should include normal (typical) data, boundary data and erroneous data.
Hand-tracing an algorithm can help us find how an algorithm works and why it is not working properly. A trace table is used to write down the contents of each variable as it changes during execution. If the program contains a loop, a helpful technique is to put the loop condition as the first column in the trace table, even if other variables have been defined before it.
Module testing
To make sure that specific subroutines work as they were intended to do so.
Program testing
To make sure each program in the system works correctly
System testing
To make sure the whole system works as expected and meets the original specifications.