Continuous integration is what it is, regardless of whether its done in .NET or some other technology. Its a set of best practices aimed at easing the integration pains that arise during the course of a software project. .NET has its own set of tools to make CI happen, but the basic rules stay the same: use a source-control system, build by issuing one command, test, analyze, and deploy. Be ready.
This book is for developers who want to dive into state-of-the-art CI techniques. It provides simple guidance on how to create a full CI process with minimal effort and cost. The book wasnt written for experienced build masters and old-time CI practitioners, but we hope they will find some gems of knowledge as well.
The book is divided into three parts:
Part 1 Make it happen includes chapters 1-6
Part 2 Extend it consists of chapters 7-8
Part 3 Smooth and polish it covers chapters 9-12
Marcin wrote chapters 2 through 10. Craig contributed chapters 1, 11, and 12.
Chapter 1 lays the foundation. It describes the CI process and gives you advice about how to introduce it to your company. Well show a simple way to set up a CI process using a CMD file.
Chapter 2 describes the sine qua non for CI: a source-control system. Youll learn what the code repository is and how to use it. Well help you choose the right tool for your needs. Well describe Subversion and TFS source control as examples of source-control systems that are ready to be used in CI.
Chapter 3 goes deep into build automation. Well describe how to set up a system that lets you build an entire project using one command. Well present MSBuild as our tool of choice.
In chapter 4, well help you choose a CI server. Well describe how to install and set up CruiseControl.NET, TFS in its basic configuration, and JetBrains TeamCity.
In chapter 5, well examine the responsiveness of CI servers. Well look at the feedback mechanisms available in these systems, including web-based reports, system tray notifications, email, and SMS notifications. At the end, youll use a USB LED toy to get immediate feedback from your system.
Chapter 6 describes unit testing and how its a characteristic of the CI process. Youll use NUnit and MSTest to build a simple test suite, and youll integrate the test results with the CI server. Well examine test coverage and sending reports as feedback to developers. Youll learn how to mock some of the tests and how doing so affects the CI process.
In chapter 7, well extend your test repertoire with integration, system, functional, and acceptance tests. Youll use various frameworks to test various technologies: White to test Windows Forms and Silverlight, Selenium to test Web Forms, and FitNesse to establish user-acceptance testing. Youll learn if and when its OK to introduce these kinds of tests to the CI process.
Chapter 8 describes how to perform static code analysis. Youll analyze precompiled .NET intermediate language using FxCop. Well show how to use StyleCop to analyze C# code even before its precompiled. And well explain how to use NDepend to do additional analysis. Well provide information about how to extend and integrate this analysis with CI.
Chapter 9 describes XML comment notation and how to generate MSDN-style documentation from it. Well show you how to generate documentation continuously.
Chapter 10 deals with deployment and delivery, including using Visual Studio to create setup files, and using WiX and MS Deploy. Well show you how to use these techniques on the CI server.
Chapter 11 deals with continuous database integration. Well show you how to maintain a database using Visual Studio and how to perform tests at the database level.
Chapter 12 is about extending CI. Well explain how to deal with slow builds, how to scale the CI process, and how to check the maturity of the CI process youre using.
All source code in listings or in text is in a fixed-width font like this to separate it from ordinary text. Code annotations accompany many of the listings, highlighting important concepts. In some cases, numbered bullets link to explanations that follow the listing.
This book includes a fair amount of source code that is available for download. The source code illustrates the techniques described in the book. It is not production code. We provide many configuration files, especially for CruiseControl.NET. You can access the source code from the publishers website at www.manning.com/ContinuousIntegrationin.NET.
Purchase of Continuous Integration in .NET includes free access to a private web forum run by Manning Publications where you can make comments about the book, ask technical questions, and receive help from the authors and from other users. To access the forum and subscribe to it, point your web browser to www.manning.com/ContinuousIntegrationin.NET. This page provides information on how to get on the forum once you are registered, what kind of help is available, and the rules of conduct on the forum.
Mannings commitment to our readers is to provide a venue where a meaningful dialog between individual readers and between readers and the authors can take place. It is not a commitment to any specific amount of participation on the part of the authors, whose contribution to the books forum remains voluntary (and unpaid). We suggest you try asking them some challenging questions lest their interest stray!
The Author Online forum and the archives of previous discussions will be accessible from the publishers website as long as the book is in print.