1 / 39

AUSTIN: A tool for Search based software testing

Kiran Lakhotia, Mark Harman and Hamilton Gross in. AUSTIN: A tool for Search based software testing. And its Evaluation on Deployed Automotive Systems. Publication Trend in SBSE. Spread of Activities in SBSE. Yet Another Search Based Testing Tool?. Yet Another Search Based Testing Tool?.

ciara
Download Presentation

AUSTIN: A tool for Search based software testing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Kiran Lakhotia, Mark Harman and Hamilton Gross in AUSTIN: A tool for Search based software testing And its Evaluation on Deployed Automotive Systems

  2. Publication Trend in SBSE

  3. Spread of Activities in SBSE

  4. Yet Another Search Based Testing Tool?

  5. Yet Another Search Based Testing Tool?

  6. Outline

  7. AUgmented Search based TestINg c source files preprocessed c source files gcc -P -E CIL AST, CFG instrumented c source runAUSTIN gcc -o sut.exe instrument

  8. AUgmented Search based TestINg • void testme(key1, key2, p, q) • int key1; • int key2; • int* p; • int* q; • { • if(key1 == key2) • if(p != 0) • if(p == q) • //target • }

  9. AUgmented Search based TestINg • void testme(key1, key2, p, q) • int key1; • int key2; • int* p; • int* q; • { • if(key1 == key2) • if(p != 0) • if(p == q) • //target • } Inputs:key1 = 87, key2 = 33, p = 0, q = 0

  10. AUgmented Search based TestINg • void testme(key1, key2, p, q) • int key1; • int key2; • int* p; • int* q; • { • if(key1 == key2) • if(p != 0) • if(p == q) • //target • } Inputs:key1 = 88, key2 = 33, p = 0, q = 0

  11. AUgmented Search based TestINg • void testme(key1, key2, p, q) • int key1; • int key2; • int* p; • int* q; • { • if(key1 == key2) • if(p != 0) • if(p == q) • //target • } Inputs:key1 = 86, key2 = 33, p = 0, q = 0

  12. AUgmented Search based TestINg • void testme(key1, key2, p, q) • int key1; • int key2; • int* p; • int* q; • { • if(key1 == key2) • if(p != 0) • if(p == q) • //target • } Inputs:key1 = 84, key2 = 33, p = 0, q = 0

  13. AUgmented Search based TestINg • void testme(key1, key2, p, q) • int key1; • int key2; • int* p; • int* q; • { • if(key1 == key2) • if(p != 0) • if(p == q) • //target • } Inputs:key1 = 80, key2 = 33, p = 0, q = 0

  14. AUgmented Search based TestINg • void testme(key1, key2, p, q) • int key1; • int key2; • int* p; • int* q; • { • if(key1 == key2) • if(p != 0) • if(p == q) • //target • } Inputs:key1 = 80, key2 = 33, p = 0, q = 0 Fitness Function: approach_level + norm(branch_distance) Search Method: Alternating Variable Method

  15. AUgmented Search based TestINg • void testme(key1, key2, p, q) • int key1; • int key2; • int* p; • int* q; • { • if(key1 == key2) • if(p != 0) • if(p == q) • //target • } Inputs:key1 = 33, key2 = 33, p = 0, q = 0

  16. AUgmented Search based TestINg • void testme(key1, key2, p, q) • int key1; • int key2; • int* p; • int* q; • { • if(key1 == key2) • if(p != 0) • if(p == q) • //target • } Inputs:key1 = 33, key2 = 33, p = 0, q = 0 Symbolic Path Condition: key1 == key2 && p == 0

  17. AUgmented Search based TestINg • void testme(key1, key2, p, q) • int key1; • int key2; • int* p; • int* q; • { • if(key1 == key2) • if(p != 0) • if(p == q) • //target • } Inputs:key1 = 33, key2 = 33, p = 0, q = 0 Symbolic Path Condition: key1 == key2 && p == 0 Simplified Path Condition: p == 0

  18. AUgmented Search based TestINg • void testme(key1, key2, p, q) • int key1; • int key2; • int* p; • int* q; • { • if(key1 == key2) • if(p != 0) • if(p == q) • //target • } Inputs:key1 = 33, key2 = 33, p = 0, q = 0 Symbolic Path Condition: key1 == key2 && p == 0 Simplified Path Condition: p == 0 Solve: p ≠ 0

  19. AUgmented Search based TestINg • void testme(key1, key2, p, q) • int key1; • int key2; • int* p; • int* q; • { • if(key1 == key2) • if(p != 0) • if(p == q) • //target • } Inputs:key1 = 33, key2 = 33, p = 0, q = 0 Symbolic Path Condition: key1 == key2 && p == 0 Simplified Path Condition: p == 0 Solve: p ≠ 0 p 0

  20. AUgmented Search based TestINg • void testme(key1, key2, p, q) • int key1; • int key2; • int* p; • int* q; • { • if(key1 == key2) • if(p != 0) • if(p == q) • //target • } Inputs:key1 = 33, key2 = 33, p = 0x..., q = 0

  21. AUgmented Search based TestINg • void testme(key1, key2, p, q) • int key1; • int key2; • int* p; • int* q; • { • if(key1 == key2) • if(p != 0) • if(p == q) • //target • } Inputs:key1 = 33, key2 = 33, p = 0x..., q = 0 Symbolic Path Condition: key1 == key2 && p ≠ 0 && p ≠ q Simplified Path Condition: p ≠ 0 && p ≠ q Solve: p ≠ 0 && p == q p 0 p,q 0 q

  22. AUgmented Search based TestINg • void testme(key1, key2, p, q) • int key1; • int key2; • int* p; • int* q; • { • if(key1 == key2) • if(p != 0) • if(p == q) • //target • } Inputs:key1 = 33, key2 = 33, p = 0x..., q = 0x...

  23. rZSlJ3hb Evolutionary Testing Framework (ETF) • ETF was developed as part of the EvoTest project • Integrated into the Eclipse IDE • Supports white & black box testing • Uses Evolutionary Algorithms (through the GUIDE, EO evolutionary library interface) to generate test data Send Fitness Values ETF GUIDE + EO Send Individuals

  24. rZSlJ3hb ETF cont. Screenshots taken from a talk by Peter M. Kruse from Berner & Mattner, April 2009

  25. rZSlJ3hb ETF cont. Screenshots taken from a talk by Peter M. Kruse from Berner & Mattner, April 2009

  26. Fitness Function and Algorithm • Both ETF and AUSTIN use the standard fitness function for branch coverage in Search Based Testing • apporach_level + norm(branch_distance) • normalization function: 1 - 1.001-branch_distance • ETF uses a Genetic Algorithm • AUSTIN uses the Alternating Variable Method

  27. Pointers in ETF and AUSTIN • AUSTIN • Construct an equivalence of memory locations based on = and ≠ operators in symbolic path condition • Initialize (pointer) input variables based on the graph • Assign new memory location via malloc or use existing memory location • On-demand pointer handling • ETF • Generate an index and auxiliary variable for each pointer input • Assign all input variables of the same type (including globals) to a pool • Optimize indices and values of auxiliary variables along with the inputs. Indices are used to select variables from pools and assign their address to the pointer input

  28. Pointers in ETF struct cell{ int value; struct cell* next; }; intglobX; double globDbl; struct cell* pCell; void testme(int* p, int* q) { ...} p = &globX; q = &val_p;

  29. Hypothesis

  30. Empirical Study • 3 case studies (comprising 8 functions) • Embedded Software Modules from Automotive Industry

  31. Coverage ETF vs AUSTIN

  32. Efficiency ETF vs AUSTIN

  33. Coverage Random vs AUSTIN

  34. Efficiency Random vs AUSTIN

  35. ETF or AUSTIN? • Coverage is about the same • AUSTIN is overall a little bit more efficient than the ETF in terms of fitness evaluations. In terms of wall clock time the difference is greater (due to the overhead of the ETF-GUIDE setup) • AUSTIN does not construct random memory graphs • ETF is not able generate inputs such as struct cell{ intmem; }; void testme(int* p, struct cell* c) { if( p == &c->mem ) //target }

  36. Summary

  37. Summary http://www.cs.ucl.ac.uk/staff/K.Lakhotia/software/austin.htm

More Related