Highcliffe ICT Department Testing Highcliffe ICT Department
Why test? However carefully you program There are likely to be errors The more code = more chance/numbers of errors Good program layout = improves debugging Testing helps find errors
Testing strategies DRY RUN BLACK BOX WHITE BOX
Testing strategies DRY RUN BLACK BOX WHITE BOX Used to test an algorithm or code without use of a computer. Programmer uses test data to check code is correct. Normally follows one routine/section. BLACK BOX WHITE BOX
Testing strategies DRY RUN BLACK BOX WHITE BOX Also known as functional testing. Carried out without looking at program code. Test data used to check expected results against actual results. WHITE BOX
Testing strategies DRY RUN BLACK BOX WHITE BOX Also known as structural testing. Tests devised to check each possible path through the program code.
Selecting test data Test data must be chosen carefully Use inputs users are likely to make Make the process thorough but manageable Select data before you code if possible
Normal data Basic, expected data that program copes with. Within any boundaries eg: range = 1-100 - normal would be 2-98 Needs to allow you to work out expected result accurately
Boundary data Value where processing is different for values above & below eg: 1-100 - boundary is -1,0,1 & 99, 100, 101 eg: Free delivery over £100 Boundary test = £100, £100.01 & £101
Erroneous data Purposeful use of incorrect data to test validation works. eg: date format allowed 14/03/2009 - test with: 14th March 2009 14/3/09 03/14/2009
Evidence of testing Always present test data and expected results. Use a table for the test plan Give a reference to a screenshot showing result Screenshot should show: Data entered, result including error messages.