[Year 12 SofDev] Test data question

Frank Van Den Boom vandenboomfj at aquinas.vic.edu.au
Sat Oct 13 21:55:40 EST 2007


A couple of the VITTA sample papers have had the following type of question where students are asked to suggest three values that should be used to test an if statement like the following.
 
if x > 50 then
....
else
....
endif
 
I have no issue with boundary values 49 and 50 being essential. It's the third one I have a problem with. 
The solutions say "when testing an algorithm, always select values that are within the required range, at the boundary of the required range, and outside of the required range". So for the above code, the solution suggests using 49, 50, 51.
 
I don't see that 51 is telling us any more than 50, so I don't really consider it useful test data and have taught my kids to also include invalid data types as part of this testing. eg. "apple" I guess it depends on how/where data input features in the code being tested.
 
What do others think about this?
 
Frank

This email and any attachments may be confidential. If you are not the intended recipient, you must not disclose 
or use the information in this mail. If received in error, please notify the sender or the College immediately 
and delete the email and all copies. The College does not guarantee that this email is virus or error free. 
Any attached files may only be used on the basis that the user assumes all responsibility for any loss, damage 
or consequence resulting directly or indirectly from the use of the attached files, whether caused by the negligence 
of the sender or not. The content and opinions in this email are not necessarily those of the College.
 



More information about the sofdev mailing list