Kernel Density Adaptive Random Testing Matthew Patrick and Yue Jia - - PowerPoint PPT Presentation

kernel density adaptive
SMART_READER_LITE
LIVE PREVIEW

Kernel Density Adaptive Random Testing Matthew Patrick and Yue Jia - - PowerPoint PPT Presentation

Kernel Density Adaptive Random Testing Matthew Patrick and Yue Jia 13 April 2015 Outline Diversification and Intensification Kernel Density Adaptive Random Testing (KD-ART) Is KD-ART more effective than ART? Finding the optimal


slide-1
SLIDE 1

Kernel Density Adaptive Random Testing

Matthew Patrick and Yue Jia 13 April 2015

slide-2
SLIDE 2

Outline

  • Diversification and Intensification
  • Kernel Density Adaptive Random Testing (KD-ART)
  • Is KD-ART more effective than ART?
  • Finding the optimal switch point
  • Conclusions
slide-3
SLIDE 3

Mutation based Test Selection

Test Suite

slide-4
SLIDE 4

Mutation based Test Selection

Test Suite Suppose we selected the red test suite, and found it is good at killing mutant

slide-5
SLIDE 5

Mutation based Test Selection

Test Suite Which test should be execute next ?

slide-6
SLIDE 6

Mutation based Test Selection

Test Suite

Diversify: Use a wide range

  • f test inputs to

increase the chances of killing new mutants

slide-7
SLIDE 7

Mutation based Test Selection

Test Suite

Intensify: Select test inputs which are similar to those previously shown to be successful

slide-8
SLIDE 8

Adaptive Random Testing (ART)

  • Generate test cases evenly over the input

domain, so as to diversify the test selection

  • Select test cases that maximise the (Euclidean)

distance to the previously selected test cases

slide-9
SLIDE 9

Failure Patterns

Block pattern: if (x >= 10 && x <= 12) && (y >= 8 && y <= 11) z = x / 2 * y; // 2 should be 7 else z = x * y; return z; Strip pattern: If (2 * x – y > 10) // 10 should be 18 z = x / 2 * y; else z = x * y; return z; (Chen et al. 2004)

Diversification may be more effective

slide-10
SLIDE 10

Compound Failure Patterns

Block and strip pattern: // 11 should be 12 if (x >= 10 && x <= 12) && (y >= 8 && y <= 11) z = x / 2 * y; // 2 should be 7 else z = x * y; return z; Strip and block pattern: If (2 * x – y > 10) // 10 should be 18 z = x / 2 * y; // also need && y > 7 else z = x * y; return z;

Intensification may be more effective

slide-11
SLIDE 11

Kernel Density Adaptive Random Testing (KD-ART)

  • Generate test inputs according to the

distribution of successful test cases

  • Use Kernel Density Estimation to interpolate

the test case values evaluated

slide-12
SLIDE 12

Kernel Density Estimation

slide-13
SLIDE 13

Sampling strategy

  • Sample ten test cases for every one selected
  • KD-ART (intensify) maximises the density
  • KD-ART (diversify) minimises the density
slide-14
SLIDE 14

Experimental setup

  • Eight C programs, used before in ART research
  • Selective set of mutation operators (MILU)
  • 20 trials of 5000 candidate tests: use ART and

KD-ART to select one test case from every ten

slide-15
SLIDE 15

IS KD-ART MORE EFFECTIVE THAN ART?

slide-16
SLIDE 16

plgndr

slide-17
SLIDE 17

bessj0

slide-18
SLIDE 18

Averaged over eight programs

slide-19
SLIDE 19

FINDING THE OPTIMAL SWITCH POINT

slide-20
SLIDE 20

erfcc switch

slide-21
SLIDE 21

Airy switch

slide-22
SLIDE 22
slide-23
SLIDE 23

Conclusions

  • It is not always best to diversify the test suite,

sometimes intensification should be used too

  • The switch point between traditional ART and

KD-ART has a significant effect on the results

  • The optimal switch point can be predicted

using easily calculable program properties

slide-24
SLIDE 24

ANY QUESTIONS?

slide-25
SLIDE 25
slide-26
SLIDE 26