improve development process with open source software

20
Wen Tao senior consultant [email protected] Xi’an Software Park, Xi’an High-tech Development Zone, Xi’an Shaanxi, P. R. China, 710075 cell +86.138.1030.2515 office +86.29.8760.7341 Improve Development Process with Open Source Software 陈陈陈 senior consultant [email protected] Xi’an Software Park, Xi’an High-tech Development Zone, Xi’an Shaanxi, P. R. China, 710075

Upload: spencer

Post on 08-Feb-2016

46 views

Category:

Documents


0 download

DESCRIPTION

Wen Tao senior consultant. 陈金洲 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. jchen @thoughtworks.com - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Improve Development Process with Open Source Software

Wen Tao senior consultant

[email protected]

Xi’an Software Park, Xi’an High-tech Development Zone, Xi’an Shaanxi, P. R. China, 710075

cell +86.138.1030.2515 office +86.29.8760.7341

Improve Development Process with Open Source Software

陈金洲 senior consultant

[email protected]

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

Page 2: Improve Development Process with Open Source Software

Agenda

• Introduction • Selenium• Demo• CruiseControl• Showcase• Conclusion

Page 3: Improve Development Process with Open Source Software

Share experience

• How do we test the web project?• What’s our daily development like?• Happy or painful?• Why?

• Share your experience!

Page 4: Improve Development Process with Open Source Software

Question #1:

Functional Test For Web app

Page 5: Improve Development Process with Open Source Software

Traditional approach

Development Acceptance Testing Regression Testing

Release

Feature developed Bug found! Regression found!

• Developers have moved on

• Too close to release

Page 6: Improve Development Process with Open Source Software

Faster feedbackDevelopment

Acceptance Testing

Regression Testing

Release

Write test as you goRun them as often as you canProblems are found quickly

Page 7: Improve Development Process with Open Source Software

Why Automated?

• Manual testing is slow, tedious and error-prone– Especially for regression

Regression Testing

3 months

Either take long time or less thoroughWhat now? Start again?

Page 8: Improve Development Process with Open Source Software

Regression Testing

10 minutes

Consistently Thorough

Fast enough to start again and again and again…

Page 9: Improve Development Process with Open Source Software

Selenium

http://www.openqa.org/selenium/

Page 10: Improve Development Process with Open Source Software

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

Page 11: Improve Development Process with Open Source Software

Demo

• Demo– Start hsqldb– Start tomcat– Firefox

• http://localhost:8080/jpetstore• http://localhost:8080/jpetstore/selenium

Page 12: Improve Development Process with Open Source Software

Question #2:

Continuous Integration

Page 13: Improve Development Process with Open Source Software

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

Page 14: Improve Development Process with Open Source Software

Benefits of C.I.

• Minimizes integration risk. • Supports easier defect diagnosis. • Encourages good testing habit• Support release management• Enforces company development

policy

Page 15: Improve Development Process with Open Source Software

CruiseControl

http://cruisecontrol.sourceforge.net/

Also see Luntbuild, which is a simpler analogue of CruiseControl.

Page 16: Improve Development Process with Open Source Software

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.

Page 17: Improve Development Process with Open Source Software

Build loop of C.C.

VCSBuild 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, Make2. Run Build

5. Publish Artifacts

6. Send to publisher1. Get the latest source3. Tag source

(optional)

Project SpecificAdapter -Ant Script

4. Run Build

Page 18: Improve Development Process with Open Source Software

• Showcase

Page 19: Improve Development Process with Open Source Software

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.

Page 20: Improve Development Process with Open Source Software

Resources

Mike Clark, author of Pragmatic Project Automationhttp://media.pragprog.com/movies/auto/CruiseControl_MikeClark.html

Selenium IDE:http://www.openqa.org/selenium-ide/

Selenium Remote Controlhttp://www.openqa.org/selenium-rc/