Mockito

Mockito

Mockito is an open source testing framework for Java released under the MIT License. The framework allows the creation of Test Double objects called, "Mock Objects" in automated unit tests for the purpose of Test-driven Development (TDD) or Behavior Driven Development (BDD).

Contents

Distinguishing Features

Mockito distinguishes itself from other mocking frameworks by allowing developers to verify the behavior of the system under test (SUT) without establishing expectations beforehand[1]. One of the criticisms of Mock objects is that there is a tighter coupling of the test code to the SUT object code[2]. Since Mockito attempts to eliminate the expect-run-verify pattern[3] by removing the specification of expectations, the coupling is reduced or minimized. The result of this distinguishing feature is simpler test code that should be easier to read and modify.

Origins

Szczepan Faber started the Mockito project after finding existing mocking frameworks too complex and difficult to work with. Szczepan began by expanding on the syntax and functionality of Easy Mock, but eventually rewriting most of Mockito[4]. Szczepan's goal was to create a new framework that was easier to work with and provided better results. Early versions of Mockito project found use by the Guardian project in London in early 2008[5].

Usage

Mockito has a growing user-base[6] as well as finding use in other open source projects[7]. In the Stack Overflow discussion on What's the best mock framework for Java?, Mockito is the highest recommended answer[8].

See Also

References

External links


Wikimedia Foundation. 2010.

Игры ⚽ Нужен реферат?

Look at other dictionaries:

  • Mockito — Maintainer Szczepan Faber Aktuelle Version 1.9.0 (23. Juli 2011) Betriebssystem Plattformübergreifend …   Deutsch Wikipedia

  • PowerMock — Dieser Artikel wurde aufgrund von inhaltlichen Mängeln auf der Qualitätssicherungsseite der Redaktion Informatik eingetragen. Dies geschieht, um die Qualität der Artikel aus dem Themengebiet Informatik auf ein akzeptables Niveau zu bringen. Hilf… …   Deutsch Wikipedia

  • Easymock — Maintainer Tammo Freese, Henri Tremblay Entwickler OFFIS, Tammo Freese, Henri Tremblay Aktuelle Version 3.0 …   Deutsch Wikipedia

  • JUnit — Entwickler u.a. Kent Beck und Erich Gamma Aktuelle Version 4.10 (5. Oktober 2011) Betriebssystem Plattformübergreifend Programmier­sprache …   Deutsch Wikipedia

  • Разработка через тестирование — Разработка программного обеспечения Процесс разработки ПО Шаги процесса Анализ • Проектирование • Программирование • Докумен …   Википедия

  • Behavior Driven Development — (BDD) (deutsch Verhaltensgetriebene Softwareentwicklung) ist eine Technik der Agilen Softwareentwicklung, welche die Zusammenarbeit zwischen Qualitätsmanagement und Business Analyse in Softwareentwicklungsprojekten stärkt. Beim Behavior Driven… …   Deutsch Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”