a net based test data generator for combinatorial grammar
play

A .NET-based Test-Data Generator for Combinatorial Grammar- and - PowerPoint PPT Presentation

A .NET-based Test-Data Generator for Combinatorial Grammar- and Schema-based Testing Vadim Zaytsev with: Ralf L ammel (VU), Wolfram Schulte (MSR) 14 April 2004 Grammar ware grammars grammar-dependent software In this project:


  1. A .NET-based Test-Data Generator for Combinatorial Grammar- and Schema-based Testing Vadim Zaytsev with: Ralf L¨ ammel (VU), Wolfram Schulte (MSR) 14 April 2004

  2. Grammar ware • grammars • grammar-dependent software • In this project: – XML Validators – W3C XML Schemata as grammars http://www.cs.vu.nl/grammarware/ 1

  3. Scenarios for grammar-based testing • testing virtual processors – virtual machines – just-in-time compilers • testing front-ends – automated software modification & analysis • testing implementations – optimisation of XPath 2

  4. Combinatorial exploration Grammar Explosion Term Term Term Term Term Term Term Term Term Term Term Term Term ... . . . Adversary of stochastic testing 3

  5. Explosion examples Cardinalities per depth 4

  6. Controlled explosion Grammar Term Depth control Term Term Recursion control Term Term Term Term Term Term Term Term Term Term ... . . . + other mechanisms 5

  7. Control mechanisms • depth control – maximum “length” of terms • recursion control – nested constructor application • equivalence control – build equivalence classes 6

  8. Control mechanisms (contd.) • balance control – limit the preceding levels • combination control – limit Cartesian product – pair-wise testing • context control – enforce context conditions 7

  9. Emphases in this project • The case study of XSD usage in testing XML Validators • Implementing and using control mechanisms for test data generation • Developing a tool to support combinatorial testing 8

  10. Problem System Under Test XML XSD Validator YES NO 9

  11. Solution Stage A: TDGenerator XML XSD Validator Oracle YES YES NO GOOD/BAD 10

  12. Solution Stage B: TDGenerator XSD XML XSD Validator Oracle YES YES NO GOOD/BAD 11

  13. What kind of Oracle ? • Differential testing – run two or more against one another – if the outputs are different, something has to be wrong – in our case: different XML Validators ∗ using Microsoft .NET API ∗ Sun Multi-Schema XML Validator (JAXB) ∗ Ant Validation Task (JBind) 12

  14. The Tool we have grammar terms Tree Nil = Nil Node-1(Nil,Nil) | Node(Tree,Tree) ... ; Terms as objects Constructors of all sorts +Serialisation 13

  15. Solution proposition grammar terms The Tool in BNF in text Constructors Serialisation Sorts and Parsing Terms grammar test data Mapping Mapping XSD XML XML XSD 14

  16. Problems underway • XSD is not meant to be implemented – (as a whole) • YACC ification • how to deal with XML attributes • implementing control mechanisms • . . . 15

  17. Conclusion The buzzwords are: • Test data generation • Combinatorial testing • Controlled explosion • Differential testing • The .NET Framework 16

Recommend


More recommend