sumedha rubasinghe october,2009
DESCRIPTION
Sumedha Rubasinghe October,2009. Introduction to Programming Tools. Contents. Essentials tooling concepts in S/W development Build system Version Control System Testing Tools Reporting, Project Management Continuous Integration. Assignment !!. The Project assignment - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Sumedha Rubasinghe October,2009](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813c0c550346895da57a44/html5/thumbnails/1.jpg)
Sumedha RubasingheOctober,2009
Introduction to
Programming Tools
![Page 2: Sumedha Rubasinghe October,2009](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813c0c550346895da57a44/html5/thumbnails/2.jpg)
Contents
• Essentials tooling concepts in S/W development
– Build system
– Version Control System
– Testing Tools
– Reporting, Project Management
– Continuous Integration
![Page 3: Sumedha Rubasinghe October,2009](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813c0c550346895da57a44/html5/thumbnails/3.jpg)
Assignment !!
• The Project assignment
– Build a calculator which supports basic arithmetic operations, scientific calculations & accessibility via GUI
![Page 4: Sumedha Rubasinghe October,2009](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813c0c550346895da57a44/html5/thumbnails/4.jpg)
Preparation
• Choosing your team
• Understanding the assignment
– Problem
– Goals
– Deliverables
– Mode of delivery (staged/iterative, one shot)
• Plan
![Page 5: Sumedha Rubasinghe October,2009](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813c0c550346895da57a44/html5/thumbnails/5.jpg)
Ice breaker..
• Lot of talking .. no action...
• Let's get something running first
![Page 6: Sumedha Rubasinghe October,2009](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813c0c550346895da57a44/html5/thumbnails/6.jpg)
I want to run it too..
• One member develops a prototype using an IDE
• Another member wants to run it on his machine
• Problem
– Library paths are relative to original author's machine
![Page 7: Sumedha Rubasinghe October,2009](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813c0c550346895da57a44/html5/thumbnails/7.jpg)
We need a build system
• A build system?
– A build system will help you to build your project without machine specific dependencies.
– This will make it easy for every team member to build the project & see the results
![Page 8: Sumedha Rubasinghe October,2009](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813c0c550346895da57a44/html5/thumbnails/8.jpg)
Ant - Introduction
• Java based build tool from Apache Software Foundation
• Cross platform
• http://ant.apache.org/
• Let's install Ant
![Page 9: Sumedha Rubasinghe October,2009](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813c0c550346895da57a44/html5/thumbnails/9.jpg)
Installing Ant
• Download - http://ant.apache.org/bindownload.cgi
• Extract to a folder
– Eg:• c:\tools\ant\1.7.1
• c:\tools\ant\1.6.2
• Set ANT_HOME environment variable*
• Add %ANT_HOME%\bin to PATH variable
• Open a new command window & type 'ant'
![Page 10: Sumedha Rubasinghe October,2009](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813c0c550346895da57a44/html5/thumbnails/10.jpg)
Writing a Ant build script
• By default looks for 'build.xml'
• Each <project> contains one or more <target>s.
• Each <target> can depend on zero or more other <target>s.
• When running Ant specify the <target>
• Supports default <target>
• Driven by user defined tasks.
• http://ant.apache.org/manual/using.html
![Page 11: Sumedha Rubasinghe October,2009](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813c0c550346895da57a44/html5/thumbnails/11.jpg)
Similar tools
• Apache Maven
• make,gnumake, nmake• http://en.wikipedia.org/wiki/List_of_build_automation_software
![Page 12: Sumedha Rubasinghe October,2009](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813c0c550346895da57a44/html5/thumbnails/12.jpg)
I changed the implementation...
• Now every team member has a running copy of the project
• Some have found issues in existing implementation & fixed those
• Some have added new features
• How to synchronise all of these changes?
![Page 13: Sumedha Rubasinghe October,2009](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813c0c550346895da57a44/html5/thumbnails/13.jpg)
Source Code Management (SCM)
• Also known as,
– Revision control
– Version control
• Version Control System (VCS)
• Management of changes to documents
• Each change is associated with
– revision number
– timestamp
– User
• Revision can be compared,restored, merged
![Page 14: Sumedha Rubasinghe October,2009](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813c0c550346895da57a44/html5/thumbnails/14.jpg)
Subversion (SVN)
• Free/Open-source version control system
• Central repository of files
– Records every change done to a file
• checkout – getting files from server
• check-in/commit – putting files to server
• merge – local changes & changes coming from server can be merged
• conflict – merge failed, over lapping changes
![Page 15: Sumedha Rubasinghe October,2009](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813c0c550346895da57a44/html5/thumbnails/15.jpg)
Subversion – demo
• Installing Subversion – not covered
– http://svnbook.red-bean.com/en/1.1/ch01s05.html
• Client side
– Command line client
– GUI client
• Windows File Explorer - http://tortoisesvn.tigris.org/
• IDE plug-ins– subclipse (for Eclipse) - http://subclipse.tigris.org– Intellij IDEA plug-in– ankhsvn (for Visual Studio) -
http://ankhsvn.open.collab.net– Net Beans - http://subversion.netbeans.org/
![Page 16: Sumedha Rubasinghe October,2009](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813c0c550346895da57a44/html5/thumbnails/16.jpg)
Similar tools
• git - http://git-scm.com
• CVS (Concurrent Version System)
– Project home - http://www.cvshome.org/eng/
– Installation Guides
• (Windows) CVSNT
• (*inx) http://www.idevelopment.info/data/Programming/change_management/unix_cvs/PROGRAMMING_Installing_CVS.shtml
![Page 17: Sumedha Rubasinghe October,2009](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813c0c550346895da57a44/html5/thumbnails/17.jpg)
Similar tools (commercial)
• Rational ClearCase (http://www-01.ibm.com/software/awdtools/clearcase)
• Borland StarTeam (http://www.borland.com/us/products/starteam/index.html)
• Microsoft Visual SourceSafe (http://msdn.microsoft.com/en-us/aa740435.aspx)
![Page 18: Sumedha Rubasinghe October,2009](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813c0c550346895da57a44/html5/thumbnails/18.jpg)
Testing
• Important to understand what type of testing needs to be done before selecting a tool
• Testing approaches
– Approach of boxes• Black box
• White box
• Grey box
– Integration Testing
– Regression Testing
– Acceptance Testing
– Non Functional Testing
– Destructive Testing
• http://en.wikipedia.org/wiki/Software_testing#Testing_methods
![Page 19: Sumedha Rubasinghe October,2009](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813c0c550346895da57a44/html5/thumbnails/19.jpg)
Testing automation tools
• Junit - http://www.junit.org/
• JMeter - http://jakarta.apache.org/jmeter/
• Selenium - http://seleniumhq.org/
![Page 20: Sumedha Rubasinghe October,2009](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813c0c550346895da57a44/html5/thumbnails/20.jpg)
Similar tools
• xUnit (nUnit,JUnit,DBUnit)
• Apache Bench
• http://www.opensourcetesting.org
![Page 21: Sumedha Rubasinghe October,2009](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813c0c550346895da57a44/html5/thumbnails/21.jpg)
Maven – more than a build tool
• Apache project - http://maven.apache.org
• Two generations
– Maven 1 (maven)
– Maven 2 (mvn)
• Rich set of plugins
– http://maven.apache.org/plugins/index.html
• Driven by predefined life cycle stages
– http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.htm
• Project Object Model – POM
– http://maven.apache.org/pom.html
![Page 22: Sumedha Rubasinghe October,2009](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813c0c550346895da57a44/html5/thumbnails/22.jpg)
Continuous Integration (CI)
• Developers commit changes to VCS
• CI Server automatically picks changes & initiate build
• Faster feedback to your development process
• preventing bugs from piling up
• Generate statistics
• Provides more visibility
![Page 23: Sumedha Rubasinghe October,2009](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813c0c550346895da57a44/html5/thumbnails/23.jpg)
Continuous Integration
• Popular tools
– Hudson • https://hudson.dev.java.net
• Demo on installation & configuring a project to build automatically
• In action : http://hudson.zones.apache.org/hudson/
– Bamboo• http://www.atlassian.com/software/bamboo
• In action : http://builder.wso2.org
– Cruise Control • http://java-source.net/open-source/build-systems/cru
ise-control
![Page 24: Sumedha Rubasinghe October,2009](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813c0c550346895da57a44/html5/thumbnails/24.jpg)
Summary
• Build systems
• Version control systems
• Testing tools
• Advance build systems
• Continuous integration tools
![Page 25: Sumedha Rubasinghe October,2009](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813c0c550346895da57a44/html5/thumbnails/25.jpg)
Help
• If you have any questions on the topics I covered, drop me a mail @ bellow address. Please set the following prefix in your subject.
– [email protected] - prefix [cs3030-2009]
– If your question is useful to everyone, I will try to put an answer in my blog.
• http://sumedha.blogspot.com