Table of Contents – Continuous Integration in .NET

Table of Contents

Copyright

Brief Table of Contents

Table of Contents

Preface

Acknowledgments

About this Book

About the Authors

About the Cover Illustration

1. Make it happen

Chapter 1. Understanding continuous integration

1.1. What does it mean to integrate continuously?

1.1.1. Defining continuous integration

1.1.2. CI and your development process

1.1.3. Do I need to build with every change?

1.1.4. Overcoming team objections

1.1.5. It’s all about reducing risk

1.2. A simple Hello World–type CI example

1.3. CI tools

1.3.1. Essential tools

1.3.2. Code-Analysis Tools

1.3.3. Testing Tools

1.3.4. Other tools

1.4. A project for CI: leasing/credit calculator

1.4.1. Calculation core

1.4.2. Calculators

1.5. Summary

Chapter 2. Setting up a source control system

2.1. Choosing the right source control system for you

2.1.1. Benefits of source control systems

2.1.2. Source control aspects to consider

2.2. Setting up a Subversion source control server

2.2.1. Installing VisualSVN Server

2.2.2. Creating users and groups

2.2.3. Creating the repository

2.2.4. Keeping a healthy repository

2.3. TortoiseSVN and working with the repository

2.3.1. Subversion client: TortoiseSVN

2.3.2. Creating a working copy

2.3.3. Committing changes

2.3.4. Updating and committing files

2.3.5. Referencing

2.4. Setting up Team Foundation Server

2.4.1. Installing TFS 2010

2.4.2. TFS collections

2.4.3. Using Visual Studio Team Explorer

2.4.4. Managing TFS source control

2.4.5. Locking and shelving

2.5. Summary

Chapter 3. Automating the build process

3.1. Build automation

3.1.1. Make and its children

3.1.2. It’s not an Ant

3.2. The Microsoft worker: MSBuild

3.2.1. First encounters with MSBuild

3.2.2. Using predefined tasks to extend an MSBuild script

3.2.3. MSBuild Community Tasks

3.3. The happy couple: Visual Studio and MSBuild

3.3.1. Examining a project file

3.3.2. Examining the solution file

3.3.3. Starting an MSBuild script with Visual Studio

3.4. Extending MSBuild by writing and using custom tasks

3.4.1. Implementing a custom task

3.4.2. Putting it all together

3.5. Summary

Chapter 4. Choosing the right CI server

4.1. A quick review of the CI process

4.2. Examining the CI server possibilities

4.2.1. Manual integration build or your own CI server?

4.2.2. CI servers for .NET

4.3. Continuous integration with CruiseControl.NET

4.3.1. Starting with CCNet

4.3.2. Configuring CCNet

4.3.3. Triggering builds

4.4. Continuous integration with TeamCity

4.4.1. Running TeamCity

4.4.2. Configuring a project

4.4.3. Pre-tested commit

4.5. Continuous integration with Team Foundation Server 2010

4.5.1. TFS and build controllers

4.5.2. Configuring TFS build agents

4.5.3. TFS build configuration

4.6. Summary

Chapter 5. Continuous feedback

5.1. Knowing the state of your CI process

5.2. Continuous feedback with CruiseControl.NET

5.2.1. The CCNet Web Dashboard

5.2.2. Getting feedback with CCTray

5.2.3. Alternative feedback mechanisms with CCNet

5.3. Continuous feedback with TeamCity

5.3.1. TeamCity web feedback

5.3.2. The TeamCity Windows Tray Notifier

5.3.3. Alternative notifications with TeamCity

5.4. Continuous feedback with Team Foundation Server

5.4.1. TFS tray notification

5.4.2. Getting build details from the TFS website

5.4.3. Alternative feedback mechanisms with TFS

5.5. Extending build notifications

5.5.1. Providing feedback via an LED message board

5.5.2. Providing feedback via SMS notifications

5.6. Summary

Chapter 6. Unit testing continuously integrated code

6.1. Unit testing from a bird’s-eye view

