Title: Automating Your Build Process Using FinalBuilder
1Automating Your Build Process Using FinalBuilder
2Session Overview
- Automated Builds and Continuous Integration are
facets of eXtreme Programming (XP)
- Very much part of the agile approach to software
delivery
- Traditional waterfall development approaches can
still benefit
- Automated Builds encompass Continuous
Integration
- An automated build is considered end to end,
including pre-compile and post-compile
activities
- This session will cover
- An introduction to automating your build, the
activities that should be automated, the benefits
of automated builds, etc.
- An overview of how FinalBuilder can help you with
your automated build
Automating the Build Process Using FinalBuilder
2
3Disclaimer
- I have no association with VSoft, the authors of
FinalBuilder
- It is a great product, I have been using it since
version 2.x
- Its primary reason for being is to automate the
build process
Automating the Build Process Using FinalBuilder
3
4Housekeeping
- Mobile phones
- Fire Exits
- Toilets
Automating the Build Process Using FinalBuilder
4
5About Me
XML XSLT XQuery XML Schema SOAP WML IntraWeb
Web Services C InterOp with Delphi RUP UML
TDD in C, VB.net and Delphi 8
Scrum
- 50 presentations delivered
- NRW06, NRW07
- DeveloperDeveloperDeveloper (UK Community
Events)
- Scottish Developers
- Agile Scotland
- British Computer Society (BCS)
- UK Borland User Group (DDG)
- Visual Basic User Group (VBUG)
- VBUG .net Winter 2001 conference
- XML One 2001
- 60 articles published
- The Delphi Magazine
- developers magazine (Dotnet Developers Group -
DDG)
- ASPToday.com (now Wiley, previously Wrox)
- ASP.NET Pro, International Developer
- CSharpCorner, DeveloperFusion
Automating the Build Process Using FinalBuilder
5
6Agenda
- Automating the Build
- What, Why and How?
- FinalBuilder
- Introduction Demo
- Customising FinalBuilder
- Using VBScript
- Using C
- Replicating the NUnit Action
Build Reporting FinalBuilder Server Light-he
arted look at Build Failure Wrap Up Resources,
Links
Contact Info
Automating the Build Process Using FinalBuilder
6
7Automating the Build What?
- Continuous Integration
- Checking in source code (version control)
- Running tests (test-driven development)
- Focus on not breaking the build
- Plenty of opinions integrate ever 2 hours is
fairly common
- Pre Post CI activities
- Sending e-mail, stopping databases
- Burning CDs/DVDs, FTP, flicking switches
- McConnell, Code Complete 2
- literal continuous integration is too much of a
bad thing
- Promotes the Daily Build and Smoke Test
Automating the Build Process Using FinalBuilder
7
8Automating the Build Why?
- Manual Builds
- Error prone
- Difficult to repeat, easy to miss steps
- Laborious, boring , dull
- one team member understands the whole process
- Unlikely to be run frequently
- There is more onus / reliance on deployment
testing Catch-22!
- Lack of quality / low quality are big problems
Automating the Build Process Using FinalBuilder
8
9Automating the Build Why?
- Automated Builds
- Repeatable and reliable processes
- one or two clicks, no series of manual steps
- more likely to be run frequently
- ultimately improve overall quality
- less chance of human error (after testing, the
build)
- Easier transfer of knowledge
- No one team member knows the build
- In XP terms Under the bus count 1
Automating the Build Process Using FinalBuilder
9
10Automating the Build How?
- Entirely manual process
- Once all development and testing is complete,
package up the product...
- Use a mix of tools (partial automation) DIY
approach can be very successful
- CruiseControl
- NAnt
- MSBuild
- Custom scripting
- DOS batch files
- Purchase off the shelf software, designed
specifically to automate the build process
- VSofts FinalBuilder
- AutomatedQAs Automated Build Studio
- etc.
Automating the Build Process Using FinalBuilder
10
11Agenda
- Automating the Build
- What, Why and How?
- FinalBuilder
- Introduction Demo
- Customising FinalBuilder
- Using VBScript
- Using C
- Replicating the NUnit Action
Build Reporting FinalBuilder Server Light-he
arted look at Build Failure Wrap Up Resources,
Links
Contact Info
Automating the Build Process Using FinalBuilder
11
12FinalBuilder
- FinalBuilder is an automated build and release
management solution for Windows software
developers and Software Configuration Management
professionals - It goes beyond continuous integration
- Provides an end-to-end means of automating every
stage of your build process
13FinalBuilder
- Standard, Professional and Server
- http//www.finalbuilder.com/feature-matrix.aspx
14FinalBuilder The Cost
Not a developer? Automise provides the power of F
inalBuilder, for the SysAdmin
15Actions
16Compilers
Configurable, uses packages to manage actions
17Version Control
18Installers
19Test Tools
- NUnit support is provided
20Toolset
- Microsoft Windows XP SP2
- FinalBuilder 5.5.0.518
- NUnit 2.4.6
- Visual Studio 2005 SP1
- ZoomIt 1.72
- Inno Setup 5.2.2
- Previously delivered this session using Windows
Vista
- Recently paved this laptop with XP2 SP2 for
corporate reasons
21REPLICATING F5 (OR F9)......AND BEYOND
22Agenda
- Automating the Build
- What, Why and How?
- FinalBuilder
- Introduction Demo
- Customising FinalBuilder
- Using VBScript
- Using C
- Replicating the NUnit Action
- Build Reporting
- FinalBuilder Server
- Light-hearted look at Build Failure
- Wrap Up
- Resources, Links
- Contact Info
23Customising FinalBuilder
- Writing your own Actions
- Integrate your build process into FinalBuilder
- ActionStudio
- VBScript, JavaScript
- COM-based languages
- e.g. Delphi, VB6
- .NET-based languages
- e.g. C, Chrome, Visual Basic.NET
24How do actions work?
FINALBUILDER BUILD PROCESS
Valid parameters?
onValidate()
Invalid
Valid
onExecute()
Success / Failure ?
Failure
Success
25DIY NUnit integration
- Demonstrate, inside FinalBuilder
- Invoking NUnit via the command-line
- Loading TestResult.xml (created by NUnit)
- Using XPath to select attributes from
TestResult.xml
- Make decisions based on the attribute value
- Common activities for any integration
- Over time, VSoft usually get around to adding
third party tools
26INTEGRATING NUNIT
- Using FinalBuilders Features
27WRITING YOUR OWN ACTIONS USING C
28Agenda
- Automating the Build
- What, Why and How?
- FinalBuilder
- Introduction Demo
- Customising FinalBuilder
- Using VBScript
- Using C
- Replicating the NUnit Action
- Build Reporting
- FinalBuilder Server
- Light-hearted look at Build Failure
- Wrap Up
- Resources, Links
- Contact Info
29Build Reporting
- Builds by day, by day of week, by time of day
- Print and Export to Excel
30Build Reports
Tuesdays and Thursdays bad days at the office!
31Build Reports
- Demonstrate a downward trend in failed builds
32Agenda
- Automating the Build
- What, Why and How?
- FinalBuilder
- Introduction Demo
- Customising FinalBuilder
- Using VBScript
- Using C
- Replicating the NUnit Action
- Build Reporting
- FinalBuilder Server
- Light-hearted look at Build Failure
- Wrap Up
- Resources, Links
- Contact Info
33FinalBuilder Server
- Team development solution
- Centralises build projects through a web
interface
- Manage multiple build projects
- All the underlying power of FinalBuilder Pro
- Builds can be started and stopped by authorised
users
- Build logs and performance statistics viewable in
a browser wide reach
34Agenda
- Automating the Build
- What, Why and How?
- FinalBuilder
- Introduction Demo
- Customising FinalBuilder
- Using VBScript
- Using C
- Replicating the NUnit Action
- Build Reporting
- FinalBuilder Server
- Light-hearted look at Build Failure
- Wrap Up
- Resources, Links
- Contact Info
35Build Failure Simple Red Screen
- Dr. Neil Roodyn promotes the use of an
integration machine for the build
- Green screen (successful)
- Red screen (failed)
36Build Failure More complex!
- http//www.pragmaticprogrammer.com/pa/pa.html
37Agenda
- Automating the Build
- What, Why and How?
- FinalBuilder
- Introduction Demo
- Customising FinalBuilder
- Using VBScript
- Using C
- Replicating the NUnit Action
- Build Reporting
- FinalBuilder Server
- Light-hearted look at Build Failure
- Wrap Up
- Resources, Links
- Contact Info
38Conclusions
- Automating the build process entirely, is worth
the effort
- For large projects, I have spent 4-5 hours inside
FinalBuilder, but made up that time many times
over
- Quality increase
- If used correctly, automated build products, such
as FinalBuilder are to the build process what
test-driven development (TDD) is to the test/code
sub-process - Reduces integration headaches (integrate often)
- An automated build tool goes beyond F5 (or F9)
39Resources
- FinalBuilder
- http//www.finalbuilder.com
40Links
- Using FinalBuilder, compiler, etc. inside a
Virtual Machine (VM)
- http//lachlan.gemmell.com/2004/07/build-it.html
- Excellent approach if you need to maintain a
whole build environment, including third party
components
- Sinjin Joseph
- http//weblogs.asp.net/sjoseph/archive/2007/05/06/
notes-on-the-software-build-process.aspx
- ZoomIt
- http//www.microsoft.com/technet/sysinternals/Misc
ellaneous/ZoomIt.mspx
41Contact Information
- Craig Murphy
- http//www.twitter.com/CAMURPHY
- Updated slides, notes and source code
- http//www.CraigMurphy.com
- http//www.CraigMurphy.com/blog
42Test Driven Development and Code Coverage
42