All topics › OCR GCSE Computer Science › Testing
2.3.2 Testing
OCR GCSE Computer Science (J277) · Algorithms and programming (Paper 2) › Producing robust programs
Practise Testing. 11 exam-style questions plus unlimited generated ones on this subtopic, at up to four difficulty levels, with full mark schemes and a progress tracker. Free, no account needed.
Build a paper on this topic
▶ Watch videos on Testing (Craig 'n' Dave OCR on YouTube) · Practise all of Producing robust programs
Sample questions Written for this site in the style of OCR exam questions. They are not taken from real past papers.
Question 1 Easy 3 marks
(a) Give two reasons why programs are tested.[2]
(b) State what is meant by final (terminal) testing.[1]
Show the answer and mark scheme (a) to find errors / bugs (so they can be fixed) to check that the program meets the requirements / does what it should to check that the program handles invalid / unexpected data without crashing to make sure the program is reliable before it is released (b) testing the whole program once it is complete / at the end of development (to check that it meets the requirements) Question 2 Medium 6 marks
(a) Describe what is meant by iterative testing .[2]
(b) Explain one advantage of iterative testing.[2]
(c) Explain why final testing is still needed when iterative testing has been carried out.[2]
Show the answer and mark scheme (a) testing each part / module of the program while it is being developed errors are fixed and the code is tested again, repeatedly (b) errors are found early / in small sections of code so they are easier to locate and fix (and cost less to fix than at the end) (c) modules that work on their own may not work correctly together the whole program must be checked against the requirements before it is released Question 3 Hard 6 marks
A password must be from 8 to 16 characters long and must contain at least one digit.
(a) Design a test plan with five tests for this rule. For each test give the test data, the type of test and the expected result.[5]
(b) Explain why passwords of exactly 7 and exactly 17 characters should also be tested.[1]
Show the answer and mark scheme (a) normal: e.g. river2024 (9 characters with a digit), accepted boundary: exactly 8 characters with a digit, accepted boundary: exactly 16 characters with a digit, accepted invalid: 7 (or 17) characters with a digit, rejected invalid: correct length but no digit, rejected invalid (or erroneous): a blank / empty password, rejected (b) they are just outside the boundaries, so they check that the limits are in exactly the right place (they must be rejected) Related subtopics
Stuck? Get 1-to-1 help. Chhetri Academy tutors GCSE and A level Maths and Science online, with a free 30-minute trial lesson.
Book a free trial