An Informal Formal Method for Systematic JUnit Test Case Generation

  • Authors:
  • P. David Stotts;Mark Lindsey;Angus Antley

  • Affiliations:
  • -;-;-

  • Venue:
  • Proceedings of the Second XP Universe and First Agile Universe Conference on Extreme Programming and Agile Methods - XP/Agile Universe 2002
  • Year:
  • 2002

Quantified Score

Hi-index 0.00

Visualization

Abstract

The JUnit testing tool is widely used to support the central XP concept of "test first" software development. While JUnit provides Java classes for expressing test cases and test suites, it does not provide or proscribe per se any guidelines for deciding what test cases are good ones for any particular class. We have developed a method for systematically creating complete and consistent test classes for JUnit. Called JAX (for Junit Axioms), the method is based on Guttag's algebraic specification of abstract data types. We demonstrate an informal use of ADT semantics for guiding JUnit test method generation; the programmer uses no formal notation other than Java, and the procedure meshes with XP test-as-design principles. Preliminary experiments show that informal JAX-based testing finds more errors than an ad hoc form of JUnit testing.