Frameworks for Testing in Java Using Mock Objects
Thesis title: | Frameworky pro testování v Javě využívajicí mock objekty |
---|---|
Author: | Kolmistr, Tomáš |
Thesis type: | Bakalářská práce |
Supervisor: | Pavlíčková, Jarmila |
Opponents: | Sklenář, Pavel |
Thesis language: | Česky |
Abstract: | Cílem této práce je představit a porovnat možnosti testování s mock objekty v Javě. Ač je na internetu ke stažení značné množství frameworků s mock objekty, jejich kvalita je často pochybná a využitelnost mimo metodiku Test-driven development výrazně omezená. Pro srovnání v této práci byly vybrány celkem tři frameworky, které vyhověly výběrovým podmínkám. Těmito frameworky jsou: Mockito, Easy- Mock a JMock. Porovnání probíhá na stejné aplikaci pro všechny tři frameworky dle předem daných kritérií. Na jednoduchých ukázkách jsou prezentovány jak společné funkčnosti jednotlivých frameworků, tak i specifika jednotlivých frameworků včetně možných řešení konkrétních nedostatků. V předposlední kapitole následuje shrnutí a srovnání použitelnosti jednotlivých nástrojů. |
Keywords: | framework; mock objekt; Java; Mockito; EasyMock; JMock |
Thesis title: | Frameworks for Testing in Java Using Mock Objects |
---|---|
Author: | Kolmistr, Tomáš |
Thesis type: | Bachelor thesis |
Supervisor: | Pavlíčková, Jarmila |
Opponents: | Sklenář, Pavel |
Thesis language: | Česky |
Abstract: | The aim of this thesis is to introduce and compare the possibilities of testing via mock objects in Java. Although many mock object frameworks are downloadable from the internet, their quality is often arguable and their usability beyond the test driven development methodology is significantly limited. Three frameworks comply-ing with given prerequisities were selected for comparison within this thesis. These frameworks are: Mockito, EasyMock and JMock. The comparison is run with an identical application for all three frameworks, according to predefined criteria. Simple examples were used to demonstrate functionalities common to all three frameworks, as well as specificities of individual frameworks, including possible solutions for particular drawbacks. The final chapter includes a summary and a usability comparison of given tools. |
Keywords: | JMock; Java; mock object; framework; EasyMock; Mockito |
Information about study
Study programme: | Aplikovaná informatika/Informatika |
---|---|
Type of study programme: | Bakalářský studijní program |
Assigned degree: | Bc. |
Institutions assigning academic degree: | Vysoká škola ekonomická v Praze |
Faculty: | Faculty of Informatics and Statistics |
Department: | Department of Information Technologies |
Information on submission and defense
Date of assignment: | 1. 2. 2013 |
---|---|
Date of submission: | 15. 5. 2013 |
Date of defense: | 27. 6. 2013 |
Identifier in the InSIS system: | https://insis.vse.cz/zp/37122/podrobnosti |