Test-Driven Development. As it should be.



Samankaltaiset tiedostot
BDD (behavior-driven development) suunnittelumenetelmän käyttö open source projektissa, case: SpecFlow/.NET.

Skene. Games Refueled. Muokkaa perustyyl. for Health, Kuopio

Arkkitehtuuritietoisku. eli mitä aina olet halunnut tietää arkkitehtuureista, muttet ole uskaltanut kysyä

Miehittämätön meriliikenne

Information on preparing Presentation

TIEKE Verkottaja Service Tools for electronic data interchange utilizers. Heikki Laaksamo

7. Product-line architectures

ProAgria. Opportunities For Success

Network to Get Work. Tehtäviä opiskelijoille Assignments for students.

On instrument costs in decentralized macroeconomic decision making (Helsingin Kauppakorkeakoulun julkaisuja ; D-31)

CIO muutosjohtajana yli organisaatiorajojen

Ostamisen muutos muutti myynnin. Technopolis Business Breakfast

Globaalisti Hajautettu Ohjelmistokehitys Mitä, Miksi & Miten? Maria Paasivaara

Capacity Utilization

Hankkeiden vaikuttavuus: Työkaluja hankesuunnittelun tueksi

On instrument costs in decentralized macroeconomic decision making (Helsingin Kauppakorkeakoulun julkaisuja ; D-31)

ECVETin soveltuvuus suomalaisiin tutkinnon perusteisiin. Case:Yrittäjyyskurssi matkailualan opiskelijoille englantilaisen opettajan toteuttamana

Innovative and responsible public procurement Urban Agenda kumppanuusryhmä. public-procurement

812336A C++ -kielen perusteet,

Esitykset jaetaan tilaisuuden jälkeen, saat linkin sähköpostiisi. Toivottavasti vastaat myös muutamaan kysymykseen tapahtumasta Have a lot of fun!

Aalto Service Factory

WAMS 2010,Ylivieska Monitoring service of energy efficiency in housing Jan Nyman,

Windows Phone. Module Descriptions. Opiframe Oy puh Espoo

Tekes the Finnish Funding Agency for Technology and Innovation. Copyright Tekes

1.3Lohkorakenne muodostetaan käyttämällä a) puolipistettä b) aaltosulkeita c) BEGIN ja END lausekkeita d) sisennystä

Miten saan käytännössä kaupan käyntiin halutussa. maassa? & Case Intia

DIGITAL MARKETING LANDSCAPE. Maatalous-metsätieteellinen tiedekunta

HUMAN RESOURCE DEVELOPMENT PROJECT AT THE UNIVERSITY OF NAMIBIA LIBRARY

Uusi Ajatus Löytyy Luonnosta 4 (käsikirja) (Finnish Edition)

ISEB/ISTQB FOUNDATION CERTIFICATE IN SOFTWARE TESTING III

Data Quality Master Data Management

HAY GROUPIN PALKKATUTKIMUS

MEETING PEOPLE COMMUNICATIVE QUESTIONS

HITSAUKSEN TUOTTAVUUSRATKAISUT

SOA SIG SOA Tuotetoimittajan näkökulma

7.4 Variability management

Collaborative & Co-Creative Design in the Semogen -projects

The CCR Model and Production Correspondence

Constructive Alignment in Specialisation Studies in Industrial Pharmacy in Finland

Uusia kokeellisia töitä opiskelijoiden tutkimustaitojen kehittämiseen

Industry known for competence & ability to solve complex engineering challenges

1.3 Lohkorakenne muodostetaan käyttämällä a) puolipistettä b) aaltosulkeita c) BEGIN ja END lausekkeita d) sisennystä

PROJEKTI- PÄÄLLIKÖSTÄ PRODUCT OWNERIKSI MEERI CEDERSTRÖM

1. SIT. The handler and dog stop with the dog sitting at heel. When the dog is sitting, the handler cues the dog to heel forward.

UUSIA TAPOJA OPPIMISEN ARVIOINTIIN

Choose Finland-Helsinki Valitse Finland-Helsinki

Helsinki Metropolitan Area Council

Osallistujaraportit Erasmus+ ammatillinen koulutus

Suomalainen koulutusosaaminen vientituotteena

LYTH-CONS CONSISTENCY TRANSMITTER

anna minun kertoa let me tell you

Laatu yritystoiminnan ytimessä. Junnu Lukkari

AKKREDITOITU TESTAUSLABORATORIO ACCREDITED TESTING LABORATORY

Security server v6 installation requirements

RINNAKKAINEN OHJELMOINTI A,

TIETEEN PÄIVÄT OULUSSA

EVALUATION FOR THE ERASMUS+-PROJECT, STUDENTSE

Scanfil Kannattavaa kasvua

LUONNOS RT EN AGREEMENT ON BUILDING WORKS 1 THE PARTIES. May (10)

Strategiset kumppanuushankkeet

The role of 3dr sector in rural -community based- tourism - potentials, challenges

