TEST DRIVEN DEVELOPMENT PATTERNS AND TEST CODE REFACTORING

  • Slobodan Mirković Fakultet organizacionih nauka
  • Saša Lazarević Fakultet organizacionih nauka
Keywords: Тest driven development, refactoring, unit tests, mock objects

Abstract

Test driven development (TDD) is a software development process created as part of Extreme Programming, but has since been adopted by all of the other Agile methods. A central point in agile methods is working software and TDD is a process that is focused on producing reliable and maintainable software. TDD changes the role that testing has in the software development process and is not longer used only to detect errors in the system, but also helps the project team to better understand the functionality needed by the user. TDD process is based on the repetition of a short development cycle in which user requirements are transformed into tests, then write the minimum amount of code to pass that test, and at the end code is refactored. This paper discusses the patterns that are used in TDD as a way of structuring the code so that it is adapted for testing. Also referred to patterns that are used for writing unit tests and the green phase patterns that help us to, by making tests pass, get appropriate implementation of the requirements. It then provides an overview of the test double objects used in the tests as a substitute for the objects that will be used in production.
Published
2019-01-15
Section
Articles