SlideServe
Menu
Préférences
© SlideServe · v2026

Automated Test Generation

felcia avatar
17 diapositives · 420 Views · Sep 07, 2014

Automated Test Generation. Recent advanced technique: Dynamic Symbolic Execution/ Concolic Testing Instrument code to explore feasible paths Example tool: Pex from Microsoft Research (for .NET programs).

Automated Test Generation - slide 1
01 / 17Automated Test Generation
1 / 17

Télécharger la présentation

Automated Test Generation
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. Automated Test Generation • Recent advanced technique: Dynamic Symbolic Execution/Concolic Testing • Instrument code to explore feasible paths • Example tool: Pex from Microsoft Research (for .NET programs) P. Godefroid, N. Klarlund, and K. Sen. DART: directed automated random testing. In Proc. PLDI 2005 K. Sen, D. Marinov, and G. Agha. CUTE: a concolic unit testing engine for C. In Proc. ESEC/FSE 2005 N. Tillmann and J. de Halleux. Pex - White Box Test Generation for .NET. In Proc. TAP 2008

  2. Dynamic Symbolic Execution in Pex void CoverMe(int[] a) { if (a == null) return; if (a.Length > 0) if (a[0] == 1234567890) throw new Exception("bug"); } http://pex4fun.com/HowDoesPexWork

  3. Dynamic Symbolic Execution in Pex void CoverMe(int[] a) { if (a == null) return; if (a.Length > 0) if (a[0] == 1234567890) throw new Exception("bug"); } • Input • null http://pex4fun.com/HowDoesPexWork

  4. Dynamic Symbolic Execution in Pex Execute&Monitor void CoverMe(int[] a) { if (a == null) return; if (a.Length > 0) if (a[0] == 1234567890) throw new Exception("bug"); } • Observed constraints • a==null • Input • null a==null T http://pex4fun.com/HowDoesPexWork

  5. Dynamic Symbolic Execution in Pex Choose next path Execute&Monitor void CoverMe(int[] a) { if (a == null) return; if (a.Length > 0) if (a[0] == 1234567890) throw new Exception("bug"); } • Constraints to solve • a!=null • Observed constraints • a==null • Input • null a==null T http://pex4fun.com/HowDoesPexWork

  6. Dynamic Symbolic Execution in Pex Choose next path Solve Execute&Monitor void CoverMe(int[] a) { if (a == null) return; if (a.Length > 0) if (a[0] == 1234567890) throw new Exception("bug"); } • Constraints to solve • a!=null • Observed constraints • a==null • Input • null • {} a==null T http://pex4fun.com/HowDoesPexWork

  7. Dynamic Symbolic Execution in Pex Choose next path Solve Execute&Monitor void CoverMe(int[] a) { if (a == null) return; if (a.Length > 0) if (a[0] == 1234567890) throw new Exception("bug"); } • Constraints to solve • a!=null • Observed constraints • a==null • a!=null && • !(a.Length>0) • Input • null • {} a==null T F a.Length>0 F http://pex4fun.com/HowDoesPexWork

  8. Dynamic Symbolic Execution in Pex Choose next path Solve Execute&Monitor void CoverMe(int[] a) { if (a == null) return; if (a.Length > 0) if (a[0] == 1234567890) throw new Exception("bug"); } • Constraints to solve • a!=null • a!=null && • a.Length>0 • Observed constraints • a==null • a!=null && • !(a.Length>0) • Input • null • {} a==null T F a.Length>0 F http://pex4fun.com/HowDoesPexWork

  9. Dynamic Symbolic Execution in Pex Choose next path Solve Execute&Monitor void CoverMe(int[] a) { if (a == null) return; if (a.Length > 0) if (a[0] == 1234567890) throw new Exception("bug"); } • Constraints to solve • a!=null • a!=null && • a.Length>0 • Observed constraints • a==null • a!=null && • !(a.Length>0) • Input • null • {} • {0} a==null T F a.Length>0 T F a[0]==123… F http://pex4fun.com/HowDoesPexWork

  10. Dynamic Symbolic Execution in Pex Choose next path Solve Execute&Monitor void CoverMe(int[] a) { if (a == null) return; if (a.Length > 0) if (a[0] == 1234567890) throw new Exception("bug"); } • Constraints to solve • a!=null • a!=null && • a.Length>0 • Observed constraints • a==null • a!=null && • !(a.Length>0) • a==null && • a.Length>0 && • a[0]!=1234567890 • Input • null • {} • {0} a==null T F a.Length>0 T F a[0]==123… F http://pex4fun.com/HowDoesPexWork

  11. Dynamic Symbolic Execution in Pex Choose next path Solve Execute&Monitor void CoverMe(int[] a) { if (a == null) return; if (a.Length > 0) if (a[0] == 1234567890) throw new Exception("bug"); } • Constraints to solve • a!=null • a!=null && • a.Length>0 • a!=null && • a.Length>0 && • a[0]==123456890 • Observed constraints • a==null • a!=null && • !(a.Length>0) • a==null && • a.Length>0 && • a[0]!=1234567890 • Input • null • {} • {0} a==null T F a.Length>0 T F a[0]==123… F http://pex4fun.com/HowDoesPexWork

  12. Dynamic Symbolic Execution in Pex Choose next path Solve Execute&Monitor void CoverMe(int[] a) { if (a == null) return; if (a.Length > 0) if (a[0] == 1234567890) throw new Exception("bug"); } • Constraints to solve • a!=null • a!=null && • a.Length>0 • a!=null && • a.Length>0 && • a[0]==123456890 • Observed constraints • a==null • a!=null && • !(a.Length>0) • a==null && • a.Length>0 && • a[0]!=1234567890 • Input • null • {} • {0} • {123…} a==null T F a.Length>0 T F a[0]==123… F http://pex4fun.com/HowDoesPexWork

  13. Dynamic Symbolic Execution in Pex Choose next path Solve Execute&Monitor void CoverMe(int[] a) { if (a == null) return; if (a.Length > 0) if (a[0] == 1234567890) throw new Exception("bug"); } • Constraints to solve • a!=null • a!=null && • a.Length>0 • a!=null && • a.Length>0 && • a[0]==123456890 • Observed constraints • a==null • a!=null && • !(a.Length>0) • a==null && • a.Length>0 && • a[0]!=1234567890 • a==null && • a.Length>0 && • a[0]==1234567890 • Input • null • {} • {0} • {123…} a==null T F a.Length>0 T F a[0]==123… F T http://pex4fun.com/HowDoesPexWork

  14. Dynamic Symbolic Execution in Pex Choose next path Solve Execute&Monitor void CoverMe(int[] a) { if (a == null) return; if (a.Length > 0) if (a[0] == 1234567890) throw new Exception("bug"); } • Constraints to solve • a!=null • a!=null && • a.Length>0 • a!=null && • a.Length>0 && • a[0]==123456890 • Observed constraints • a==null • a!=null && • !(a.Length>0) • a==null && • a.Length>0 && • a[0]!=1234567890 • a==null && • a.Length>0 && • a[0]==1234567890 • Input • null • {} • {0} • {123…} a==null T F a.Length>0 T Done: There is no path left. F a[0]==123… F T http://pex4fun.com/HowDoesPexWork

  15. Automating Test Generation @NCSU ASE • Method sequences • MSeqGen/Seeker [Thummalapenta et al. OOSPLA 11, ESEC/FSE 09], Covana[Xiao et al. ICSE 2011], OCAT [Jaygarl et al. ISSTA 10], Evacon[Inkumsah et al. ASE 08], Symclat[d'Amorim et al. ASE 06] • Environments e.g., db, file systems, network, … • DBApp Testing [Taneja et al. ESEC/FSE 11], [Pan et al. ASE 11] • CloudApp Testing [Zhang et al. IEEE Soft 12] • Loops • Fitnex[Xie et al. DSN 09] http://people.engr.ncsu.edu/txie/publications.htm

  16. Pex on MSDN DevLabsIncubation Project for Visual Studio • Download counts (20 months)(Feb. 2008 - Oct. 2009 ) • Academic: 17,366 • Devlabs: 13,022 • Total: 30,388 http://research.microsoft.com/projects/pex/

  17. Testing Tool Educational Gaming DSE/Pex secret Support Pex for Fun: Interactive Gaming for Teaching and Learning http://research.microsoft.com/pex/ http://pex4fun.com