20-09-2012, 05:21 PM
Syntax testing
SYNTAX TESTING.ppt (Size: 853 KB / Downloads: 29)
System inputs must be validated.
Internal and external inputs conform to formats.
Data formats can be mechanically converted into many input data validation tests.
Garbage-In Garbage-Out
“Garbage-In equals Garbage-Out” is one of the worst cop-outs ever invented by the computer industry.
GI-GO does not explain anything except our failure to:
– install good validation checks
– test the system’s tolerance for bad data.
Million Monkey Phenomenon
A million monkeys sit at a million typewriters for a million years and eventually one of them will type Hamlet!
Input validation is the first line of defense against a hostile world.
Input-Tolerance Testing
Good user interface designers design their systems so that it just doesn’t accept garbage.
Good testers subject systems to the most creative “garbage” possible.
Input-tolerance testing is usually done as part of system testing and usually by independent testers.
Syntax Testing Steps
Identify the target language or format.
Define the syntax of the language, formally, in a notation such as BNF.
Test and Debug the syntax:
– Test the “normal” conditions by covering the BNF syntax graph of the input language.(minimum requirement)
– Test the “garbage” conditions by testing the system against invalid data. (high payoff)
Testing Strategy
Create one error at a time, while keeping all other components of the input string correct.
Once a complete set of tests has been specified for single errors, do the same for double errors, then triple, errors, ...
Focus on one level at a time and keep the level above and below as correct as you can.