Random Testing Flashcards
What is random testing? What do they provide?
Using program analysis to randomly sample new tests without user interaction
They provide a means of continuous testing
What are 4 directions of random testing?
Fuzz testing
Feedback Directed Random Testing
Property Based Testing
Chaos Engineering
Even though fuzz testing was historically naive, it was still ________
effective
What are some questions you can ask to improve fuzzing?
Initial test suite required?
How are new tests generated
How does the result of the previous test affect test generation?
What kind of bugs can be found?
What are 2 major ways to generate test inputs for fuzzing?
Generational - Create new inputs, need a input space model
Mutational - Modifies existing test suite
What kind of models can you have in generation fuzz testing?
Grammar, binary file formats, wire protocols
An example of generational fuzz testing is ______ ________. Specifications are provided through XML
Peach Fuzzer
In mutational fuzz testing, you ______ new inputs from and existing set using heuristics
evolve
What is coverage guided fuzzing?
Fuzzing where you evolve a test suite toward more coverage
If we want to measure the following categories, what can we specify as a heuristic in our fuzzer? Computational overhead Memory Consumption Energy Consumption REST API invocations
Computational overhead - Count instruction frequency in coverage
Memory Consumption - Count allocated memory per allocation
Energy Consumption - Measure power consumption over tasks, etc
REST API invocations - Measure diversity of requests fed to server
What are some common universal oracles?
Never crash
No undefined behaviour
No failures from dynamic analysis tools
What is differential testing?
Feed input into N different implementations and vote
What is metamorphic testing?
Identify key properties that enable correct results to be known relative to mutations
What are a few challenges in fuzzing?
Highly structured inputs require more care
Making use of nuanced oracles can be challenging
It’s only effective at a whole program or single function level
What is feedback directed random testing?
Generate a unit test following AAA
Use coverage feedback again to guide the process