Classroom Notes: 1.6 Software Development and Testing
1. Unit Overview and Foundations
- Prototypes: You should have seen prototypes and created a prototype for an interface (for example, with buttons and messages).
- Data Testing: You should have tested block-based programs using different data types (normal data accepted, invalid data rejected).
- Evaluation: You should have evaluated programs by identifying positive elements and considering improvements.
- Project Plans: You should have followed a project plan when developing a project on your own or with others.
- Debugging or Error Correction: You should have corrected errors in block-based or text-based programs.
By the end of this unit, learners will be able to:
- Identify the positive and negative elements of a software prototype.
- Explain why project plans are used in software development projects.
- Identify the key features of a test plan.
- Use a test plan to test an algorithm.
- Understand the different ways errors can happen in a program.
- Test or debug programs to find errors.
| Key Term | Definition & Meaning |
|---|---|
| Bug | An error in a program. |
| Debug / Debugging | The process of finding this bug and correcting it. |
| Evaluate | Looking at the prototype, comparing it against its original purpose, and seeing how good it is by identifying positive points and where it could be improved. |
| Interface | Lets you interact with the computer; what you see on screen (words, images, buttons) or use to input (controller buttons, opening windows). |
| Logic error | An error that occurs when the syntax is correct and the code runs, but does not do what it was supposed to do and gives an incorrect output. |
| Project plan | Plans used to decide what you are going to do and when you are going to do it, created before starting work on a project. |
| Prototype | An early version of an end product or system, possibly for part of the system and not fully working. |
| Software development | The process where you design, create, and test a program. |
| Systematically | Working through a process one step at a time from start to finish. |
| Test plan | A formal way of recording your testing by listing tests, inputs, and expected outputs before testing starts. |
2. Core Concepts and Classroom Discussion
A prototype is an early, preliminary version of a software system or interface. It is created during software development so designers and users can examine features before full programming is completed.
This process is repeated until a final working product is created that everyone is happy with.
- Does it meet requirements? Compare against original requirements and purpose.
- Is the design appropriate? Are words, colours, and layout easy to read and follow?
- Is the input method suitable? Does the user clearly know what and how to input?
- Is the output suitable? Are text and images clear, suitable, and understandable?
- Positive features: What works well and what do you like?
- Areas for improvement: What needs to be changed or added to make it better?
A company hires a large team (artists, designers, programmers, testers, evaluators) to build a complex 3D virtual world game. If work starts immediately with no plan, team members duplicate code, work out of order, or produce components that fail to connect when combined.
- Divide project between team members: Ensures people always have suitable tasks to do and stay busy.
- Identify deadlines: Helps meet the final date and allows problems to be spotted early so others can help.
- Agreed requirements: Ensures everyone works towards the exact same end product so parts combine properly.
- Clarity of responsibilities: Stops people from duplicating tasks or leaving tasks unfinished.
- Reduce development risks: Gives team members a constant reference guide whenever they are unsure what to do.
- Task sequencing / ordering: Ensures team members are not blocked waiting for prerequisite tasks to finish.
Programs are tested to make sure they work properly and cannot break. A test plan is written before the program is run. If any test fails, you must make corrections and repeat ALL tests from the beginning, because a fix can break an earlier working test.
- Normal Data: Typical, expected data that should be accepted and give a correct output (e.g. inputs 1 and 2 produce 3).
- Invalid Data: Data the program cannot process and must not accept; it should not give a result (e.g. entering "house" instead of a number).
- Unusual Data: Data that is not expected or usual, but is acceptable to use (e.g. negative numbers like -3 or decimals like 2.5).
Column 1: Test number | Column 2: Description | Column 3: Input | Column 4: Expected output | Column 5: Actual output.
Columns 1 to 4 are completed BEFORE testing starts. Column 5 is completed DURING testing. If expected matches actual, the test passes; if different, the test fails.
| Test Data Type | Description | Example Input(s) | Expected Output | Result |
|---|---|---|---|---|
| Normal | Typical values entered | 5, 3 | 8 | Pass |
| Boundary | Lowest valid values | 0, 0 | 0 | Pass |
| Boundary | Highest valid values | 100, 100 | 200 | Pass |
| Unusual / Invalid | Letter entered instead of a number | A, 5 | Error message shown | Pass |
| Unusual / Invalid | Blank input | (blank), 5 | Error message shown | Pass |
Syntax is the grammar and structure of the language (exact keywords, brackets, spelling). A syntax error breaks these rules (e.g., missing bracket in print("Hi" or using := instead of =). The program will not run fully, it fails to start or crashes with an error message.
A semantic error is a logical error that occurs when the syntax is correct and the program runs from start to end without crashing, but gives an incorrect output or result because it did not do what it was intended to do.
3. Short Answer Questions & Answers
4. Second-Order Thinking Skills Questions
Question: A program calculates the perimeter of a classroom by asking for length and width. Classify each of the following test inputs as Normal, Invalid, or Unusual, and give a reason: (a) 15, (b) "long", (c) -4.5.
- (a) 15: Normal data because it is a typical, expected positive number.
- (b) "long": Invalid data because it is text and cannot be calculated as a number.
- (c) -4.5: Unusual data because negative decimal lengths are unusual in real rooms, but numeric decimals are valid numeric inputs.
Question: A prototype interface for a game start screen displays only a blank white box with no buttons, text, or instructions. Evaluate this prototype using the criteria: (1) Does it meet requirements? (2) Suggest two specific improvements.
- Does it meet requirements? It fails the requirements because the user cannot tell what to input or how to interact with it.
- Suggest two specific improvements: Add clear title text and instructions, and add labeled interactive buttons such as 'Start New Game', 'Load Game', and 'Quit'.