Balancing Soundness and Efficiency for Practical Testing
- f Configurable Systems
Sabrina Souto Marcelo d’Amorim Rohit Gheyi
UEPB, Brazil UFPE, Brazil UFCG, Brazil
sabrinadfs@gmail.com damorim@cin.ufpe.br rohit@dsc.ufcg.edu.br
Balancing Soundness and Efficiency for Practical Testing of - - PowerPoint PPT Presentation
Balancing Soundness and Efficiency for Practical Testing of Configurable Systems Sabrina Souto Marcelo dAmorim Rohit Gheyi UEPB, Brazil UFCG, Brazil UFPE, Brazil sabrinadfs@gmail.com rohit@dsc.ufcg.edu.br damorim@cin.ufpe.br
Sabrina Souto Marcelo d’Amorim Rohit Gheyi
UEPB, Brazil UFPE, Brazil UFCG, Brazil
sabrinadfs@gmail.com damorim@cin.ufpe.br rohit@dsc.ufcg.edu.br
Many other examples!
2
Configurable System
...
Configurations
Configuration-related bug!
3
Configurable System
System Configurations
...
4
…
Monolithic System Tests Tests
System Configurations
...
Efficiency (#samples) Efficacy (#failures)
5
* Exhaustive
6
Efficiency (#samples) Efficacy (#failures)
Find all bugs Very expensive
* Default
* Exhaustive
7
Efficiency (#samples) Efficacy (#failures)
Find all bugs Very expensive Very efficient Can miss bugs
* Sampling
* Default * Exhaustive
8
Efficiency (#samples) Efficacy (#failures)
Try to find bugs with less samples False positives and false negatives Very efficient Can miss bugs Find all bugs Very expensive
* Dynamic (SPLat [FSE’13,SPLC’15])
* Sampling * Default
9
Efficiency (#samples) Efficacy (#failures)
Consider code and test It may not scale in all cases Very efficient Can miss bugs Find all bugs Very expensive
* Exhaustive
Try to find bugs with less samples False positives and false negatives
Sampling + SPLat S-SPLat
* Dynamic (SPLat) * Sampling * Default * Exhaustive
10
Efficiency (#samples) Efficacy (#failures)
11 11
SPLat S-SPLat (one-enabled) Sampling (one-enabled)
Notepad
12 12
Test
SPLat S-SPLat (one-enabled) Sampling (one-enabled)
Notepad
13
SPLat S-SPLat (one-enabled) Sampling (one-enabled)
13
Test
17 configurations
Notepad
14 14
Test
SPLat S-SPLat (one-enabled) Sampling (one-enabled)
17 configurations 6 configurations
Notepad
15
2 configurations
Test
6 configurations
SPLat S-SPLat (one-enabled) Sampling (one-enabled)
17 configurations
Input
Tests Feature Model (Optional)
Output
C1, T1 C2, T1 C1, T2 C5, T2 C4, T3 … ... Tests executed with reachable and satisfiable configurations
16
Instrumented Configurable System
...
Sampling Heuristic
Output
C1, T1 C2, T1 C1, T2 C5, T2 C4, T3 … ... Tests executed with reachable and satisfiable configurations
17
Look for next reachable configuration
Run the test Ti
Yes Otherwise
Check:
Find reachable variables
Input
Tests Feature Model (Optional) Instrumented Configurable System
...
Sampling Heuristic
For all tests
18
RQ1 Which heuristics maximize efficiency (#samples)? RQ2 Which heuristics maximize efficacy (#failures)? RQ3 Which heuristics (basic or combination) maximize efficiency and efficacy?
19
20
Software Product Lines (SPLs)
Version 4.8.2 Version 6.1 8 subjects
cited options in bug reports
21
Techniques:
8 subjects
Evaluation SPLs Evaluation
22
[ICSE’16,ASE’14]
23
SPLat+ SPLat+
Evaluation SPLs Evaluation
SPLat and SPLat+ SPLat+
Combinations of heuristics
efficacy (#failures)?
24
Evaluation SPLs Evaluation
SPLat did not scale for some subjects The sampling heuristics reduced the number of samples explored by SPLat yet retaining their ability to reveal failures.
#failures #samples
25
Evaluation SPLs Evaluation
efficacy (#failures)?
SPLat+c11 (oe + od + med + pw)
SPLat+Most-enabled-disabled
26
Techniques:
27
Evaluation SPLs Evaluation
Version 4.8.2 Version 6.1
[ICSE’16,ASE’14]
28
Version 6.1
Evaluation SPLs Evaluation
SPLat+ and SPLat+ SPLat+ SPLat+ SPLat+
29
It is preferable to pick the best performing heuristics in the leftmost group the best choices!
Bugs found
2 new bugs reported. #samples #bugs Version 6.1
Evaluation SPLs Evaluation
RQ3: Which heuristics maximize efficiency (#samples) and efficacy (#failures)?
#bugs #samples
All five bugs were captured. SPLat+c2(oe+med) found all bugs with a relatively small number of samples.
30
Bugs found
Version 4.8.2
Evaluation SPLs Evaluation
RQ3: Which heuristics maximize efficiency (#samples) and efficacy (#failures)?
31
32
S-SPLat found a good balance between bugs and samples
The sampling heuristics helped to reduced the number of samples explored by SPLat without loss the ability to find bugs
S-SPLat could deal with scalability
It revealed bugs in potentially large configuration spaces
https://sabrinadfs.github.io/s-splat/ sabrinadfs@gmail.com
33
Evaluation SPLs Evaluation GCC
Technique #samples
#failures
Não é possível exibir esta imagem no momento.Technique
SPLat and ran explored much samples. med explored the smallest sample sets.
number of failures as splat but they required much fewer samples.
34
Evaluation SPLs Evaluation GCC
#failures #samples
SPLat and med optimize one dimension at the expense of the other. c11 (oe + od + med + pw) performed consistently well in all cases. The sampling heuristics reduced the number of samples explored by SPLat yet retaining their ability to reveal failures.
35
Technique
#bugs #samples
Technique Technique
#bugs #samples
Technique
Evaluation SPLs Evaluation GCC
Version 6.1
36
pw found more failures. It was one of the most expensive techniques.
the same number of failures as pw but with much fewer samples.
number of configurations
through a relatively small number of configurations
that entails a larger number of test requirements
configuration spaces
37
Evaluation SPLs Evaluation GCC
38
SPLs
Complex models
GCC
The use of validation is not necessary
The techniques performed consistently with and without feature constraints
S-SPLat x Regular Sampling
39
Regular Sampling detected the same bugs as S-SPLat with more configurations. New results are proportional to the change in the sampling rates of random.
Random Sampling with more rates: 10% and 30%
Evaluation SPLs Evaluation GCC
system with hundreds of options
datasets and implementations are publicly available: https://sabrinadfs.github.io/s-splat/
feature variables ])
systems with #ifdef variability
40