Random Testing Flashcards

1
Q

What is random testing? What do they provide?

A

Using program analysis to randomly sample new tests without user interaction
They provide a means of continuous testing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are 4 directions of random testing?

A

Fuzz testing
Feedback Directed Random Testing
Property Based Testing
Chaos Engineering

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Even though fuzz testing was historically naive, it was still ________

A

effective

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are some questions you can ask to improve fuzzing?

A

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?

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are 2 major ways to generate test inputs for fuzzing?

A

Generational - Create new inputs, need a input space model

Mutational - Modifies existing test suite

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What kind of models can you have in generation fuzz testing?

A

Grammar, binary file formats, wire protocols

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

An example of generational fuzz testing is ______ ________. Specifications are provided through XML

A

Peach Fuzzer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

In mutational fuzz testing, you ______ new inputs from and existing set using heuristics

A

evolve

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is coverage guided fuzzing?

A

Fuzzing where you evolve a test suite toward more coverage

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q
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
A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are some common universal oracles?

A

Never crash
No undefined behaviour
No failures from dynamic analysis tools

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is differential testing?

A

Feed input into N different implementations and vote

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is metamorphic testing?

A

Identify key properties that enable correct results to be known relative to mutations

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are a few challenges in fuzzing?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is feedback directed random testing?

A

Generate a unit test following AAA

Use coverage feedback again to guide the process

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

When would you use feedback directed random testing?

A

When testing something that is not based on input, such as an API or object oriented API

17
Q

What are some challenges in feedback directed random testing?

A

Defining good notions of coverage

Defining oracles