Subject: Computer Science | Level: GCSE | Exam Board: OCR
Testing and Evaluation (3.4) is a critical component of the OCR GCSE Computer Science specification, focusing on the systematic validation of software through test data selection, trace table execution, and error identification. This topic assesses your ability to distinguish between Normal, Boundary, and Erroneous test data, execute trace tables to identify logic errors, and differentiate between iterative testing during development and final testing after implementation. Mastering this topic is essential because it directly applies to real-world software development and is heavily tested across multiple question formats in the exam.
Revision Notes & Key Concepts
Revision Podcast Transcript
[INTRO - 1 minute] Hello and welcome! I'm your Computer Science tutor, and today we're diving into one of the most practical topics in your OCR GCSE specification: Testing and Evaluation. This is topic 3.4, and trust me, this is where theory meets reality. Every single program you've ever used—from your favourite game to the app you check every morning—has been through rigorous testing. And guess what? OCR examiners absolutely love testing this topic because it shows whether you truly understand how software works in the real world. In the next ten minutes, we're going to cover the three types of test data, master trace tables, distinguish between syntax and logic errors, and nail the difference between iterative and final testing. By the end, you'll have the confidence to tackle any Testing and Evaluation question that comes your way. Let's get started! [CORE CONCEPTS - 5 minutes] First up: test data. This is fundamental. When you're testing a program, you need to use three specific types of data, and OCR wants you to know exactly what each one does. Type one: Normal data. This is data that the program should accept and process correctly. It's typical, everyday input—nothing unusual. For example, if your program asks for an age between 1 and 100, normal data might be 25, 50, or 73. The program should handle these values without any issues. Normal data checks that your program works under standard conditions. Type two: Boundary data. Now, this is where students often lose marks, so listen carefully. Boundary data is NOT data outside the valid range—it's data AT the exact limits of the valid range. If your range is 1 to 100, your boundary values are 1 and 100. Not 0, not 101—those are erroneous. Boundary data tests whether your program correctly handles the extreme edges of what's acceptable. Examiners are very precise about this distinction, so always remember: boundary means the edge values that are still valid. Type three: Erroneous data. This is invalid data that the program should reject. It could be the wrong data type—like entering "hello" when a number is expected—or it could be out of range, like -5 or 150 for our age example. Erroneous data tests whether your program is robust—meaning it can handle unexpected or incorrect inputs without crashing or producing nonsense results. Here's a pro tip for the exam: when a question asks you to provide test data, always state the value AND the category. For example, write "5 - Normal data" or "1 - Boundary data". This ensures you hit both marking points. Now, let's talk about trace tables. A trace table is a tool used to track the values of variables as a program executes, line by line. It's essentially a manual simulation of what the computer does. OCR loves giving you a chunk of pseudocode and asking you to complete a trace table, and this is where precision is everything. Here's the golden rule: only update a variable when an assignment statement is executed. Don't anticipate changes—wait until the line of code that actually changes the variable is reached. Use a ruler or your finger to track which line you're on. Work methodically through each row, and make sure your variable updates correspond exactly to the line number shown. Trace tables are brilliant for finding logic errors. A logic error is when your program runs without crashing but produces incorrect output. Maybe your loop runs one too many times, or your calculation is wrong. Trace tables let you see exactly where the values go wrong. This is different from a syntax error, which is a grammatical mistake in your code—like a missing bracket or a misspelled keyword—that stops the program from running at all. Finally, let's distinguish between iterative testing and final testing. This is a classic OCR question, and the keywords matter. Iterative testing happens during development. It's when you test individual modules or components as you're building them. Think of it like checking each ingredient as you cook, rather than waiting until the whole dish is done. Iterative testing is continuous, cyclical, and focused on catching errors early. Final testing happens after implementation—when the whole system is complete. It's testing the entire program as a finished product, often with real users or realistic scenarios. Final testing checks that everything works together and meets the original requirements. The key phrases to remember: "Iterative testing is during development, module by module" and "Final testing is after implementation, on the whole system." Use those exact terms in your exam answers. [EXAM TIPS & COMMON MISTAKES - 2 minutes] Right, let's talk about how to avoid the mistakes that cost students marks every single year. Mistake number one: confusing boundary and erroneous data. Remember, boundary data is still valid—it's the extreme edge of acceptable values. If the question says "for a range of 1 to 10," don't write 11 as boundary data. That's erroneous. The boundary values are 1 and 10. Mistake number two: describing logic errors as causing crashes. Logic errors don't stop the program—they make it produce wrong results. If you say "the program crashes," you're describing a runtime error, not a logic error. Be precise with your terminology. Mistake number three: updating trace table values in the wrong place. This happens when students rush. They see a variable mentioned and immediately update it, even though the assignment hasn't happened yet. Slow down, track the line number, and only change values when the code explicitly assigns them. Mistake number four: vague definitions of robust programs. Don't just say "a program that doesn't crash." A robust program is one that handles erroneous and unexpected inputs gracefully—by validating data, displaying error messages, and continuing to function. That's the level of detail examiners want. When you're answering questions, always check the command word. If it says "State," give a brief factual answer. If it says "Explain," you need to say why or how—use the word "because" to link cause and effect. And if it says "Describe," give details about what happens or what something is like. [QUICK-FIRE RECALL QUIZ - 1 minute] Okay, quick-fire quiz time! Pause after each question and see if you can answer without looking at your notes. Question one: What are the three types of test data? Answer: Normal, Boundary, and Erroneous. Question two: For a range of 5 to 20, what are the boundary values? Answer: 5 and 20. Question three: What is a logic error? Answer: An error where the program runs but produces incorrect output. Question four: When does iterative testing occur? Answer: During development, on individual modules. Question five: What does a robust program do? Answer: It handles erroneous and unexpected inputs without crashing. How did you do? If you got them all, brilliant! If not, go back and review those sections. [SUMMARY & SIGN-OFF - 1 minute] Alright, let's wrap up. Today we've covered the three types of test data—Normal, Boundary, and Erroneous—and you now know that boundary means the extreme valid values, not invalid ones. We've mastered trace tables by tracking line-by-line execution and only updating variables when assignments occur. We've distinguished syntax errors from logic errors, and we've nailed the difference between iterative testing during development and final testing after implementation. Testing and Evaluation is worth significant marks on your OCR GCSE, and it's tested across multiple question styles—from short definitions to extended trace table scenarios. The good news? It's highly predictable. Practice trace tables, memorise those key definitions, and always provide specific examples with your test data. You've got this. Keep practicing, stay precise, and remember: every mark counts. Good luck with your revision, and I'll see you in the next episode!
Key Terms & Definitions
- Normal Data
- Valid input that falls within the expected range or meets the specified criteria, representing typical usage that the program should accept and process correctly without errors.
- Boundary Data
- Valid input at the exact limits (minimum and maximum) of the acceptable range, used to test whether the program correctly handles extreme valid values at the edges of what is acceptable.
- Erroneous Data
- Invalid input that falls outside the acceptable range or is of the wrong data type, used to test whether the program correctly rejects or handles unexpected inputs without crashing.
- Trace Table
- A systematic tool used to manually simulate program execution by recording the values of variables after each line of code is executed, used to identify logic errors by tracking how values change throughout the program.
- Syntax Error
- A grammatical mistake in code that violates the rules of the programming language (such as missing brackets, misspelled keywords, or incorrect indentation), preventing the program from compiling or running until the error is corrected.
- Logic Error
- An error where the program is syntactically correct and runs without crashing, but produces incorrect or unexpected output due to flawed algorithms or logic (such as wrong comparison operators, incorrect calculations, or loops that iterate the wrong number of times).
- Iterative Testing
- Testing that occurs during the development phase, where individual modules or components are tested separately as they are coded, before being integrated into the complete system, allowing errors to be identified and fixed early.
- Final Testing
- Testing that occurs after implementation when the entire system is complete, evaluating the whole program as an integrated system to ensure all modules work together correctly and the software meets the original requirements.
- Robust Program
- A program that can handle erroneous and unexpected inputs without crashing, by validating inputs, displaying appropriate error messages, and continuing to function correctly even when given invalid data.
Worked Examples
Worked Example
Question: A program validates user passwords. Passwords must be between 8 and 20 characters long. Give one example of Normal data, one example of Boundary data, and one example of Erroneous data that could be used to test this program. [3 marks]
Solution: Normal Data: "MyPassword123" (14 characters, within valid range) Boundary Data: "Pass1234" (exactly 8 characters, minimum limit) OR "MyVeryLongPassword12" (exactly 20 characters, maximum limit) Erroneous Data: "Pass12" (6 characters, below minimum) OR "ThisPasswordIsWayTooLongForTheSystem" (37 characters, exceeds maximum)
Worked Example
Question: Complete the trace table for the following pseudocode when the input is 5. [4 marks] 1 INPUT number 2 result = 0 3 counter = 1 4 WHILE counter <= number 5 result = result + counter 6 counter = counter + 1 7 ENDWHILE 8 OUTPUT result | Line | number | result | counter | Output | |------|--------|--------|---------|--------|
Solution: | Line | number | result | counter | Output | |------|--------|--------|---------|--------| | 1 | 5 | | | | | 2 | 5 | 0 | | | | 3 | 5 | 0 | 1 | | | 4 | 5 | 0 | 1 | | | 5 | 5 | 1 | 1 | | | 6 | 5 | 1 | 2 | | | 4 | 5 | 1 | 2 | | | 5 | 5 | 3 | 2 | | | 6 | 5 | 3 | 3 | | | 4 | 5 | 3 | 3 | | | 5 | 5 | 6 | 3 | | | 6 | 5 | 6 | 4 | | | 4 | 5 | 6 | 4 | | | 5 | 5 | 10 | 4 | | | 6 | 5 | 10 | 5 | | | 4 | 5 | 10 | 5 | | | 5 | 5 | 15 | 5 | | | 6 | 5 | 15 | 6 | | | 4 | 5 | 15 | 6 | | | 8 | 5 | 15 | 6 | 15 | Final Output: 15
Worked Example
Question: Explain the difference between a syntax error and a logic error. [4 marks]
Solution: A syntax error is a grammatical mistake in the code that violates the rules of the programming language, such as a missing bracket or misspelled keyword. Syntax errors prevent the program from compiling or running because the compiler or interpreter cannot understand the code. The program will not execute until the syntax error is fixed. A logic error occurs when the program is syntactically correct and runs without crashing, but produces incorrect or unexpected output because the algorithm or logic is flawed. For example, using the wrong comparison operator or an incorrect calculation formula. Logic errors are more difficult to identify because the program appears to work, but the results are wrong.
Worked Example
Question: A software company is developing a new mobile app. Describe the difference between iterative testing and final testing. [4 marks]
Solution: Iterative testing occurs during the development phase, where individual modules or components are tested as they are coded, before being integrated into the complete system. This allows developers to identify and fix errors early in each module separately. Final testing occurs after implementation, when the entire system is complete. The whole program is tested as an integrated system to ensure all modules work together correctly and that the software meets the original requirements. Final testing often involves end users testing the complete application in realistic scenarios.
Practice Questions
Question: A program asks users to enter their year of birth, which must be between 1900 and 2024. Give one example of boundary data that could be used to test this program. [1 mark]
Answer:
Question: Explain why trace tables are useful for identifying logic errors. [3 marks]
Answer:
Question: A company is developing a new online shopping system. The development team tests each module (such as the shopping cart, payment processing, and user account management) as they code it. After all modules are complete, the entire system is tested with real users. Identify and explain the two types of testing described. [4 marks]
Answer:
Question: Complete the trace table for the following pseudocode when the input is 3. [4 marks] 1 INPUT num 2 total = 0 3 FOR i = 1 TO num 4 total = total + (i * 2) 5 NEXT i 6 OUTPUT total
Answer:
Question: A program asks users to enter a percentage score (0-100). The programmer wants to ensure the program is robust. Describe two validation checks the programmer could implement and explain why each check is necessary. [4 marks]
Answer:
Question: A programmer has written code that runs without error messages but produces incorrect results. Identify the type of error and explain how the programmer could identify the specific line where the error occurs. [3 marks]
Answer:


