Contract-based testing for PHP with Praspel

Abstract We summarize several contributions related to the PHP Realistic Annotation and SPEcification Language (Praspel). This language extends PHP programs with annotations for the formal specification of the behavior of their functions and for the declaration of types for their data. These contracts are used to automate test generation, by deriving test cases and test data, and test execution, by checking assertions at run-time in order to establish the test verdict. Our approach to contract-based testing for PHP is fully implemented into a PHP framework currently in use by several web companies.

[1]  Hong Sun,et al.  Investigating the use of analysis contracts to improve the testability of object‐oriented code , 2003, Softw. Pract. Exp..

[2]  P. K. Kapur,et al.  Measuring reliability growth of software by considering fault dependency, debugging time Lag functions and irregular fluctuation , 2010, SOEN.

[3]  Carlos E. Rubio-Medrano,et al.  Random Test Data Generation for Java Classes Annotated with JML Specifications , 2007, Software Engineering Research and Practice.

[4]  Bertrand Meyer,et al.  Automatic testing of object-oriented software , 2011 .

[5]  Daniel M. Zimmerman,et al.  JMLUnit: The Next Generation , 2010, FoVeOOS.

[6]  Fabrice Bouquet,et al.  Grammar-Based Testing Using Realistic Domains in PHP , 2012, 2012 IEEE Fifth International Conference on Software Testing, Verification and Validation.

[7]  Christopher G. Lasater,et al.  Design Patterns , 2008, Wiley Encyclopedia of Computer Science and Engineering.

[8]  Catherine Oriat,et al.  Jartege: A Tool for Random Generation of Unit Tests for Java Classes , 2004, QoSA/SOQUA.

[9]  Bertrand Meyer,et al.  Eiffel: programming for reusability and extendibility , 1987, SIGP.

[10]  Stephan Weißleder,et al.  Deriving Input Partitions from UML Models for Automatic Test Generation , 2008, MoDELS.

[11]  Bernard Botella,et al.  A CLP Framework for Computing Structural Test Data , 2000, Computational Logic.

[12]  Gary T. Leavens,et al.  A Simple and Practical Approach to Unit Testing: The JML and JUnit Way , 2002, ECOOP.

[13]  Arnaud Gotlieb Euclide: A Constraint-Based Testing Framework for Critical C Programs , 2009, 2009 International Conference on Software Testing Verification and Validation.

[14]  Sami Hyrynsalmi,et al.  Reducing the number of unit tests with design by contract , 2011, CompSysTech '11.

[15]  Boris Beizer,et al.  Black Box Testing: Techniques for Functional Testing of Software and Systems , 1996, IEEE Software.

[16]  Bruno Legeard,et al.  A taxonomy of model‐based testing approaches , 2012, Softw. Test. Verification Reliab..

[17]  Pieter J. Mosterman,et al.  Model-Based Testing for Embedded Systems , 2011, Computational Analysis, Synthesis, & Design Dynamic Systems.

[18]  簡聰富,et al.  物件導向軟體之架構(Object-Oriented Software Construction)探討 , 1989 .

[19]  Albert L. Baker,et al.  JML: A Notation for Detailed Design , 1999, Behavioral Specifications of Businesses and Systems.

[20]  Alan K. Mackworth Consistency in Networks of Relations , 1977, Artif. Intell..

[21]  Guoqing Xu,et al.  JMLAutoTest: A Novel Automated Testing Framework Based on JML and JUnit , 2003, FATES.

[22]  Fabrice Bouquet,et al.  Automated Boundary Test Generation from JML Specifications , 2006, FM.

[23]  Peter M. Maurer,et al.  Generating test data with enhanced context-free grammars , 1990, IEEE Software.

[24]  Bernhard K. Aichernig,et al.  Contract-Based Testing , 2002, 10th Anniversary Colloquium of UNU/IIST.

[25]  Nikolai Tillmann,et al.  Parameterized unit tests , 2005, ESEC/FSE-13.

[26]  Alain Giorgetti,et al.  Praspel: A Specification Language for Contract-Based Testing in PHP , 2011, ICTSS.

[27]  Frank Tip,et al.  Finding bugs in dynamic web applications , 2008, ISSTA '08.

[28]  Bertrand Meyer,et al.  Programs That Test Themselves , 2009, Computer.

[29]  Alain Giorgetti,et al.  Verification of class liveness properties with java modelling language , 2008, IET Softw..

[30]  Sarfraz Khurshid,et al.  Korat: automated testing based on Java predicates , 2002, ISSTA '02.

[31]  Anju Saha,et al.  Improving the testability of object oriented software through software contracts , 2010, ACM SIGSOFT Softw. Eng. Notes.

[32]  Arnaud Gotlieb TCAS software verification using constraint programming , 2012, Knowl. Eng. Rev..

[33]  Per Madsen,et al.  Enhancing Design by Contract with Knowledge about Equivalence Partitions , 2004, J. Object Technol..

[34]  Fabrice Bouquet,et al.  A Constraint Solver for PHP Arrays , 2013, 2013 IEEE Sixth International Conference on Software Testing, Verification and Validation Workshops.

[35]  Bertrand Meyer,et al.  Applying 'design by contract' , 1992, Computer.

[36]  Peter Thiemann,et al.  Contract-Driven Testing of JavaScript Code , 2010, TOOLS.