A PropEr Integration of Types and Function Specifications with Property-Based Testing

被引:0
作者
Papadakis, Manolis [1 ]
Sagonas, Konstantinos [1 ]
机构
[1] Natl Tech Univ Athens, Sch Elect & Comp Engn, GR-10682 Athens, Greece
来源
ERLANG 11: PROCEEDINGS OF THE 2011 ACM SIGPLAN ERLANG WORKSHOP | 2011年
关键词
property-based testing; type declarations; function signatures; test generators; Erlang;
D O I
暂无
中图分类号
TP3 [计算技术、计算机技术];
学科分类号
0812 ;
摘要
We present a tight integration of the language of types and function specifications of Erlang with property-based testing. To achieve this integration we have developed from scratch PropEr, an open-source QuickCheck-inspired property-based testing tool. We present technical details of this integration, most notably how the conversion of recursive types into appropriate generators takes place and how function specifications can be turned automatically into simple properties in order to exercise the code of these functions. Finally, we present experiences and advice for the proper use of PropEr.
引用
收藏
页码:39 / 50
页数:12
相关论文
共 9 条
[1]  
[Anonymous], 2006, P 2006 ACM SIGPLAN W
[2]  
[Anonymous], 2011, US GUID
[3]  
Carlson R., 2006, International Conference on Renewable Energies and Power Quality, V1, P1, DOI 10.1145/1159789.1159791
[4]   QuickCheck: A lightweight tool for random testing of Haskell programs [J].
Claessen, K ;
Hughes, J .
ACM SIGPLAN NOTICES, 2000, 35 (09) :268-279
[5]  
Jiménez M, 2007, ERLANG'07: PROCEEDINGS OF THE 2007 SIGPLAN ERLANG WORKSHOP, P11
[6]  
Lindahl T., 2006, PPDP 2006. Proceedings of the Eighth ACM SIGPLAN Symposium on Principles and Practice of Declarative Programming, P167, DOI 10.1145/1140335.1140356
[7]  
PropEr, 2011, PROP BAS TEST ERL
[8]  
Rushby J, 2008, LECT NOTES COMPUT SC, V4171, P161
[9]  
Thorup K. K., 2011, TRIQ TRIFORK QUICKCH