• DocumentCode
    2417631
  • Title

    Prose+test cases=specifications

  • Author

    Hoffman, Daniel ; Strooper, Paul

  • Author_Institution
    Dept. of Comput. Sci., Victoria Univ., BC, Canada
  • fYear
    2000
  • fDate
    2000
  • Firstpage
    239
  • Lastpage
    250
  • Abstract
    The rise of component based software development has created a need for API documentation. Experience has shown that it is hard to create and maintain precise and readable documentation. Prose documentation can provide a good overview but lacks precision. Formal methods offer precision but the resulting documentation is expensive to write and modify. Worse, few developers have the skill or inclination to read formal documentation. We present a pragmatic solution to the problem of API documentation. We augment the current prose documentation with test cases, including expected outputs, and use the prose plus the test cases as the documentation. Typically there are one or two simple test cases for each likely question about API behavior. With this approach, the documentation is precise, albeit partial. Consistency between code and documentation is guaranteed by running the test cases. The readability of the test cases is of paramount importance because communication with API users is their primary purpose. We present a test script language that supports compact, readable test cases and generation of test drivers, and illustrate the approach with a detailed case study
  • Keywords
    application program interfaces; formal specification; object-oriented programming; program testing; system documentation; API behavior; API documentation; API users; case study; component based software development; expected outputs; formal methods; pragmatic solution; prose documentation; readability; readable documentation; readable test cases; simple test cases; specifications; test drivers; test script language; Australia; Computer aided software engineering; Computer science; Documentation; Java; Programming; Prototypes; Software libraries; Software prototyping; Testing;
  • fLanguage
    English
  • Publisher
    ieee
  • Conference_Titel
    Technology of Object-Oriented Languages and Systems, 2000. TOOLS 34. Proceedings. 34th International Conference on
  • Conference_Location
    Santa Barbara, CA
  • ISSN
    1530-2067
  • Print_ISBN
    0-7695-0774-3
  • Type

    conf

  • DOI
    10.1109/TOOLS.2000.868975
  • Filename
    868975