Programme Testing Flashcards
What is testing?
Testing is the process of running a program to try and ascertain if the program is working as intended.
what are the 3 considerations needed when finding how well a program is built?
Protection against unexpected user inputs or actions, authenticating that users on a computer system are who they say they are, minimising or removing errors and bugs.
What are the main classes of error?
Syntax error, runtime error and logic error.
What are syntax errors?
Syntax errors occur when the code given does not follow the syntax rules of a particular language program.
What are some non-exhaustive reasons for syntax errors?
- misspelling keywords or statements
- missing or incomplete pairs of parantheses
What are logic errors?
A logic error is an error that causes a program to not accomplish its intended and expected goal.
Unlike a syntax error, the logic error does not stop the program from running. The program will run, but not deliver the intended outcome as expected.
What are some reasons that result in logic errors?
- Incorrect program design
- Using the same identifier name for different purposes
- Incorrect range used in terminating conditions
What are run time errors?
They are errors that occur during the execution of a program.
What are some reason for run time errors?
- Performing an operation on incompatible types
- Performing an incorrect mathematical equation
- Reading a file that does not exist
Is a syntax error considered a run time error?
No. At the complication stage, the syntax errors are detected as the process would fail without proceeding to the next stage. However, run time errors happen at any time throughout the stages.
What is test data?
Test data is data that is used to test if a program is functioning as it is intended to be.
What are the different types of test data?
Normal (valid data), boundary (extreme data), abnormal (erroneous data)
What is normal test data?
It is typical data values that are valid.
What is boundary test data?
It is test data at the upper or lower limits of expectations that should be accepted by the system.
What is abnormal test data?
It is data values that the system should fail or not accept.
What are some factors to consider in the design of test plans?
The requirements of the system, the performance of the system against the original design, the pathways through the system, validation routes.
What is a desk check / dry run?
It is the process of using data chosen by the checker to trace through the logic of the algorithm keeping track and recording the values of variables and printed output in a trace table with an intention to identify potential logic errors.
What is a trace table?
It is a table with a column for each variable that records their changing values.
What are the advantages of desk checking?
- Running a desk check is quick and inexpensive
- Allows the programmer to code the algorithm and at the same time perform checks on his algorithm so that errors can be sifted out
What are the disadvantages of desk checking?
- Desk check is subjected to human error too
- A desk check does not guarantee that a programmer will find mistakes
- Getting another individual to perform checking on an algorithm requires time for the checker to first understand the algorithm