Improve Development Process with Open Source Software Wen Tao   senior consultant wtao @thoughtworks.com Xi’an Software Park, Xi’an High-tech Development Zone,  Xi’an Shaanxi, P. R. China, 710075 cell +86. 13 8 . 1030 . 2515   office +86.29.8760.7341 陈金洲   senior consultant jchen @thoughtworks.com Xi’an Software Park, Xi’an High-tech Development Zone,  Xi’an Shaanxi, P. R. China, 710075 cell +86. 139.9197.1753   office +86.29.8760.7341
Agenda Introduction  Selenium Demo CruiseControl Showcase Conclusion
Share experience How do we test the web project? What’s our daily development like? Happy or painful? Why? Share your experience!
Question #1: Functional Test For Web app
Traditional approach Development Acceptance Testing Regression Testing Release Developers have moved on Too close to release Feature developed Bug found! Regression found!
Faster feedback Development Acceptance Testing Regression Testing Release Write test as you go Run them as often as you can Problems are found quickly
Why Automated? Manual testing is slow, tedious and error-prone Especially for regression Either take long time or less thorough What now? Start again? Regression Testing 3 months
Consistently Thorough Fast enough to start again and again and again… Regression Testing 10 minutes
Selenium http://www.openqa.org/selenium/
Selenium Open source test tool for web applications. Run in browser Test browser compatibility & system functionality. Easy to use.  Test cases are written in pure HTML Clean and impressive UI
Demo Demo Start hsqldb Start tomcat Firefox  http://localhost:8080/jpetstore http://localhost:8080/jpetstore/selenium
Question #2:  Continuous Integration
What is Continuous Integration Integrates source code and runs tests after each commit of code to the source repository. Near-immediate feedback to the developer
Benefits of C.I. M inimizes integration risk.  S upports easier defect diagnosis.  Encourages  good   testing habit Support r elease  m anagement Enforce s   c ompany  d evelopment  p olicy
CruiseControl http://cruisecontrol.sourceforge.net/
About CruiseControl Think of it as “ timer  for Ant”. Simple design. Full featured, but not bloated. Adapts to your project, not the other way around. Can be completely customized.
Build loop of C.C. VCS Build Artifacts Dir Mail/Sound/Light… 1. Bootstrap 2. Check for modifications 3. Get the revision log Cruise Control Your project’s  Build file Ant, Maven, Make 2. Run Build 5. Publish Artifacts 6. Send  to publisher 1. Get the latest  source 3. Tag source  (optional) Project Specific Adapter - Ant Script 4. Run Build
Showcase
Conclusion DRY, use automation test/continuous tools help you improve your development process, and maximize customer value. Selenium helps you test webapp more easily. Keep CruiseControl running. it gives you feedback as soon as possible.
Resources Mike Clark, author of Pragmatic Project Automation http://media.pragprog.com/movies/auto/CruiseControl_MikeClark.html   Selenium IDE: http://www.openqa.org/selenium-ide/ Selenium Remote Control http://www.openqa.org/selenium-rc/
Q/A Thanks!
Manifesto for Agile Software Development Individuals and interactions over  processes and tools Working software over  comprehensive documentation Customer collaboration over  contract negotiation Responding to change over  following a plan

Improve Development Process with Open Source Software

  • 1.
    Improve Development Processwith Open Source Software Wen Tao senior consultant wtao @thoughtworks.com Xi’an Software Park, Xi’an High-tech Development Zone, Xi’an Shaanxi, P. R. China, 710075 cell +86. 13 8 . 1030 . 2515 office +86.29.8760.7341 陈金洲 senior consultant jchen @thoughtworks.com Xi’an Software Park, Xi’an High-tech Development Zone, Xi’an Shaanxi, P. R. China, 710075 cell +86. 139.9197.1753 office +86.29.8760.7341
  • 2.
    Agenda Introduction Selenium Demo CruiseControl Showcase Conclusion
  • 3.
    Share experience Howdo we test the web project? What’s our daily development like? Happy or painful? Why? Share your experience!
  • 4.
    Question #1: FunctionalTest For Web app
  • 5.
    Traditional approach DevelopmentAcceptance Testing Regression Testing Release Developers have moved on Too close to release Feature developed Bug found! Regression found!
  • 6.
    Faster feedback DevelopmentAcceptance Testing Regression Testing Release Write test as you go Run them as often as you can Problems are found quickly
  • 7.
    Why Automated? Manualtesting is slow, tedious and error-prone Especially for regression Either take long time or less thorough What now? Start again? Regression Testing 3 months
  • 8.
    Consistently Thorough Fastenough to start again and again and again… Regression Testing 10 minutes
  • 9.
  • 10.
    Selenium Open sourcetest tool for web applications. Run in browser Test browser compatibility & system functionality. Easy to use. Test cases are written in pure HTML Clean and impressive UI
  • 11.
    Demo Demo Starthsqldb Start tomcat Firefox http://localhost:8080/jpetstore http://localhost:8080/jpetstore/selenium
  • 12.
    Question #2: Continuous Integration
  • 13.
    What is ContinuousIntegration Integrates source code and runs tests after each commit of code to the source repository. Near-immediate feedback to the developer
  • 14.
    Benefits of C.I.M inimizes integration risk. S upports easier defect diagnosis. Encourages good testing habit Support r elease m anagement Enforce s c ompany d evelopment p olicy
  • 15.
  • 16.
    About CruiseControl Thinkof it as “ timer for Ant”. Simple design. Full featured, but not bloated. Adapts to your project, not the other way around. Can be completely customized.
  • 17.
    Build loop ofC.C. VCS Build Artifacts Dir Mail/Sound/Light… 1. Bootstrap 2. Check for modifications 3. Get the revision log Cruise Control Your project’s Build file Ant, Maven, Make 2. Run Build 5. Publish Artifacts 6. Send to publisher 1. Get the latest source 3. Tag source (optional) Project Specific Adapter - Ant Script 4. Run Build
  • 18.
  • 19.
    Conclusion DRY, useautomation test/continuous tools help you improve your development process, and maximize customer value. Selenium helps you test webapp more easily. Keep CruiseControl running. it gives you feedback as soon as possible.
  • 20.
    Resources Mike Clark,author of Pragmatic Project Automation http://media.pragprog.com/movies/auto/CruiseControl_MikeClark.html Selenium IDE: http://www.openqa.org/selenium-ide/ Selenium Remote Control http://www.openqa.org/selenium-rc/
  • 21.
  • 22.
    Manifesto for AgileSoftware Development Individuals and interactions over processes and tools Working software over comprehensive documentation Customer collaboration over contract negotiation Responding to change over following a plan