Software Gardening

Download Report

Transcript Software Gardening

THE
CONTINUOUS
DELIVERY
ZONE
Craig Berntson
Chief Software Gardener
Mojo Software Worx
Ego stuff





Conference speaker
INETA Community Speaker
ComponentOne
Speaker Bureau
Author
Microsoft C# MVP
Have you heard these?







It works on my machine
When will you be done
The database changed
Stop shipping! We found a bug!
Give me what you have so we can test
Customer won’t accept – lots of bugs
Code duplication
Waterfall
Customer Input
Business Analysis
Development
Manual Testing
Release
Software Gardening



Agile methodologies
Continuous Delivery
Developer skills
Refactoring
 Design Patterns
 Test-Driven Development
 SOLID OOD
 Software Craftsmanship
 Dependency Injection

Agile methodologies
Individuals and interactions
Working software
Customer collaboration
Responding to change
Continuous Delivery
Continuous
Integration




Automated
Acceptance
Testing
Automated
Capacity
Testing
Manual
Testing
Software Delivery Pipeline
Fail Fast (Learn Early)
Delivery Team =
Development + QA + Operations
DevOps
Automated
Deployment
Why Continuous Delivery





Reduce risk
Increase quality
Enable better project visibility
Establish greater product confidence
Reduce repetitive/manual processes
Continuous Integration

Also called Commit Stage
CI Defined
Continuous Integration is a software development practice
where members of a team integrate their work frequently,
usually each person integrates at least daily - leading to
multiple integrations per day. 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.
– Martin Fowler
http://www.martinfowler.com/articles/continuousIntegration.html
CI Defined
CI is the embodiment of tactics that gives us, as software
developers, the ability to make changes in our code,
knowing that if we break software, we’ll receive immediate
feedback...[It is] the centerpiece of software development,
as it ensures the health of software through running a
build with every change.
– Paul Duvall
Continuous Integration
CI Defined
An automated process that builds, tests, analyzes and
deploys an application to help ensure it functions
correctly, follows best practices, and is deployable. This
process runs with each source code change and provides
immediate feedback to the development team.
- Continuous Integration in .NET
Definitions tell us




Integrate frequently
Automated build &
test
Centerpiece of
development
Ensures health





Automated build,
test, analyze, deploy
Functions correctly
Follows best
practices
Runs with each code
change
Immediate feedback
Manual process
Check out
Code
Refactor
Check in
Build
Unit Test
CI process
Get latest
Integrate
Report
Check in
Build
Unit Test
Continuous Integration Process
Build Script
Version Control
System
CI Server
Developers
Stake Holders
Feedback Mechanism
Version Control System (VCS)




Check in often, several times per day
Do not branch – Always work on trunk
Everything goes into VCS
Tools: TFS, Subversion, Git, Mercurial
Project Organization

Each developer:
Uses the same folder structure
 Uses the same tools
 Uses the same 3rd party components, placed in
project folders


Check everything out from VCS and build
Continuous Integration Servers

Manage the CI process
Check out source
 Compile
 Run tests
 Give feedback


Tools: TFS, Jenkins, Team City, Cruise Control
Build management



Handles actual build from source
Gets called from CI Server
Tools: MSBuild, Ant, Nant, Rake, PSake
Testing
Testing


Unit tests
Integration tests
Unit/Integration testing



Test After Development
Test Driven Development
Unit Test Frameworks

JUnit, NUnit, MSTest, xUnit, rbUnit
Artifacts




Potential release candidate
Build & test results
Components for next steps or subsequent
builds
Tools: Maven, Npanday, Octopus
Feedback




Build reports
Test results
Web, system tray, text, twitter, sound
large monitors, lights,
Ambient Orb
Build Radiator
Build Radiator



Multiple projects
Multiple statistics
Can be whiteboard, colored Post-It notes, web
page
Build Radiator Examples
Michael Brunton-Spall – guardian.co.uk
Build Radiator Examples
Phil Collins
Build Radiator Examples
Phil Collins
Continuous Integration Demo




Developer process
CI server configuration
Feedback mechanism
Build radiator
Best Practices







Commit code frequently
Don’t commit broken code
Fix broken builds immediately
Write automated developer tests
All tests and inspections must pass
Run private builds (each developer runs tests
on their own code)
Avoid getting broken code (don’t check out
broken code)
Continuous Delivery
Continuous
Integration
Automated
Acceptance
Testing
Automated
Capacity
Testing
Manual
Testing
Automated
Deployment
Automated Testing Processes
Test System
CI Server
Artifact Storage
Feedback Mechanism
Automated Acceptance Testing





Validates software from the user perspective
Does the functionality work the way the
customer expects?
Given … When … Then …
Test system should resemble production
system
Tools: FitNesse, Cucumber, Jbehave,
Concordion, Twist
Automated Acceptance Testing



Loose coupling
UI Design Patterns MVVM, MVC, MVP
Separation of concerns
Automated Capacity Testing



Non-functional requirements
Scalability, Longevity, Throughput, Load
Tools: Jmeter, Marathon, Bench, Ants
What happened to QA staff?




Role changes
Write automated test scripts
Analyze test results
Manual testing
Manual Testing Process
Artifact Storage
QA staff
Test System
Feedback Mechanism
Manual Testing



Exploratory, Usability, Showcases
Look and feel
Worst-case
Automated Deployment




Process should be identical to testing
deployment
Sets up systems and configuration
Don’t forget about rollback (and test this too)
Tools: Puppet, Octopus, System Center
Extending Continuous Deployment
Testing
Code Analysis Database
Deployment
Integration
Test coverage
Schema
Install script
Functional
Dependency
Stored proc
QA
Acceptance
Refactoring
Test database
Production
System
Code review
Unit testing
Stability
Static analysis
Scalability
Performance
Load
Unit
Review
Continuous
Integration
Automated
Acceptance Testing
Automated
Capacity Testing
Manual Testing
Automated
Deployment
Questions



Email: [email protected]
Twitter: @craigber
www.speakerrate.com/craigber