Dec 05, 2014
Continuous IntegrationSebastian Kurfürst
Audience
Developers
Project Managers
forge.typo3.org
Subversion
Development Tools
Continuous Integration
Wiki Bugtracker
Collaboration Platform
Abstract
Test-Driven Development
Version ControlRequirements {
What is CI?
Integration with forge
Your own CI Server
Conclusion
ContinuousIntegration {
Version Control
SubversionRepository
Commit Update Update
- Requirements -
Synchronize Often!
1 2 3 4
1
Repository
WorkingCopy
Split your workinto smaller chunks!
Short Development Cycles
How many of you have ever written a unit test?
How many of you write unit tests during your
daily work?
»
«SCRUM and XP from the Trenches
Henrik Kniberg
Test-Driven Development
... means that you write an automated test, then you write just enough code to make that one test pass, then you refactor the code primarily to improve readability and remove duplication.
Test-Driven Development
Test Case ImplementationFAIL OK Refactoring OK
Test-Driven Development
- Demonstration -
An Academic Example
• Write a Mathematical Helpers class, which has a method „square“, which multiplies a number with itself.
1. Write a test case!
How to use it
• Nicely integrated with forge
The test case fails
2. Implement!
The test case...
Spot design flaws earlier!
Unit tests are a Safety net for the future
What is CI?
Integration with forge
Your own CI Server
»
«http://martinfowler.com/articles/continuousIntegration.html
Martin Fowler
Continuous Integration... is a software development practice where members of a team integrate their work frequently. Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible.
Many teams find that this approach leads to significantly reduced integration problems and allows a team to develop cohesive software more rapidly.
Integrate frequently!
Integrate every few hours, at least daily!
Hi! I am Mr. Hudson and I will do the integration work for you,
and report back!
Build code documentation (soon)
Run Unit Tests... on Linux, Windows and Mac
I will do the following:
Test your coding style
Workflow
SubversionRepository
1. Commit
3. Run tests
2. Start Build
4. Show Results
Integration with forge
Daily Use
For Power Users
I will do the integration work for you, and report back!
Jabber Integration
How to use jabber notifications
Download hudson.war
1Your own CI server
Run hudson.
2Your own CI server
https://svn.typo3.org/Teams/forge.typo3.org/hudson-helpers/
Check out our build scripts:
3Your own CI server
cd /path/to/hudson-helpersphing/phing/phing -f build.xml all -Dpackage=PACKAGE_KEY
Use the following „execute shell“ build target:
4Your own CI server
Enjoy hudson!5
Your own CI server
What about
Monitor the project status and progress
Productivity
Conventional development
Feature A Feature B
Implementation
Test A Test B
Testing
Many context switches
TDD Workflow
Increased productivity
Survey about agile methods
Project visibility
Team morale
Productivity
Software quality
Reduced risk
Time to market
0 25 50 75 100
%
improved significantly improved
Conclusion
Development Practicesfor FLOW3
Unit Testing
Test-Driven Development
Project Mana-gement: SCRUM
Continuous Integration
Collaboration: Subversion
Test Driven Developmentrocks!
Test Driven Development
makes you happy!
Increase productivity!
Collaborateon forge.typo3.org!
our knowledgeTake
your company!into
?????????????
Thank you for listening!
Photo Sources
• BOXES?
• NASA
• http://www.flickr.com/photos/52005963@N00/245744537/
• http://commons.wikimedia.org/wiki/Image:TulipStair_QueensHouse_Greenwich.jpg
• http://www.flickr.com/photos/55474909@N00/525206678/
• http://flickr.com/photos/castlephotos/490394807/
Thank you for listening!