Skip to main content

Test-Data Generation for Xtext

Tool Paper

  • Conference paper

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 8706))

Abstract

We describe a method and a corresponding tool for grammar-based test-data generation (GBTG). The basic generation principle is to enumerate test data based on grammatical choices. However, generation is broken down into two phases to deal with context-sensitive properties in an efficient and convenient manner. The first phase enumerates test data (i.e., parse trees) with placeholders. The second phase instantiates the placeholders through post-processors. A DSL for grammar transformation is used to customize a given grammar, meant for parsing, to be more suitable for test-data generation. Post-processors are derived from a corresponding object-oriented framework. The actual tool, Xtextgen, extends theXtext technology for language development.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Alanen, M., Porres, I.: A Relation Between Context-Free Grammars and Meta Object Facility Metamodels. Technical report, Turku Centre for CS (2003)

    Google Scholar 

  2. Brottier, E., Fleurey, F., Steel, J., Baudry, B., Traon, Y.L.: Metamodel-based test generation for model transformations: An algorithm and a tool. In: ISSRE, pp. 85–94. IEEE (2006)

    Google Scholar 

  3. Burgess, C.J.: The Automated Generation of Test Cases for Compilers. Software Testing, Verification and Reliability 4(2), 81–99 (1994)

    Article  Google Scholar 

  4. Burgueño, L., Wimmer, M., Troya, J., Vallecillo, A.: TractsTool: Testing Model Transformations based on Contracts. In: Demos/Posters/StudentResearch@MoDELS. CEUR Workshop Proceedings, vol. 1115, pp. 76–80 (2013)

    Google Scholar 

  5. Dean, T.R., Cordy, J.R., Malton, A.J., Schneider, K.A.: Grammar Programming in TXL. In: SCAM, p. 93. IEEE (2002)

    Google Scholar 

  6. Ehrig, K., Küster, J.M., Taentzer, G.: Generating instance models from meta models. Software and System Modeling 8(4), 479–500 (2009)

    Article  Google Scholar 

  7. Harm, J., Lämmel, R.: Two-dimensional Approximation Coverage. Informatica, 24(3) (2000)

    Google Scholar 

  8. Hoffman, D., Ly-Gagnon, D., Strooper, P.A., Wang, H.-Y.: Grammar-based test generation with YouGen. Softw. Pract. Exper. 41(4), 427–447 (2011)

    Article  Google Scholar 

  9. Hoffman, D., Wang, H.-Y., Chang, M., Ly-Gagnon, D., Sobotkiewicz, L., Strooper, P.A.: Two case studies in grammar-based test generation. Journal of Systems and Software 83(12), 2369–2378 (2010)

    Article  Google Scholar 

  10. Kats, L.C.L., Vermaas, R., Visser, E.: Integrated language definition testing: Enabling test-driven language development. In: OOPSLA, pp. 139–154. ACM (2011)

    Google Scholar 

  11. Kats, L.C.L., Vermaas, R., Visser, E.: Testing domain-specific languages. In: OOPSLA Companion, pp. 25–26. ACM (2011)

    Google Scholar 

  12. Kossatchev, A.S., Posypkin, M.A.: Survey of Compiler Testing Methods. Programming and Computing Software 31, 10–19 (2005)

    Article  Google Scholar 

  13. Lämmel, R.: Another DSL primer, 2013. Technical Documentation. Version 0.00003 as of (December 25, 2013), https://github.com/slebok/slepro/blob/master/docs/fsml/paper.tex .

  14. Lämmel, R., Schulte, W.: Controllable Combinatorial Coverage in Grammar-Based Testing. In: Uyar, M.Ü., Duale, A.Y., Fecko, M.A. (eds.) TestCom 2006. LNCS, vol. 3964, pp. 19–38. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  15. Lämmel, R., Zaytsev, V.: Recovering grammar relationships for the Java Language Specification. Software Quality Journal 19(2), 333–378 (2011)

    Article  Google Scholar 

  16. Maurer, P.: Generating Test Data with Enhanced Context-free Grammars. IEEE Software 7(4), 50–56 (1990)

    Article  Google Scholar 

  17. McKeeman, W.M.: Differential Testing for Software. Digital Technical Journal of Digital Equipment Corporation 10(1), 100–107 (1998)

    Google Scholar 

  18. Sirer, E.G., Bershad, B.N.: Using Production Grammars in Software Testing. SIGPLAN Notices 35, 1–13 (1999)

    Article  Google Scholar 

  19. Vallecillo, A., Gogolla, M., Burgueño, L., Wimmer, M., Hamann, L.: Formal Specification and Testing of Model Transformations. In: Bernardo, M., Cortellessa, V., Pierantonio, A. (eds.) SFM 2012. LNCS, vol. 7320, pp. 399–437. Springer, Heidelberg (2012)

    Chapter  Google Scholar 

  20. Zelenov, S.V., Zelenova, S.: Automated Generation of Positive and Negative Tests for Parsers. In: Grieskamp, W., Weise, C. (eds.) FATES 2005. LNCS, vol. 3997, pp. 187–202. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2014 Springer International Publishing Switzerland

About this paper

Cite this paper

Härtel, J., Härtel, L., Lämmel, R. (2014). Test-Data Generation for Xtext. In: Combemale, B., Pearce, D.J., Barais, O., Vinju, J.J. (eds) Software Language Engineering. SLE 2014. Lecture Notes in Computer Science, vol 8706. Springer, Cham. https://doi.org/10.1007/978-3-319-11245-9_19

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-11245-9_19

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-11244-2

  • Online ISBN: 978-3-319-11245-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics