Skip to main content

Model Based Testing with Logical Properties versus State Machines

  • Conference paper
Implementation and Application of Functional Languages (IFL 2011)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 7257))

Abstract

Model-based testing of single functions is usually based on logical properties as specification. In practice it appears to be rather hard to develop a sufficiently strong set of properties to spot all errors. For model-based testing of state based systems one usually employs a state machine as model and a conformance relation between this specification and the software under test. For (abstract) data types we can use both ways of model-based testing. In this paper we compare the specification effort required to make a model that is able to find issues and the number of tests needed to find issues for some well-known data types. Our examples show that it can be easier to write state based specifications. Moreover, state based testing of data types finds more implementation issues and is very efficient.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 54.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 72.00
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

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Adelson-Velskii, G., Landis, E.: An algorithm for the organization of information. Soviet Mathematics Monthly 3, 1259–1263 (1962)

    Google Scholar 

  2. Arts, T., Castro, L.M., Hughes, J.: Testing Erlang data types with Quviq Quickcheck. In: Proceedings of the 7th ACM SIGPLAN Workshop on ERLANG, ERLANG 2008, pp. 1–8. ACM, New York (2008)

    Chapter  Google Scholar 

  3. Bernardy, J.-P., Jansson, P., Claessen, K.: Testing Polymorphic Properties. In: Gordon, A.D. (ed.) ESOP 2010. LNCS, vol. 6012, pp. 125–144. Springer, Heidelberg (2010)

    Chapter  Google Scholar 

  4. Burton, F.W.: An efficient functional implementation of FIFO queues. Inf. Process. Lett. 14(5), 205–206 (1982)

    Article  MathSciNet  Google Scholar 

  5. Christiansen, J., Fischer, S.: EasyCheck — Test Data for Free. In: Garrigue, J., Hermenegildo, M.V. (eds.) FLOPS 2008. LNCS, vol. 4989, pp. 322–336. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  6. Claessen, K., Hughes, J.: QuickCheck: a lightweight tool for random testing of Haskell programs. In: Proceedings of the 5th International Conference on Functional Programming, ICFP 2000, pp. 268–279. ACM, Montreal (2000)

    Chapter  Google Scholar 

  7. Claessen, K., Hughes, J.: Testing monadic code with quickcheck. SIGPLAN Not. 37, 47–59 (2002)

    Article  Google Scholar 

  8. Feijs, L.M.G., Jonkers, H.B.M.: Formal Specification and Design. Cambridge University Press (1992)

    Google Scholar 

  9. Guttag, J.V., Horning, J.J.: The algebraic specification of abstract data types. Acta Informatica 10, 27–52 (1978)

    Article  MathSciNet  MATH  Google Scholar 

  10. Koopman, P., Plasmeijer, R.: Effective test set generation for model-based testing (submitted for publication)

    Google Scholar 

  11. Koopman, P., Plasmeijer, R.: Fully Automatic Testing with Functions as Specifications. In: Horváth, Z. (ed.) CEFP 2005. LNCS, vol. 4164, pp. 35–61. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  12. Okasaki, C.: Purely Functional Data Structures. Cambridge University Press (1998)

    Google Scholar 

  13. Oriat, C.: Jartege: A Tool for Random Generation of Unit Tests for Java Classes. In: Reussner, R., Mayer, J., Stafford, J.A., Overhage, S., Becker, S., Schroeder, P.J. (eds.) QoSA 2005 and SOQUA 2005. LNCS, vol. 3712, pp. 242–256. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  14. Pacheco, C., Ernst, M.D.: Randoop: feedback-directed random testing for Java. In: Companion to the 22nd ACM SIGPLAN Conference on Object-oriented Programming Systems and Applications Companion, OOPSLA 2007 (2007)

    Google Scholar 

  15. Prasetya, W., Vos, T., Baars, A.: Trace-based reflexive testing of OO programs with T2. In: Proceedings of the 2008 International Conference on Software Testing, Verification, and Validation, pp. 151–160. IEEE Computer Society (2008)

    Google Scholar 

  16. Runciman, C., Naylor, M., Lindblad, F.: Smallcheck and lazy Smallcheck: automatic exhaustive testing for small values. SIGPLAN Not. 44, 37–48 (2008)

    Article  Google Scholar 

  17. Tretmans, J.: Testing Concurrent Systems: A Formal Approach. In: Baeten, J.C.M., Mauw, S. (eds.) CONCUR 1999. LNCS, vol. 1664, pp. 46–65. Springer, Heidelberg (1999)

    Chapter  Google Scholar 

  18. Tretmans, J., Brinksma, E.: TorX: automated model based testing. In: Hartman, A., Dussa-Zieger, K. (eds.) Proceedings of the 1st European Conference on Model-Driven Software Engineering, MDSE 2003, Nurnberg, Germany (2003)

    Google Scholar 

  19. Voigtländer, J.: Much ado about two (pearl): a pearl on parallel prefix computation. In: Proceedings of the 35th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2008, pp. 29–35. ACM, New York (2008)

    Chapter  Google Scholar 

  20. de Vries, R., Tretmans, J.: On-the-fly conformance testing using SPIN. Software Tools for Technology Transfer, STTT 2(4), 382–393 (2000)

    Article  MATH  Google Scholar 

  21. van Weelden, A., Oostdijk, M., Frantzen, L., Koopman, P., Tretmans, J.: On-the-fly formal testing of a smart card applet. In: Sasaki, R., Qing, S., Okamoto, E., Yoshiura, H. (eds.) Proceedings of the 20th International Information Security Conference, SEC 2005, Makuhari Messe, Chiba, Japan, pp. 564–576. Springer (May 2005); Also available as Technical Report NIII-R0428

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2012 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Koopman, P., Achten, P., Plasmeijer, R. (2012). Model Based Testing with Logical Properties versus State Machines. In: Gill, A., Hage, J. (eds) Implementation and Application of Functional Languages. IFL 2011. Lecture Notes in Computer Science, vol 7257. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-34407-7_8

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-34407-7_8

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-34406-0

  • Online ISBN: 978-3-642-34407-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics