Praspel: a specification language for contract-based testing in PHP

  • Authors:
  • Ivan Enderlin;Frédéric Dadeau;Alain Giorgetti;Abdallah Ben Othman

  • Affiliations:
  • LIFC / INRIA CASSIS Project,Besançon cedex, France;LIFC / INRIA CASSIS Project,Besançon cedex, France;LIFC / INRIA CASSIS Project,Besançon cedex, France;LIFC / INRIA CASSIS Project,Besançon cedex, France

  • Venue:
  • ICTSS'11 Proceedings of the 23rd IFIP WG 6.1 international conference on Testing software and systems
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

We introduce in this paper a new specification language named Praspel, for PHP Realistic Annotation and SPEcification Language. This language is based on the Design-by-Contract paradigm. Praspel clauses annotate methods of a PHP class in order to both specify their contracts, using pre- and postconditions, and assign realistic domains to the method parameters. A realistic domain describes a set of concrete, and hopefully relevant, values that can be assigned to the data of a program (class attributes and method parameters). Praspel is implemented into a unit test generator for PHP that offers a random test data generator, which computes test data, coupled with a runtime assertion checker, which decides whether a test passes or fails by checking the satisfaction of the contracts at run-time.