Six original Cambridge-style questions on types of error and methods of testing, with mark-scheme style solutions.
Describe a syntax error, a logic error and a run-time error.
The function should return the sum of the integers from 1 to N.
FUNCTION SumTo(N : INTEGER) RETURNS INTEGER
DECLARE Count, Sum : INTEGER
Sum ← 1
Count ← 1
WHILE Count < N
Sum ← Sum + Count
Count ← Count + 1
ENDWHILE
RETURN Sum
ENDFUNCTIONThe function contains two errors. Identify each error, state its type and write the correction.
Give two ways a programmer can avoid making errors when writing code.
Explain the difference between white-box testing and black-box testing.
A team is developing a program top-down. The main module is written but the modules it calls are not. Explain how stub testing lets the main module be tested now.
Describe alpha testing, beta testing and acceptance testing, saying who carries out each.
Mark this once you have attempted all six and checked your working. It records a Practiced badge on the topic and adds a one-time bonus. Revealing the solutions alone does not count.