Improving software quality with an automated build process

Similar documents
Two-Way Data Binding with WinJS By Marcin Kawalerowicz and Craig Berntson, authors of Continuous Integration in.net

Developing Microsoft SharePoint Server 2013 Advanced Solutions

Gallio: Crafting a Toolchain. Jeff Brown jeff.brown@gmail.com

2933A: Developing Business Process and Integration Solutions Using Microsoft BizTalk Server 2006

Developing Microsoft SharePoint Server 2013 Advanced Solutions

Microsoft Training and Certification Guide. Current as of December 31, 2013

Course 20489B: Developing Microsoft SharePoint Server 2013 Advanced Solutions OVERVIEW

Automatic promotion and versioning with Oracle Data Integrator 12c

This module provides an overview of service and cloud technologies using the Microsoft.NET Framework and the Windows Azure cloud.

SharePoint 2010

We ( have extensive experience in enterprise and system architectures, system engineering, project management, and

This document is provided to you by ABC E BUSINESS, Microsoft Dynamics Preferred partner. System Requirements NAV 2016

MS 20487A Developing Windows Azure and Web Services

IBM WebSphere ILOG Rules for.net

Continuous Integration with CruiseControl.Net

Deploying Migrated IBM Notes Applications to the Cloud

Developing Microsoft Azure Solutions 20532B; 5 Days, Instructor-led

Describe how to utilize the Publishing API to access publishing settings and content.

.NET 3.0 vs. IBM WebSphere 6.1 Benchmark Results

CLOUD COMPUTING & WINDOWS AZURE


Net Developer Role Description Responsibilities Qualifications

System Requirements for Microsoft Dynamics NAV 2013 R2

ITMC 2079 MCTS Configuring and Administering Microsoft SharePoint 2010

IKAN ALM Architecture. Closing the Gap Enterprise-wide Application Lifecycle Management

Experiences with ALM tools in Software Engineering course

Configuring and Administrating Microsoft SharePoint 2010 (10174) HK913S

How To Manage An Orgs Server 10G (Operating System)

Life Cycle Management for Oracle Data Integrator 11 & 12. At lower cost Get a 30% return on investment guaranteed and save 15% on development costs

System Requirements for Microsoft Dynamics NAV 2015

Catálogo de cursos plataforma elearning Microsoft Imagine Academy: Microsoft SQL Server y Visual Studio

Developing Microsoft SharePoint Server 2013 Advanced Solutions MOC 20489

Quick Start Guide. User Manual. 1 March 2012

How To Develop A System For A Car Dealership

Continuous Integration with CruiseControl.Net

Continuous Integration

Administrator s Guide to deploying Engagement across multiple computers in a network using Microsoft Active Directory

1 (11) Paperiton DMS Document Management System System Requirements Release: 2012/

Braindumps.C questions

AQA GCSE in Computer Science Computer Science Microsoft IT Academy Mapping

Multiple Formatter Support for the Logging Application Block

System Requirements. Microsoft Dynamics NAV 2016

Programming with the Microsoft.NET Framework Using Microsoft Visual Studio 2005 (VB)

Developing Windows Azure and Web Services

System Requirements for Microsoft Dynamics NAV 2016

Microsoft Dynamics NAV 2015 Hardware and Server Requirements. Microsoft Dynamics NAV Windows Client Requirements

Automating Security Testing. Mark Fallon Senior Release Manager Oracle

DE-20489B Developing Microsoft SharePoint Server 2013 Advanced Solutions

FocusOPEN Deployment & Configuration Guide

Delivery. Continuous. Jez Humble and David Farley. AAddison-Wesley. Upper Saddle River, NJ Boston Indianapolis San Francisco

MS 10978A Introduction to Azure for Developers

Continuous integration End of the big bang integration era

Migrating SaaS Applications to Windows Azure

To install Multifront you need to have familiarity with Internet Information Services (IIS), Microsoft.NET Framework and SQL Server 2008.

The Deployment Production Line

Hands-On Lab. Embracing Continuous Delivery with Release Management for Visual Studio Lab version: Last updated: 12/11/2013

Vladimir Bakhov AT-Consulting +7 (905)

Oracle Data Integrator 12c: Integration and Administration

Oracle Data Integrator 11g: Integration and Administration

WCFStormHost User Guide

Course 20532B: Developing Microsoft Azure Solutions

Continuous Integration & Automated Testing in a multisite.net/cloud Project

BIG DATA - HADOOP PROFESSIONAL amron

"Charting the Course to Your Success!" MOC B Configuring and Administering Microsoft SharePoint Course Summary

Continuous Integration with CruiseControl.Net

Testhouse Training Portfolio

MultiMimsy database extractions and OAI repositories at the Museum of London

CATALOG OF CLASSES IT and Technical Courses

Workshop for WebLogic introduces new tools in support of Java EE 5.0 standards. The support for Java EE5 includes the following technologies:

Course 10978A Introduction to Azure for Developers

LabStats 5 System Requirements

SQL Server 2005 Express Installation guide

EXAM PRO:Design & Develop Windows Apps Using MS.NET Frmwk 4. Buy Full Product.

Role Description dotnet and SharePoint Developer; Enterprise Systems Integration; IT & Business Systems; BBC Engineering.

MOC DEVELOPING WINDOWS AZURE AND WEB SERVICES

Visual Studio Team Edition for Database Professionals. Woody Pewitt Developer Evangelist

Course 5431: Getting Started with Microsoft Office PowerPoint Course 5420: Editing and Proofreading Documents in Microsoft Office Word 2007

System Requirements for Microsoft Dynamics NAV 2016

Part III. Integrating.NET Open Source Projects in Your Development

Developing Database Business Applications using VB.NET

SPT2013: Developing Solutions with. SharePoint DAYS AUDIENCE FORMAT COURSE DESCRIPTION STUDENT PREREQUISITES

Issue Tracking Anywhere Installation Guide

Continuous integration for databases using Red Gate tools

From Traditional Functional Testing to Enabling Continuous Quality in Mobile App Development

FrontDesk. (Server Software Installation) Ver

Continuous Integration: Improving Software Quality and Reducing Risk. Preetam Palwe Aftek Limited

Programming in C# with Microsoft Visual Studio 2010

System Requirements for Microsoft Dynamics NAV 2016

ESB Features Comparison

Developing Microsoft Azure Solutions

Course Outline: Course 20489B: Developing Microsoft SharePoint Server 2013 Advanced Solutions

Transcription:

Software architecture for developers What is software architecture? What is the role of a software architect? How do you define software architecture? How do you share software architecture? How do you deliver software architecture? Improving software quality with an automated build process

simon.brown@c5alliance.com @simonbrown on Twitter

Training itjersey & itguernsey Books Conferences

definition Why Software Projects Fail Who should do all of this? Simon Brown Hands-on software architect It should be the architect (somebody has to do it and that s why we get paid the big bucks) www.codingthearchitecture.com The role of a software architect Management of non-functional requirements Architecture Technology selection Architecture evaluation Ownership of the bigger picture Leadership Architecture collaboration Coaching and mentoring Quality assurance Why software projects fail... Definition www.codingthearchitecture.com This is what we write about on our website... Design, development and testing...architects are here Delivery to help, not to hinder A hands-on software architect can be invaluable for preventing project failure A hands-on software architect can be invaluable for driving project success Software projects fail for a number of reasons Iterative and agile techniques solve some problems... Website http://www.codingthearchitecture.com London User Group Monthly mix of presentation and discussion Google Group http://groups.google.com/codingthearchitecture

The role of a software architect Management of non-functional requirements Architecture definition Ownership of the bigger picture Leadership Technology selection Architecture evaluation Coaching and mentoring Quality assurance Architecture collaboration Definition Design, development and testing Delivery

Our system

Internet banking system predominantly built on the Microsoft.NET platform C# code on the.net 3.5 framework

It provides a web facade over existing business systems

Distributed architecture

ASP.NET websites

Windows Communication Foundation services in the middle-tier

SQL Server database

XML/TCP connectivity to the back-end banking system

80+ ASP.NET pages

30,000+ lines of C#.NET code

650+ classes

4 WCF services with 100+ service operations between them

50+ SQL stored procedures

5+ man-years of development (it s not a massive system but there is some complexity in there) Let us know if you d like a BCS session on the architecture & design

Why is quality important?

Reputation of the business (e.g. driven by customer satisfaction)

Service level agreements key performance indicators & (e.g. between suppliers, between systems, non-functional requirements, etc...)

Reputation of the development team It s important that we know what we re releasing It s important that the software we release works That s us!

Our software development tools and processes

Visual Studio 2008

AnkhSVN http://ankhsvn.open.collab.net TestDriven.Net http://www.testdriven.net

NCover (& NCoverExplorer) http://www.ncover.com We use NUnit for writing our tests

Low-level tests for classes and components Unit & integration tests Functional tests across container boundaries We have ~3000 automated tests in total

We re lucky to have a dedicated team member running the tests several times a day

CruiseControl.NET Development Server Web-tier Development Server Middle-tier Development Server Database Subversion Source code repository CruiseControl.NET gets the source code from the repository and runs the build script; compiling, testing, packaging and installing the software

Build-Test-Run when we commit code to the repository Continuous & nightly builds Continuous build + longer running integration tests

This is what happens when we break something...

Code branching

We follow Subversion project guidelines for repository layout

Subversion Source code repository Internet Banking system /branches /live bug fixes /work-stream 1 /work-stream 2 /tags /trunk All work is performed on branches This is the main development stream Chapter 5: Repository Administration - Adding Projects http://svnbook.red-bean.com/en/1.0/ch05s04.html

New projects & branches in CruiseControl.NET are managed through a bespoke interface

The build process

Things to do when building a release 1. Compile the code in release mode 2. Publish files to IIS 3. Maybe check it works

Automation is a good thing

d:\subversion\ib4\trunk> nant NAnt 0.85 (Build 0.85.2478.0; release; 14/10/2006) Copyright (C) 2001-2006 Gerry Shaw http://nant.sourceforge.net Buildfile: file:///d:/subversion/ib4/trunk/ib.build Target framework: Microsoft.NET Framework 2.0 Target(s) specified: CruiseControlCheckin [loadtasks] Scanning assembly "NAnt.Contrib.Tasks" for extensions. [loadtasks] Scanning assembly "NCoverExplorer.NAntTasks" for extensions.... Nant is for developers We also use NAntContrib for lots of extra automation goodness! as well as CruiseControl.NET

Release tasks 1. Setup the build and get build metadata 2. Create virtual directories on IIS 3. Clean existing binaries and other resources 4. Run a debug build 5. Execute the unit tests 6. Execute the integration tests and diagnostics* 7. Generate a code coverage report 8. Run a release build and create release packages 9. Install the middle-tier applications 10. Install the web-tier application 11. Run a quick smoke test 12. Create the release bundle * nightly build only

<?xml version="1.0" encoding="utf-8"?> <version> <ib.version>ib4.1.0g</ib.version> <svn.branch.name>@svn.branch.name@</svn.branch.name> <svn.revision>@svn.revision@</svn.revision> <build.datetime>@build.datetime@</build.datetime> <build.hostname>@build.hostname@</build.hostname> </version> Build metadata is generated and included in the assemblies

<target name="createvirtualdirectories"> <mkiisdir dirpath="${base.dir}/ib.web/ib.web" website="default Web Site" vdirname="ib.web" />... </target> IIS virtual directory creation is automated

/// <summary> /// The SetUp method in this class runs before all other tests in this namespace /// to recreate the Banner table and stored procedures. /// </summary> [SetUpFixture] public class BannerSetUp : AbstractMessagingIntegrationTests { [SetUp] public void SetUp() { string path = @"..\..\ib.middletier.messaging.lib\database\banners\"; // create tables ExecuteSqlScript(string.Format(@"{0}Tables\Banner.sql", path)); // create stored procedures ExecuteSqlScript(string.Format(@"{0}StoredProcedures\GetBanner.sql", path)); ExecuteSqlScript(string.Format(@"{0}StoredProcedures\GetBanners.sql", path)); ExecuteSqlScript(string.Format(@"{0}StoredProcedures\UpdateBanner.sql", path)); } } // and load some initial data ExecuteSqlScript(string.Format(@"{0}InitialBanners.sql", path)); Database objects are scripted and those scripts are executed during the integration tests

Diagnostics Is everything installed? Can we see all of our services? Are the external systems up and running? Are all deployed components at the same version? Do all tiers have the required configuration? Are all tiers running the correct.net runtime and framework? Our basic diagnostic checks are automated and included in the build

<target name="smoketest"> <exec program="jmeter.bat" basedir="software\jakarta-jmeter-2.3.2\bin" commandline="-n -t ib.web\ib-smoke-test.jmx -Jib4.users=personal,... -Jib4.numberOfUsers=6 -Jib4.protocol=http -Jib4.host=${ib.servername} -Jib4.context=${ib.context} -Jib4.password=******** -Jib4.memorable=*******" output="${build.dir}\smoketest.log" /> <loadfile file="${build.dir}\smoketest.log" property="smoketestlog" /> <fail unless="${string::contains(smoketestlog, '[personal] Logged off')}" message="smoke test failed for personal user" /> </target> A quick bit of automated smoke testing

A developer s guide to load testing; 28th January 2010

How much does this all cost?

1-2 days for a basic automated build script and continuous integration environment Virtual machines make excellent continuous integration servers

1-2 weeks for a comprehensive build script and continuous integration environment

The future?

Keep driving forward, spotting opportunities for automation where it can add value

// todo: scriptable releases d:\release> nant install NAnt 0.85 (Build 0.85.2478.0; release; 14/10/2006) Copyright (C) 2001-2006 Gerry Shaw http://nant.sourceforge.net Installing web-tier components... Installing middle-tier components... Installing database components... Modifying configuration for live environment... Running post-install diagnostics... Complete; version IB4.1.0.g has been installed. Automated rollbacks can be tricky

Let s wrap up

Build automation is relatively easy to do and the benefits are huge

1. Compile the code in release mode 2. Publish files to IIS 3. Maybe check it works From hope to improved software quality confidence and in our releases 1. Setup the build and get build metadata 2. Create virtual directories on IIS 3. Clean existing binaries and other resources 4. Run a debug build 5. Execute the unit tests 6. Execute the integration tests and diagnostics 7. Generate a code coverage report 8. Run a release build and create release packages 9. Install the middle-tier applications 10. Install the web-tier application 11. Run a quick smoke test 12. Create the release bundle

simon.brown@c5alliance.com @simonbrown on Twitter Thanks for listening. Any questions? http://www.codingthearchitecture.com Software architecture for developers