Skip to main content

Property-Based Testing and Verification: A Catalog of Classroom Examples

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

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

Abstract

For the past a decade, John Hughes of Chalmers University and Quviq has pioneered property-based testing in debugging industrial software. Three undergraduate courses at the University of Oklahoma have paralleled this work, but on the pedagogical side and with the additional goal of verification of properties by mathematical proof, using both paper-and-pencil methods and mechanized logic. An essential part of both efforts, and probably the most important part, is the formalization in predicate logic of the expectations of software developers. This is central to engineering software quality in the defect dimension. This report discusses property-based testing in course work and provides some examples from the classroom. Hughes has observed that software properties useful for testing functional software often (1) compare the results of different ways of computing the same thing or (2) check that forward and inverse transformations restore the original data. What percentage of useful software properties fall into these categories? Our collection of examples from course records may help shed some light on how closely pedagogy on property-based testing matches observations of relative frequencies of various categories of properties in industry and may also serve as an educational aid in learning to use property-based testing effectively in software development.

Partially supported by National Science Foundation Award Number 1016532.

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. Eastlund, C.: Doublecheck your theorems. In: Proceedings of the 8th International Workshop on the ACL2 Theorem Prover and its Applications, pp. 42–46 (2009)

    Google Scholar 

  2. Classen, K., Hughes, J.: QuickCheck: A lightweight tool for random testing of Haskell programs. In: Proceedings of the 5th ACM SIGPLAN International Conference on Functional Programming, pp. 268–279 (2000)

    Google Scholar 

  3. Kaufmann, M., Manolios, P., Moore, J.S.: Computer-Aided Reasoning: An Approach. Kluwer Academic Publishers (2000)

    Google Scholar 

  4. Arts, T., Hughes, J., Johansson, J., Wiger, U.: Testing telecoms software with QuviQ QuickCheck. In: Proceedings of the 2006 ACM SIGPLAN Workshop on Erlang, pp. 2–10 (2006)

    Google Scholar 

  5. Derrick, J., Walkinshaw, N., Arts, T., Earle, C.B., Cesarini, F., Fredlund, L.-A., Gulias, V., Hughes, J., Thompson, S.: Property-Based Testing - The ProTest Project. In: de Boer, F.S., Bonsangue, M.M., Hallerstede, S., Leuschel, M. (eds.) FMCO 2009. LNCS, vol. 6286, pp. 250–271. Springer, Heidelberg (2010)

    Chapter  Google Scholar 

  6. Claessen, K., Palka, M., Smallbone, N., Hughes, J.: Finding race conditions in Erlang with QuickCheck and PULSE. In: Proceedings of the 14th ACM SIGPLAN International Conference on Functional Programming, pp. 149–160 (2009)

    Google Scholar 

  7. Claessen, K., Smallbone, N., Hughes, J.: QuickSpec: Guessing formal specifications using testing. In: Proceedings of the 4th International Conference on Tests and Proofs, pp. 6–21 (2010)

    Google Scholar 

  8. Hughes, J., Norell, U., Sautret, J.: Using temporal relations to specify and test an instant messaging server. In: Proceedings of the 32nd International Conference on Software Engineering, pp. 95–102 (2010)

    Google Scholar 

  9. Hughes, J., Bolinder, H.: Testing a database for race conditions with QuickCheck. In: Proceedings of the 10th ACM SIGPLAN Erlang Workshop, pp. 72–77 (2011)

    Google Scholar 

  10. Page Rex. 20 projects (2008), http://www.cs.ou.edu/~rlpage/SEcollab/20projects/

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

Page, R. (2012). Property-Based Testing and Verification: A Catalog of Classroom Examples. 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_9

Download citation

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

  • 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