C++11 seminaari, kevät Johannes Koskinen

Voice Over LTE (VoLTE) By Miikka Poikselkä;Harri Holma;Jukka Hongisto

VALTAKUNNALLINEN YLIOPISTOKESKUSSEMINAARI Tulevaisuuden innovaatioiden, oppimisen ja osaamisen ekosysteemejä

Smart specialisation for regions and international collaboration Smart Pilots Seminar

FinFamily PostgreSQL installation ( ) FinFamily PostgreSQL

Kansainvälisiä tutkimus- ja kehitysprojekteja ekotehokkaan rakennetun ympäristön tuottamiseen, käyttöön ja ylläpitoon

Informaatioteknologia vaikuttaa ihmisten käyttäytymiseen ja asenteisiin

1 in Avril Cutler, Development Officer, Lanarkshire Recovery Network Rosie Line, Support Officer, Lanarkshire Movement for Change

Automaatiojärjestelmän hankinnassa huomioitavat tietoturva-asiat

Finpro, kansainvälistyminen ja Venäjä. Kari Häyrinen

Security server v6 installation requirements

EVE-Electric Vehicle Systems Programme status

Co-Design Yhteissuunnittelu

1. Liikkuvat määreet

Vapaan sivistystyön päivät , Jyväskylä Jan-Markus Holm

National Building Code of Finland, Part D1, Building Water Supply and Sewerage Systems, Regulations and guidelines 2007

Opiskelijat valtaan! TOPIC MASTER menetelmä lukion englannin opetuksessa. Tuija Kae, englannin kielen lehtori Sotungin lukio ja etälukio

On instrument costs in decentralized macroeconomic decision making (Helsingin Kauppakorkeakoulun julkaisuja ; D-31)

ECSEL - Electronic Components and Systems for European Leadership

Atostek. KanTa-konseptin tuotteistaminen ja vienti ulkomaille

Enterprise Architecture TJTSE Yrityksen kokonaisarkkitehtuuri

A new model of regional development work in habilitation of children - Good habilitation in functional networks

TietoEnator Pilot. Ari Hirvonen. TietoEnator Oyj. Senior Consultant, Ph. D. (Economics) presentation TietoEnator 2003 Page 1

Microsoft Lync 2010 Attendee

Hyvä ja paha pelillistäminen

FROM VISION TO CRITERIA: PLANNING SUSTAINABLE TOURISM DESTINATIONS Case Ylläs Lapland

Mineral raw materials Public R&D&I funding in Finland and Europe, Kari Keskinen

EUROOPAN PARLAMENTTI

Ohjelmistoarkkitehtuurit Kevät 2016 Johdantoa

ATLAS-kartan esittely - Peli palveluiden yhteiskehittämisen menetelmistä Päivi Pöyry-Lassila, Aalto-yliopisto

WP3 Decision Support Technologies

Teollinen markkinointi ja kansainvälinen liiketoiminta. Pääaineen esittely

Hakkerin henkilökuva. [Avaa linkki valmiiksi ja poista presentaatiosta]

AFCEA PVTO2010 Taistelija / S4

Social and Regional Economic Impacts of Use of Bioenergy and Energy Wood Harvesting in Suomussalmi

Internet of Things. Ideasta palveluksi IoT:n hyödyntäminen teollisuudessa. Palvelujen digitalisoinnista 4. teolliseen vallankumoukseen

Technische Daten Technical data Tekniset tiedot Hawker perfect plus

Viestintään tarvitaan tiedon jakamista tietotyöläisten kesken Ville Hurnonen

Hankkeen toiminnot työsuunnitelman laatiminen

Transkriptio:

Test-Driven Development. As it should be. Jarno Keskikangas Project Manager Digia Plc 1 2007 SYSOPENDIGIA Plc

Outline Me, You and the Company Agile software development in general and TDD in particular Test-Driven Development in a nutshell Lessons learnt & summary Q & A 2 2007 SYSOPENDIGIA Plc

Me, You and the Company 3 2007 SYSOPENDIGIA Plc

Me Agile advocate practitioner rather than researcher focus on the bottom line Introducing and implementing TDD practices to own organization and other entities Currently working as a scrum master and project manager...with software developer background 4 2007 SYSOPENDIGIA Plc

You Familiar with agile principles Comfortable with xunit frameworks Have heard or tried TDD Will have the time of your life during the presentation In a way or other =) 5 2007 SYSOPENDIGIA Plc

...and the Company, Outline Digia Plc Modern and agile software house Complete solution offering Business critical ICT solutions Forerunner in mobile and wireless solutions Focused market segments Telecommunications Industry and Trade Finance and Services Listed on the Nordic Exchange Headquarters in Helsinki, offices in Estonia, Sweden and other locations in Finland Pro forma turnover in 2006 EUR 98.9 million Employs over 1100 professionals 6 2007 SYSOPENDIGIA Plc

