CS447 Lecture Notes - Lecture 1: Test Case, Mutation, Software Testing
Document Summary
We will see two applications of grammars: to create inputs (both valid and invalid, to modify programs (mutation testing) The basic idea behind mutation testing is to improve your test suites by creating modi ed programs (mutants) which force your test suites to include test cases which verify certain speci c behaviours of the original programs by killing the mutants. Consider the following perl regular expression for visa numbers: Instead, we can use grammars to generate inputs (including sequences of input events). Typical grammar fragment: mult exp = unary exp | mult exp star unary arith exp | mult exp div unary arith exp; unary exp = quant exp | unary exp dot int | unary exp up; start = header?declaration . Two ways you can use input grammars for software testing and maintenance: recognizer: can include them in a program to validate inputs, generator: can create program inputs for testing.