Lista przedmiotów z materiałami udostępnionymi dla studentów

Dla_studentów
  • Increase font size
  • Default font size
  • Decrease font size

Julian Warszawski

X-Unit Framework Application in Test Driven Software Development


X-Unit Framework Application in Test Driven Development


Opiekun pracy dyplomowej: dr inż. Piotr Korbel prof. ucz.
Praca dyplomowa ife obroniona 2009-03-09
Streszczenie pracy dyplomowej:
Praca przedstawia metodę rozwoju oprogramowania znaną jako “Rozwój Sterowany Testami” (z ang. Test Driven Development - TDD). Oprócz samej techniki prezentowany jest zbiór narzędzi wspomagających. Na jedno z narzędzi – framework XUnit zostanie zwrócona szczególna uwaga. Rozdział pierwszy ukazuje typowe problemy spotykane podczas rozwoju oprogramowania. Wymienione trudności okazują się być głównym powodem powstawania nowych technik, takich, jak TDD. Czytelnik będzie zaznajomiony z problemem i motywami stojącymi za wyborem tematu pracy. Drugi rozdział prezentuje ogólne podejście do problemu. Przedstawia testowanie jako autonomiczną dziedzinę rozwoju oprogramowania. Czytelnik poznaje definicję oraz różne podejścia do testowania. Opisany jest nowoczesny model podziału metod testowania. Każda z wymienionych metod jest opisana bez wnikania w detale. W kolejnym rozdziale wyjawiona zostaje idea testów jednostkowych. Poznajemy zalety wykorzystania testów podczas rozwoju oprogramowania. Przedstawiona jest również ogólna struktura typowego szkieletu testów jednostkowych. Ostatnia sekcja ukazuje sposoby zintegrowania testów jednostkowych w projekcie informatycznym. Technika Rozwoju Sterowanego Testami wprowadzona zostaje w rozdziale 4. Czytelnik poznaje, jak wygląda pełny cykl TDD. Przedstawione zostają również zalety oraz wady korzystania z techniki TDD. Rozdział 4 poświęcony jest szkieletowi testów jednostkowych – XUnit. Przedstawia pokrótce historię oraz strukturę szkieletu. Pod koniec można poznać sugestie dotyczące umiejscowienia testów w projekcie. Problem praktycznego zastosowania szkieletu XUnit w metodzie TDD podjęty zostaje w rozdziale 6. Autor identyfikuje te zadania programistyczne, które są najbardziej popularne wśród informatyków. Zadania są podzielone na pięć odrębnych projektów, które realizowane są w kolejności licząc od najłatwiejszego. Ponieważ dla tej pracy proces rozwoju oprogramowania jest tak samo istotny jak produkt końcowy, dla każdego projektu ważniejsze kwestie związane z jego rozwojem są szczegółowo opisane. Ostatni rozdział prezentuje refleksje autora w związku z wykorzystanymi metodami i narzędziami. Czytelnik dowiaduje się jak TDD wpływa na testowanie i rozwój kodu, oraz jak metoda TDD może być odbierana przez menedżera projektu. Następna sekcja wyjaśnia jak szkielet XUnit współgra z metodą TDD. Ostatnia sekcja rozdziału prezentuje ograniczenia metody TDD oraz kilka cennych wskazówek dla programistów, jak można radzić sobie z tymi ograniczeniami.
Abstract:
This document presents a modern software development technique known as Test Driven Development. Apart from the technique itself, the set of useful tools for application with TDD is presented. One of these tools – XUnit framework will have distinctive focus. First chapter – “Introduction” reveals common problems that occur during software development. These problems come out to be the main reason for emergence of new programming techniques with TDD among them. Reader will be briefly introduced to the problem and motivations for undertaking it as the subject for the thesis. Second chapter – “The concept of software testing” is perhaps the most general chapter. It presents software testing as an autonomic domain of software engineering. First a definition and quick overview of software testing is stated. Then reader is familiarized with different approaches to testing and recognizes a contemporary model of software testing methods taxonomy – the V model. After that individual testing methods are briefly described. The following chapter is called “Overview of unit testing method”. The discussion is more focused and more detailed in this section. The idea behind unit test is explained first. Next one can find what advantages result from application of unit testing method. A general structure of unit testing framework is explained and finally the reader is familiarized with methods of integrating unit testing concept into the software project lifecycle. Test Driven Development technique itself is introduced in chapter 4. The main idea behind TDD – Test First concept is explained at the very beginning of the chapter. Next reader recognizes how a complete TDD cycle looks like. Advantages and disadvantages of utilizing TDD are presented as the last part of the chapter. Chapter 5 brings in the explanation of XUnit framework. It starts with presentation of XUnit history and general structure, which comes out to be very simple. Next individual elements of XUnit structure are presented: a unit test, common test context and a test suite. Finally suggestions about arrangement of unit tests in the project are stated. The presentation of practical application of XUnit and TDD takes place in chapter 6 called “TDD in practice”. Author identifies programming tasks that are most common among developers. These tasks will be evaluated in terms of TDD applicability. Tasks are divided into five separate projects and each of these projects is realized sequentially starting from the one, which seems to be the easiest. Since in the scope of this thesis the process of development is of the same importance as the final outcome, for each project interesting aspects of the development process are described. Each of the projects addresses a certain problem or issue that developer can come across when applying TDD. These problems are presented together with suggested solutions. Last chapter – “Conclusions” presents reflections of the author about exploited methods and tools. First section explains how TDD influences software testing. The second concerns software development and third goes up in levels of abstraction and presents how introduction of TDD can be viewed by the project manager. Afterwards there is a section explaining applicability of XUnit framework in TDD. Its advantages over other frameworks are stated as well as some drawbacks. Finally at last section of the chapter limitations of TDD are revealed together with suggestions for developers about avoiding some pitfalls they can come across during application of TDD.