ABSTRACT
Data types are the core of many applications, and libraries offering implementations of data types should better be solid and well tested. Testing purely functional data types with QuickCheck provides a complete test method for data types, but establishing a complete test method for data types with side-effects is still an open issue. In this paper we show how we can use a stateful QuickCheck model to establish a complete test method for any data type. Considering side effects allows us to move from the purely functional world to the imperative world, as needed to face the testing of data types implementations in languages such as C. We therefore applied our method to some of the data types provided by the well-known GNOME Glib library.
Supplemental Material
- Arts, T., Castro, L.M., Hughes, J.: Testing Erlang Data Types with Quviq QuickCheck. In: Proceedings of the ACM SIGPLAN Workshop on Erlang, ACM Press (2008) Google ScholarDigital Library
- Lamb, D.A.: IDL: Sharing intermediate representations. ACM Transactions on Programming Languages and Systems 9(3) (1987) 297--318 Google ScholarDigital Library
- Ericsson AB: Yecc: LALR-1 parser generator library for Erlang/OTP. http://www.erlang.org/doc/man/yecc.htmlGoogle Scholar
- Johnson, S.C.: Yacc: Yet another compiler-compiler. Technical report, AT&T Bell Laboratories (1979)Google Scholar
- Arts, T., Hughes, J., Johansson, J., Wiger, U.: Testing Telecoms Software with Quviq QuickCheck. In: Proceedings of the ACM SIGPLAN Workshop on Erlang, ACM Press (2006) Google ScholarDigital Library
- Castro, L.M., Arts, T.: Testing Data Consistency of Data-Intensive Applications Using QuickCheck. Electronic Notes in Theoretical Computer Science 271 (2011) 41--62 Proceedings of the Tenth Spanish Conference on Programming and Languages (PROLE 2010). Google ScholarDigital Library
- King, J.C.: Symbolic execution and program testing. Communications of the ACM 19(7) (1976) 385--394 Google ScholarDigital Library
- GNOME: Glib reference manual. http://library.gnome.org/devel/glib/stable/Google Scholar
- Free Software Foundation: GNU Project. http://www.gnu.orgGoogle Scholar
- Ericsson AB: Erlang Syntax Tools, OTP documentation. http://www.erlang.org/doc/apps/syntax_tools/index.htmlGoogle Scholar
Index Terms
- Model-based testing of data types with side effects
Recommendations
Testing Erlang data types with quviq quickcheck
ERLANG '08: Proceedings of the 7th ACM SIGPLAN workshop on ERLANGWhen creating software, data types are the basic bricks. Most of the time a programmer will use data types defined in library modules, therefore being tested by many users over many years. But sometimes, the appropriate data type is unavailable in the ...
Testing blocking operations with QuickCheck's component library
Erlang '13: Proceedings of the twelfth ACM SIGPLAN workshop on ErlangIt is a challenge to write test cases for software with blocking operations, i.e. operations that do not return until data become available. One should prevent the test case itself to block, whereas at the same time, one wants to test the blocking ...
Advanced management of data integrity: property-based testing for business rules
Software testing is a very delicate aspect of software development, since designing good test sets is a non-trivial task. In this article, we describe a testing technique for testing business rules using property-based testing and the property-based ...
Comments