• DocumentCode
    2303215
  • Title

    Test-Oriented Languages: Is it Time for a New Era?

  • Author

    Stopford, Benjamin

  • Author_Institution
    R. Bank of Scotland, London, UK
  • fYear
    2011
  • fDate
    21-25 March 2011
  • Firstpage
    444
  • Lastpage
    449
  • Abstract
    More than a decade has passed since the advent of Test Driven Development and the introduction of the tools that facilitate its practice. However, it is our belief that we are nearing the limits through which functional decoration can aid the testing of current imperative languages. This paper presents a thought experiment to explore improvements to the testability of current imperative languages. We use the guise of a hypothetical language, Quilt, to present one path that such a language might take. For brevity we retain the language constructs of current imperative languages like Java and C# and explore alterations in the compiler operation that make the language more test-oriented. Quilt extends the Mockist Test Driven Development approach [2,9] by integrating the role of unit test isolation into the compiler. The application is split into a patchwork of independently testable units. However, unlike current Mocking frameworks [5,11,12], Quilt isolates through the provision of stub Methods, not Objects. Methods that do not return state (or mutate passed references) are automatically stubbed. Methods that do return state cause compilation failures if a stub has not been provided. Through static analysis the compiler minimises the number of interactions that require isolation, reducing coupling between test and class (when compared to current testing practices). The effect is to significantly reduce the barriers to testing: Less test setup is needed, there is no need to inject dependencies for the purpose of testing and even preexisting code is easy to test. We conclude that testing in current object-oriented programming languages is already largely incumbent and ultimately inevitable. However, the penetration of the Mockist approach has been limited somewhat by a high barrier to entry and adverse side effects experienced under certain conditions. We make a case for the value of unit test isolation and describe a mechanism for lowering this barrier for entry, reduci- - ng coupling issues, and generally making TDD easier.
  • Keywords
    object-oriented languages; program testing; programming languages; C# languages; Java language; Mockist Test Driven Development approach; Mockist approach; TDD; functional decoration; object-oriented programming languages; test driven development; test-oriented languages; unit test isolation; Couplings; Java; Mixers; Program processors; Testing; programming language; test driven development; testing;
  • fLanguage
    English
  • Publisher
    ieee
  • Conference_Titel
    Software Testing, Verification and Validation Workshops (ICSTW), 2011 IEEE Fourth International Conference on
  • Conference_Location
    Berlin
  • Print_ISBN
    978-1-4577-0019-4
  • Electronic_ISBN
    978-0-7695-4345-1
  • Type

    conf

  • DOI
    10.1109/ICSTW.2011.46
  • Filename
    5954445