Back to Robust And Secure Programming
N
Oak National Academy
Lessons written by expert teachers in England, each with slides, a video and quizzes.
Their topic:
Programming: subprograms · Programming: subroutines · Python programming project
For your topic:
Robust And Secure Programming · Computer Science - 9210
Use these lessons alongside our lesson note, which covers your syllabus in full.
What this covers in your syllabus
3 lessons from Oak National Academy
1
Programming project: subprograms II
2
Programming project: subroutines II
3
Testing and refining a programming project
Lesson 1 of 3 · GCSE level, ages 14 to 16
Programming project: subprograms II
By the end:
I can implement a program from a design and perform testing to ensure it works as expected.
Key learning points
Implementation of solution is where you take a plan and create the solution.
A program should be tested with a range of test data.
Erroneous data is data that should not be accepted by the program or it will cause an error.
Boundary test data is data of the correct type which is on the very edge of being valid.
Normal data is data that should be accepted by a program. This is data that you would expect a user to enter.
Keywords
erroneous
data that should not be accepted by the program or it will cause an error
boundary
data that should either be accepted or rejected by a program, it tests the data right at the boundary of a range
normal
data that should be accepted by a program, this is data that you would expect a user to enter
A common mistake
Mistake: A system should only be tested with normal data that will be expected.
In fact: A system should be tested with a range of test data, including erroneous data that is not meant to be accepted.
Check what you learned
From Oak National Academy's exit quiz. Choose every answer that is right.
What is the purpose of iterative testing in programming?
to test the final version of the program only
to test throughout the program's creation and fix errors early
to test only erroneous data
to ensure the program runs without any debugging
Which type of test data is used to check that values at the edge of a range are accepted?
erroneous
normal
boundary
exceptional
Final testing occurs when ...
each block of code is tested separately.
the entire program is completed.
errors are corrected during development.
the program is still in the early design phase.
Check answers
A computing lesson by Oak National Academy licensed under the Open Government Licence (OGL) v3.0.
Read the licence
Lesson 2 of 3 · GCSE level, ages 14 to 16
Programming project: subroutines II
By the end:
I can implement a program from a design and perform testing to ensure it works as expected.
Key learning points
Implementation of solution is where you take a plan and create the solution.
A program should be tested with a range of test data.
Erroneous data is data that should not be accepted by the program or it will cause an error.
Boundary data is data that should either be accepted or rejected by a program.
Normal data is data that should be accepted by a program. This is data that you would expect a user to enter.
Keywords
erroneous
data that should not be accepted by the program or it will cause an error
boundary
data that should either be accepted or rejected by a program, it tests the data right at the boundary of a range
normal
data that should be accepted by a program, this is data that you would expect a user to enter
A common mistake
Mistake: A system should only be tested with normal data that will be expected. If it works with normal data it will work all the time.
In fact: A system should be tested with a range of test data, including erroneous data that is not meant to be accepted. Programs should make sure that there is no way to stop the software from working if invalid inputs are entered.
Check what you learned
From Oak National Academy's exit quiz. Choose every answer that is right.
What is the purpose of iterative testing in programming?
to test the final version of the program only
to test throughout the program's creation and fix errors early
to test only erroneous data
to ensure the program runs without any debugging
Which type of test data is used to check that values at the edge of a range are accepted?
erroneous
normal
boundary
exceptional
Final testing occurs when ...
each block of code is tested separately.
the entire program is completed.
errors are corrected during development.
the program is still in the early design phase.
Check answers
A computing lesson by Oak National Academy licensed under the Open Government Licence (OGL) v3.0.
Read the licence
Lesson 3 of 3 · GCSE level, ages 14 to 16
Testing and refining a programming project
By the end:
I can test a programming project using a range of methods.
Key learning points
Testing is the process of checking that a program works correctly and meets all its requirements.
To test a program thoroughly, a range of data should be used, including normal, boundary and invalid data.
A good test plan includes clear tests with predicted outcomes.
If the actual results don't match the expected results, the program is checked for errors in a process called debugging.
Keywords
testing
the systematic process of checking that a program works as expected
debugging
the process of finding and correcting errors in program code
A common mistake
Mistake: A test plan should only include data that will cause a program to not work.
In fact: A test plan should contain a range of test data, including normal, erroneous and boundary.
Check what you learned
From Oak National Academy's exit quiz. Choose every answer that is right.
Why is it important to use different types of data when testing?
to make the test plan longer
to slow down the program
to check how the program handles all possible situations
to impress your teacher
Which statement about test plans is correct?
a test plan should contain normal, boundary and erroneous data
a test plan should only include data that makes the program fail
a test plan is only needed for large projects
a test plan is not useful for programmers
What should you do if your program’s actual results don’t match the expected results?
debug the program
ignore the problem
add more features
delete the test
Check answers
A computing lesson by Oak National Academy licensed under the Open Government Licence (OGL) v3.0.
Read the licence
The wording comes from each publisher. The layout and the links to your syllabus are ours.