Search-based Testing of Procedural Programs: Iterative Single-Target - - PowerPoint PPT Presentation

search based testing of procedural programs iterative
SMART_READER_LITE
LIVE PREVIEW

Search-based Testing of Procedural Programs: Iterative Single-Target - - PowerPoint PPT Presentation

Search-based Testing of Procedural Programs: Iterative Single-Target or Multi-Target Approach? Simone Scalabrino Giovanni Grano Dario Di Nucci Rocco Oliveto Andrea De Lucia The overall cost of testing has been estimated at being at


slide-1
SLIDE 1

Search-based Testing of Procedural Programs: Iterative Single-Target or Multi-Target Approach?

Andrea De Lucia Rocco Oliveto Dario Di Nucci Simone Scalabrino Giovanni Grano

slide-2
SLIDE 2

The overall cost of testing has been estimated at being at least half of the entire development cost, if not more.

Boris Beizer

  • Beizer. Software testing techniques. 2003. Dreamtech Press.
slide-3
SLIDE 3

Software developers only spend a quarter of their work time engineering tests, whereas they think they test half of their time.

Beller et al. When, how, and why developers (do not) test in their IDEs. ESEC/FSE 2015

Beller et al.

slide-4
SLIDE 4

Test case generation

slide-5
SLIDE 5

Test case generation SBST Methodologies

slide-6
SLIDE 6

Test case generation SBST Tools

AUSTIN

eToc - evolutionary Testing of classes

slide-7
SLIDE 7

OCELOT Optimal Coverage sEarch-based tooL for sOftware Testing

slide-8
SLIDE 8

Test Case Generation for C Fully Implemented in Java and C (through JNI) Based on JMetal Framework Structs and Pointers Handling Check Unit Testing Framework

OCELOT Features

slide-9
SLIDE 9

OCELOT Why C?

slide-10
SLIDE 10

Code Execution

CE SS CI TS PB

Makefile Generation Program Building Target Selection Solution Search Code Instrumentation

OCELOT Process Overview

MG

slide-11
SLIDE 11

MOSA

Multi-Objective Sorting Algorithm* Panichella et al.

LIPS

Linearly Independent Path based Search Scalabrino et al.

OCELOT Target Selection Algorithms

slide-12
SLIDE 12

Many-Objective Sorting Algorithm

Fitness function reformulation

Find a set of test cases that optimizes the branch coverage of each branch

Dominance and Pareto optimality

Each solution is evaluated in terms of Pareto dominance and optimality,

Preference Sorting

A new ranking algorithm for sorting the solutions

slide-13
SLIDE 13

Linearly Independent Path based Search

Inspired by McCabe baseline method and Dynamic Symbolic Execution

  • Starts with random test data (t0)
  • Selects a new target at each iteration

a > 1 a++ a-- End Start

Single target selection algorithm Collateral coverage Considers the targets serendipitously achieved Search budget optimization Allocates SBi/ni evaluations for each target Seeding Final population of the previous iteration is reused Independent of the search algorithm Current implementation based on GA

slide-14
SLIDE 14

EMPIRICAL EVALUATION

slide-15
SLIDE 15

Research Questions

RQ1 Effectiveness Branch Coverage RQ3 Oracle Coast Test Suite Size RQ2 Efficiency Execution Time

MOSA LIPS

slide-16
SLIDE 16

Design

Experiment Details Settings Context

Population Size 100 Crossover Rate 0.90 Mutation Rate 1/#variables Search Budget 200.000

35 C functions 605 branches Gimp: Gnu Image Manipulation Program GSL: Gnu Scientific Library SGLIB: a generic library for C spice: analogue circuit simulator 30 runs Average Values Wilcoxon’s Test (p-value 0.05) Vargha-Delaney Test

slide-17
SLIDE 17

Results RQ1: Effectiveness

MOSA LIPS 84,73% 86.29%

Overall Branch Coverage Cases in which is better

21 102

1 1 case with large effect size 28 cases with medium/large effect size

slide-18
SLIDE 18

MOSA LIPS 14.80s 5.03s

Average Execution Time Cases in which is better

351

Results RQ2: Efficiency

1 with large effect size

slide-19
SLIDE 19

MOSA LIPS 14.80s 5.03s

Average Execution Time Cases in which is better

351

Results RQ2: Efficiency

1 with large effect size

Too much time for ranking the Pareto Fronts!

slide-20
SLIDE 20

Results RQ3: Oracle Cost

MOSA LIPS 4.4 6.1

Average # Test Cases Cases in which is better

351

1 33 cases with large effect size

slide-21
SLIDE 21

Results RQ3: Oracle Cost

MOSA LIPS 4.4 6.1

Average # Test Cases Cases in which is better

351

1 33 cases with large effect size

LIPS does not directly handle the oracle problem!

slide-22
SLIDE 22

LIPS*

no collateral coverage

MOSA LIPS* 4.4 4.25

Average # Test Cases Cases in which is better

6 7

1 Although better than MOSA

Worse than LIPS in terms of branch coverage Worse than LIPS in terms of execution time1

slide-23
SLIDE 23

LIPS + minimization

MOSA1 LIPS 3.61 3.66

Average # Test Cases Cases in which is better

62 23

1 For a fair comparison the minimization was applied also to MOSA suites 2 4 cases with medium/large effect size 3 1 case with large effect size

slide-24
SLIDE 24

LIPS + minimization

1 For a fair comparison the minimization was applied also to MOSA suites 2 4 cases with medium/large effect size 3 1 case with large effect size

Minimization execution time < 1s

MOSA1 LIPS 3.61 3.66

Average # Test Cases Cases in which is better

62 23

slide-25
SLIDE 25

Conclusions

slide-26
SLIDE 26

Conclusions

slide-27
SLIDE 27

Conclusions

slide-28
SLIDE 28

Conclusions

slide-29
SLIDE 29

Conclusions

slide-30
SLIDE 30

Conclusions

slide-31
SLIDE 31

Conclusions

slide-32
SLIDE 32

Conclusions

slide-33
SLIDE 33

Conclusions

slide-34
SLIDE 34

Future works

slide-35
SLIDE 35

Future works Replicate on larger dataset

slide-36
SLIDE 36

Future works Replicate on larger dataset Study C landscapes

slide-37
SLIDE 37

Future works Replicate on larger dataset Study C landscapes Add LIPS to Evosuite

slide-38
SLIDE 38

Future works Replicate on larger dataset Study C landscapes Add LIPS to Evosuite Go beyond Genetic Algorithm

slide-39
SLIDE 39

Dario Di Nucci University of Salerno ddinucci@unisa.it http://www.sesa.unisa.it/people/ddinucci/

Thanks for your attention! Questions?