• DocumentCode
    708971
  • Title

    Writing unit tests: It´s now or never!

  • Author

    Klammer, Claus ; Kern, Albin

  • Author_Institution
    Software Competence Center Hagenberg GmbH, Hagenberg, Austria
  • fYear
    2015
  • fDate
    13-17 April 2015
  • Firstpage
    1
  • Lastpage
    4
  • Abstract
    Unit testing is an important quality assurance method but a challenge in the context of legacy code. We share our experiences in trying to create tests for existing code by means of two examples from a large industrial software system and list common testability issues observed. Although much effort and resources have been invested, the retrofitting of unit tests was only partially successful. Our findings are that the probability that code without initial tests will ever get covered by unit tests is very low. Only the existence of unit tests ensures testability of the code under test. Besides finding defects unit tests also ensure modular design, which is the base for reuse, maintainability and testability. As a consequence, code and tests should be written together, ideally in a test-driven way.
  • Keywords
    program testing; software maintenance; software quality; software reusability; industrial software system; legacy code; maintainability; modular design; quality assurance method; testability; testability issues; unit testing; Context; Manuals; Software systems; Software testing; Writing; legacy code; test automation; testability; unit testing;
  • fLanguage
    English
  • Publisher
    ieee
  • Conference_Titel
    Software Testing, Verification and Validation Workshops (ICSTW), 2015 IEEE Eighth International Conference on
  • Conference_Location
    Graz
  • Type

    conf

  • DOI
    10.1109/ICSTW.2015.7107469
  • Filename
    7107469