6.2. First encounters with unit testing

6.2.1. The search for perfect unit test material

6.2.2. Testing with NUnit

6.2.3. Marrying NUnit with CruiseControl.NET

6.2.4. Examining test coverage

6.3. Microsoft unit testing framework

6.3.1. Creating unit tests the Microsoft way

6.3.2. Testing on TFS 2010

6.3.3. MSTest in non-TFS environment

6.4. Summary

2. Extend it

Chapter 7. Performing integration, system, and acceptance testing

7.1. Extending your CI test repertoire

7.1.1. Beyond unit tests in CI

7.1.2. Involving the customer or domain expert in the CI testing process

7.1.3. Right timing, right failing

7.2. Up close and personal with integration tests in CI

7.2.1. Performing integration testing

7.2.2. From mocking to integration testing

7.3. Testing the user interface

7.3.1. Testing Windows Forms with White

7.3.2. Silverlight test automation

7.3.3. Testing a web application with Selenium

7.3.4. Integrating UI tests into the CI process

7.4. Acceptance testing with FitNesse

7.4.1. Preparing the FitNesse framework

7.4.2. FitNesse and CI

7.5. Summary

Chapter 8. Analyzing the code

8.1. Analyzing object code with FxCop

8.1.1. Using Visual Studio Code Analysis

8.1.2. Setting up continuous FxCop code analysis

8.1.3. Integrating FxCop with CI servers

8.2. Analyzing C# with StyleCop

8.2.1. Using StyleCop

8.2.2. Continuous StyleCop analysis

8.3. Custom FxCop and StyleCop rules

8.3.1. Developing a custom FxCop rule

8.3.2. Developing a custom StyleCop rule

8.3.3. Incorporating custom rules into the CI process

8.4. Extending code analysis

8.4.1. Static analysis with NDepend

8.4.2. Analyzing code duplication with TeamCity

8.5. Summary

3. Smooth and polish it

Chapter 9. Generating documentation

9.1. XML documentation

9.1.1. Common XML documentation tags

9.1.2. Formatting text in XML comments

9.2. Sandcastle

9.2.1. Building with Sandcastle

9.2.2. Sandcastle in CI

9.3. Summary

Chapter 10. Deployment and delivery

10.1. Creating an installer for your Windows application

10.1.1. Creating a Microsoft Installer package in Visual Studio

10.1.2. Continuously creating installation files

10.2. Windows Installer XML toolset

10.2.1. Creating an installer using WiX

10.2.2. Automating WiX with CI

10.3. ClickOnce deployment

10.3.1. Creating a ClickOnce deployment

10.3.2. ClickOnce in a CI scenario

10.4. Web Deployment Tool

10.4.1. Visual Studio 2010 and MS Deploy

10.4.2. MS Deploy on the build server

10.5. Summary

Chapter 11. Continuous database integration

11.1. What is continuous database integration?

11.2. Rolling your own continuous database integration

11.3. Continuous database maintenance with RoundhousE

11.4. Continuous database maintenance with Visual Studio

11.4.1. Getting started with database projects

11.4.2. Generating test data

11.4.3. Unit testing stored procedures

11.4.4. Putting Visual Studio database maintenance into CI

11.5. Summary

Chapter 12. Extending continuous integration

12.1. Speeding up CI

12.2. Seven deadly sins of slow software builds

12.2.1. Making a build script drive your build

12.2.2. Getting rid of build-script targets’ side effects

12.2.3. Multiplying updated files

12.2.4. Pass-based builds

12.2.5. Output in the source directory

12.2.6. Monoliths

12.2.7. Bad dependencies

12.3. Scaling CI

12.3.1. Build-agent theory

12.3.2. Scaling TeamCity

12.4. Legal roadblocks

12.5. Maturity model for CI

12.5.1. Building

12.5.2. Deploying

12.5.3. Testing

12.5.4. Reporting

12.6. Summary

Index

List of Figures

List of Tables

List of Listings