Telecommunications Division Agile partner creating mobile software development services and solutions Trusted player providing business process improvement, integration and systems development Innovative forerunner building ICT solutions utilising mobile opportunities Employing over 550 professionals Handset Industry Integrating Innovations Operators & Media Corporations 7 2007 SYSOPENDIGIA Plc

Agile software development in general and TDD in particular 8 2007 SYSOPENDIGIA Plc

Agile Software Development Iterative and incremental development Close collaboration between business people and programmers Empowered and selforganized teams Working software as the primary measure of progress Risk Cost of change Agile project Waterfall project Time Time 9 2007 SYSOPENDIGIA Plc

Test-Driven Development. As it should be.

Test Driven Development Add a test Specification [Pass] Run the tests [Fail] Design Make a little change Development [Fail] Run the tests [Pass, Development continues] Testing [Pass, Development stops] 11 2007 SYSOPENDIGIA Plc

How to write good TDD specifications? What s the next most important thing the system doesn t do? Template for TDD scenarios Given some initial context (the givens) When an event occurs Then ensure some outcomes 12 2007 SYSOPENDIGIA Plc

Emerging design and mock objects Test class Domain object Test class Mock object Domain object Mock object 13 2007 SYSOPENDIGIA Plc

To see is to believe

EUnit Test Creation Wizards /* ----------------------------------------------------------------------------- This file has been generated with EUnit Pro http://www.sysopendigia.com/qualitykit ----------------------------------------------------------------------------- */ #ifndef CMYTRIANGLE_TESTI_H #define CMYTRIANGLE_TESTI_H // INCLUDES #include <CEUnitTestSuiteClass.h< CEUnitTestSuiteClass.h> #include <EUnitDecorators.h< EUnitDecorators.h> #include "CMyTriangle.h" CMyTriangle.h" // FORWARD DECLARATIONS // CLASS DEFINITION /** * Generated EUnit test suite class. */ NONSHARABLE_CLASS( CMyTriangle_Testi ) : public CEUnitTestSuiteClass { public: // Constructors and destructor static CMyTriangle_Testi* NewL(); static CMyTriangle_Testi* NewLC(); ~CMyTriangle_Testi(); private: // Constructors CMyTriangle_Testi(); void ConstructL(); private: // New methods void SetupL(); void Teardown(); void T_Global_AreaL(); void T_Global_CMyTriangleL(); void T_Global_CenterL(); void T_Global_CrossProductL(); void T_Global_FirstCornerL();

EUnit Test Execution EUnit S60 Gui EUnitExeRunner Connectivity Carbide.C++ EUnit View Device Test Manager RPM server and device pool

Lessons learnt

Developer questionnaire 1. Facilitates better requirements 2. Reduces debugging effort 3. Reduces development time 4. Yields higher code quality 5. Promotes simpler design 6. Is noticeably effective 7. Getting into TDD mindset 8. Lack of upfront design is a hindrance Question 1 2 3 4 5 6 7 8 0 1 2 3 4 5 Mean Standard Deviation 18 2007 SYSOPENDIGIA Plc

Testimonials 3. Jos voit valita vapaasti, käytätkö mieluummin TDD-tekniikkaa vai jotain muuta lähestymistapaa? Miksi? Ehdottomasti TDD. Mikäli unit testejä tehdään jollain muulla keinolla ne eivät yleensä osu ongelman ytimeen vaan harrastetaan koodikattavuuden generointia esim. Tarkistelemalla raja-arvoja. Mielellään TDD:tä, koska silloin automaattisesti päädytään testattavaan ja yleensä toimivaan designiin. Koodin laatu pysyy koko kehitystyön ajan hyvänä. 2. Kuvaile kohtaamiasi ongelmia TDD-tekniikan soveltamisessa. Miten ongelmia voisi mielestäsi vähentää? Suurimmat ongelmat syntyvät vanhojen partojen pinttyneistä tavoista suunnitella kaikki etukäteen eli ei anneta TDD:n tehdä sitä mihin se on tarkoitettu. Huono design: konkreettiset riippuvuudet, sykliset riippuvuudet, luokilla monta vastuuta. Luokat pitäisi suunnitella niin, että ne voidaan yksikkötestata. 19 2007 SYSOPENDIGIA Plc

Summary

TDD is not about testing. It s about specification, design and testing.

TDD is essential element of agile software engineering.

Agile software engineering is harder to adopt than agile project management.

Pay now or pay later. The later you pay, the higher the K.

Testimonials Thank You! jarno.keskikangas@digia.com www.digia.com 25 2007 SYSOPENDIGIA Plc

References http://blog.daveastels.com/files/bdd_intro.pdf Scott Ambler: Introduction to Test Driven Design http://www.agiledata.org/essays/tdd.html Dan North: Introducing BDD http://dannorth.net/introducing-bdd/ Boby Georgea, Laurie Williams: A structured experiment of test-driven development Dozens of research papers, see ACM and IEEE electronic libraries 26 2007 SYSOPENDIGIA Plc