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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Adelson-Velskii, G., Landis, E.: An algorithm for the organization of information. Soviet Mathematics Monthly 3, 1259–1263 (1962)
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)
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)
Burton, F.W.: An efficient functional implementation of FIFO queues. Inf. Process. Lett. 14(5), 205–206 (1982)
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)
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)
Claessen, K., Hughes, J.: Testing monadic code with quickcheck. SIGPLAN Not. 37, 47–59 (2002)
Feijs, L.M.G., Jonkers, H.B.M.: Formal Specification and Design. Cambridge University Press (1992)
Guttag, J.V., Horning, J.J.: The algebraic specification of abstract data types. Acta Informatica 10, 27–52 (1978)
Koopman, P., Plasmeijer, R.: Effective test set generation for model-based testing (submitted for publication)
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)
Okasaki, C.: Purely Functional Data Structures. Cambridge University Press (1998)
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)
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)
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)
Runciman, C., Naylor, M., Lindblad, F.: Smallcheck and lazy Smallcheck: automatic exhaustive testing for small values. SIGPLAN Not. 44, 37–48 (2008)
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)
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)
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)
de Vries, R., Tretmans, J.: On-the-fly conformance testing using SPIN. Software Tools for Technology Transfer, STTT 2(4), 382–393 (2000)
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
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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)