Adopting Agile Tools & Methods In A Legacy Context
Upcoming SlideShare
Loading in...5
×
 

Adopting Agile Tools & Methods In A Legacy Context

on

  • 2,362 views

 

Statistics

Views

Total Views
2,362
Views on SlideShare
1,903
Embed Views
459

Actions

Likes
0
Downloads
41
Comments
0

10 Embeds 459

http://warzee.fr 244
http://scrumconseil.com 161
http://xavier.warzee.name 34
http://xwarzee.tumblr.com 10
http://www.linkedin.com 3
http://safe.tumblr.com 3
http://xwarzee.wordpress.com 1
http://safe.txmblr.com 1
http://www.slideshare.net 1
https://www.linkedin.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Adopting Agile Tools & Methods In A Legacy Context Adopting Agile Tools & Methods In A Legacy Context Presentation Transcript

    • Xavier Warzee Email: xavier@warzee.fr Blog: http://warzee.fr Site: http://www.agilescale.com
    • Insurance applications Talk based on one year engagement In an insurance company A subsidiary of one of the largest french bank 6 insurance applications Used by several networks of regional insurance agencies Running in a datacenter (Mainframes, Unix servers)
    • Legacy systems Applications Implemented in Java/J2EE running on Unix servers No dependency injection, no cool frameworks (Spring, Hibernate, …) Various size and maturity Business rules and services Implemented in Cobol running on IBM mainframes IBM MQ to communicate with applications
    • Tools & practices Building and deployment of J2EE applications with IBM RAD6 (based on Eclipse 3.0.1) Software Configuration Management with IBM Rational Clearcase LT 2003 for Java/J2EE Nothing for Cobol developments No tests (unit & acceptance tests)
    • Objectives Main objectives To develop the code really expected for each release To prepare adoption of agile methods :-) Short terms objectives based on the “follow the pain” principle Shrink time to release new versions of J2EE applications Ease deployment of applications Provide adapted testing solutions to the legacy
    • Bottom-up Approach > pragmatic metrics : RTFs Monitor projects progress with RTFs (Running, Tested Features) Running means here deployed to a Websphere server (we have J2EE applications) => continuous deployment Tested means a development is done when tested => automated tests during projects building Features means make the latest developments available at any time =>
    • Adoption strategy/audit > Identify steps to improve the development No scripted building  Manual building under RAD6/Eclipse  Checkout code, check dependencies, package correctly EAR/WAR  1 to 3 days needed to check an application is correctly packaged ! No scripted deployment  manual deployment with the Websphere console  Error prone, need to know Websphere Application Server  Need 1 or 2 days to deploy an application under WAS6.1 No code review to measure quality
    • Adoption plan proposed (1/3) Use Maven to build applications/projects  No longer use an IDE to build apps/projects (error prone)  Better traceability of packaged components Develop scripts to deploy applications  Jython Scripts used both by production and development teams to deploy to Websphere AS 6.1 Avoid behavior gaps between dev and prod  environments  Scripts called from Maven to automate
    • Adoption plan proposed (2/3) Review projects with Maven to measure code quality  Simple declarative approach to configure code review tools PMD, Checkstyle, FindBugs Maven plugins!   Integrate code review reporting during nightly builds Just simply use the Maven build lifecycle  Implement Builds Management with Cruisecontrol Continuous integration of changes (build, unit
    • Adoption plan proposed (3/3) Implement unit tests with Junit, XMLUnit and JMockIt  Check code behaves as expected by developers !  JMockit helps to disconnect J2EE applications from MAINFRAME  To test in isolation without modifying application codes  (bytecode rewriting) Use acceptance tests with Fit/FitNesse  check code behaves as expected by users for each release  Use FitNesse plugin for RAD/Eclipse and for Maven  Post deployment tests to ensure full testability by
    • In a legacy context
    • Mike Cohn tests pyramid adoption >> current practices! • Simple Manual • usual approach Acceptance • manual and error-prone testing • traceability with requirements? Using the GUI • Technical solution Automated • Quick to run since automated tests of • numerous similar tests to write the GUI • fragile tests (HTML may change) Unit Tests • What do we test ? Priorities ? • How to identify tests to run ? • How to identify failing tests ? Start Stop Look Start Stop ?
    • Mike Cohn tests pyramid adoption > target practices: the pyramid of Mike Cohn • Small number of tests • Try automate these tests Acceptance tests with the GUI • Define accurate functional tests FitNesse • Unit tests generalized • Adopt a TDD approach Unit Tests Start Stop Look Start Stop ?
    • Mike Cohn tests pyramid adoption > pragmatic target practices! Acceptance • Try to reduce the number of tests tests with the GUI (if any, use FitNesse + Selenium) Automated acceptance • Use Fit/FitNesse tests Unit Tests • reach a high coverage of code • improve capacities of test with supporting tools (xUnit tools such as JMockIt, DbUnit, XMLUnit, JUnitPerf, JsUnit, …) Start Stop Look
    • Presentation layer Mainframe layer Business layer (EAR) (EAR) Business Component Business MQ DAS Service (Cobol) DAO Business Service EIARD Application Business Business Component DAS Service MQ Application DAO Business Process (Cobol) Process Service Service HTML/JS/JSP Business Service Pages Business Component xml/http mq
    • Functional testing with FitNesse > Business layer Black box approach Wiki to easy functional data injection! Mainframe layer Business layer Dossier component DAO DAS Functional MQ PMListeDossiers Service SUT (Cobol) Business Service PMColumnFixture Personne component Functional DAO DAS MQ Service PMGestionCompte (Cobol) SUT Business Service ElementStructure component
    • Functional testing with FitNesse > Presentation layer with Selenium  Selenium is powerful  Issues to set timeout when MQ access not mocked! (JDBC/DB2) layer Mainframe layer Business layer Presentation Dossier component Functional MQ Service SAD (Cobol) OM CAD DevisA4 SeleniumRunner Personne component Functional CAD MQ Service PUPerteMdp PMGestionCompte (Cobol) Selenium RC Pages OM Request HTML/JS/JSP EIARD application ElementStructure component Other systems
    • Testing scenarios > Car insurance quote scenario  Write scenario in natural language with the FitNesse wiki  Use the SeleniumRunner fixture to translate natural languages into Selenium verbs (open, click, select, …)  The SeleniumRunner fixture invokes a Selenium instance  The Selenium instance interacts with the application !
    • FitNesse Tests & Continuous integration 1/3 3 4 5 6 Deployment Platform Continuous integration server machine - Windows Service : Selenium-RC - Windows Service : FitNesse Server (port 9987) 1 2 1 – Check in (restitution) 2 – Projects updated on the continuous integration server 3 – Projects built : compilation, application and tests resources generation, unit tests and components tests execution, code review, 4 – Projects deployment (when needed : EAR) SCM repository 5 – Acceptation tests executed using FitNesse (Clearcase, SVN, …) (and Selenium) 6 – Notification by email
    • FitNesse Tests & Continuous integration 2/3 > Maven command called by Cruisecontrol Definition of a Maven profile: “fitnesse” To declare and configure Fitnesse plugin To set FitNesse parameters to use Here for the Dossier project:  <fitNesseServerName>s00sic001.ca-pacifica.fr</fitNesseServerName>  <fitNesseServerPort>8081</fitNesseServerPort>  <fitNesseServerPage>TestsAcceptation.TestsNm.TestsDossier</fitNe  sseServerPage> Select a Maven project phase After “package”: ear applications are deployed to  Websphere App Server during this phase !!! (création du jar) Command to launch FitNesse tests
    • FitNesse Tests & Continuous integration 3/3 Cruisecontrol builds applications with Maven Maven launches FitNesse tests (if present) after  application deployment  Cruisecontrol webapp adapted to collect FitNesse results in a new tab !  Adaptation de Cruisecontrol  Ajout d’un onglet Fit (FitNesse est la surcouche Wiki à Fit)
    • How to define scenarios? (1/3) Launch an application with Firefox (here e- IARD) Select Tools -> “Selenium IDE”
    • How to define scenarios? (2/3)  Complete forms for Car Insurance Quote (“Simulation Assurance Automobile”) Events captures by Selenium IDE 
    • How to define scenarios? (3/3)  FitNesse Page
    • FitNesse reports > included in the web site generated by Maven Integration of The FitNesse report
    • Eclipse/RAD plugins > Plugin Eclipse FitNesse (Band XI) Boutons d’accés aux serveurs Fitnesse En local   En remote
    • Incremental releases Iterative releases