Automated Search For Good Coverage Criteria Position Paper Phil - - PowerPoint PPT Presentation

automated search for good coverage criteria
SMART_READER_LITE
LIVE PREVIEW

Automated Search For Good Coverage Criteria Position Paper Phil - - PowerPoint PPT Presentation

Automated Search For Good Coverage Criteria Position Paper Phil McMinn University of Sheffield Mark Harman University College London Gordon Fraser University of Sheffield Gregory Kapfhammer Allegheny College Coverage


slide-1
SLIDE 1

Automated Search For “Good” Coverage Criteria

Phil McMinn Mark Harman
 Gordon Fraser
 Gregory Kapfhammer University of Sheffield University College London University of Sheffield
 Allegheny College

Position Paper

slide-2
SLIDE 2

Coverage Criteria: 


The “OK”, The Bad 
 and The Ugly

The “OK”

  • Divide up system into things to test
  • Useful to generate tests on if no

functional model exists

  • Indicates what parts of the system

are and aren’t tested

slide-3
SLIDE 3

The Bad

  • Not based on anything to do with

faults, not even:

  • Fault histories
  • Fault taxonomies
  • Common faults
slide-4
SLIDE 4

The Ugly

  • Studies disagree as to which

criteria are best

  • Coverage or test suite size?
slide-5
SLIDE 5

The Key Question 


  • f this Talk

Can we evolve “good” coverage criteria?

Coverage criteria that are better correlated with fault revelation?

slide-6
SLIDE 6

Why This Might Work

  • The best criterion might actually be a 


mix and match of aspects existing criteria

  • For example “cover the top n longest d-u paths,

and then any remaining uncovered branches”

  • Or…
slide-7
SLIDE 7

Maybe this is One Big Empirical Study using SBSE

… which aspects of which criteria and how much

less less less more more more

branches complex d-u chains basis paths

slide-8
SLIDE 8

What About Including Aspects Not Incorporated into Existing Criteria

Non functional aspects

  • For example timing behaviour, memory usage
  • “Cover all branches using as much memory

as possible”

Fault histories

  • “Maximize basis path coverage in classes with

the longest fault histories”

slide-9
SLIDE 9

“Isn’t This Just 
 Mutation Testing?”

Our criteria are more like generalised strategies

  • Potentially more insightful to the nature of faults
  • Cheaper to apply 


(coverage is generally easier to obtain than a 100% mutation score)

Perhaps different strategies will work best for different types of software, or different teams of software developers

slide-10
SLIDE 10

How This Might Work

slide-11
SLIDE 11

Fault Database

Need examples of real faults

  • Defects4J
  • CoREBench
  • … or, just use mutation
slide-12
SLIDE 12

Fitness Function

“Goodness” is correlation between greater coverage and greater fault revelation

  • Needs test suites to establish
slide-13
SLIDE 13

Generation of Test Suites

At least two possibilities

  • Generate up front universe of test suites
  • Generate specific test suites with the aim of

achieving specific coverage levels of the criteria under evaluation (drawback: expensive)

slide-14
SLIDE 14

Search Representation

GP Trees

OR up to 50% branch coverage memory usage maximise

  • ver 75%

basis path coverage AND

slide-15
SLIDE 15

Handling Bloat

GP techniques classically involve “bloat”

  • Consequence: generated criteria may not be very

succinct

  • Various techniques could be applied to simplify the

criteria, e.g. delta debugging

slide-16
SLIDE 16

Overfitting

The evolved criteria may not generalise beyond the systems studied and the faults seeded

  • May not be a disadvantage:
  • insights into classes of system
  • faults made by particular developers
  • … apply traditional techniques from machines learning

to combat overfitting.

slide-17
SLIDE 17

Summary

Our Position:
 SBSE can be used to automatically evolve 
 coverage criteria that are well correlated 
 with fault revelation
 
 Over to the audience:
 Is it feasible that we could do this?