44

Does anyone know where I can find a good tutorial to walk me through how to setup TeamCity CI server? I am new to unit testing and the agile philosophy of development so I could use some help getting my feet wet. I'm working with Asp.NET code using NUnit for my unit tests and would prefer a windows environment for the TeamCity server. Please note that I have no idea how to configure NANT for the build or anything else needed to have continuous builds. I just have unit tested .NET code.

Agile Noob
  • 2,305
  • 4
  • 24
  • 35
  • This answer http://stackoverflow.com/a/730310/23659 to another question includes a link to a good screencast. – Mike Two Feb 15 '12 at 21:58

7 Answers7

27

The folks at DimeCasts.net have a nice TeamCity tutorial.

Ben Griswold
  • 17,793
  • 14
  • 58
  • 60
11

Note that TeamCity can also use MSBuild, which can run Visual Studio .sln files. That's a great place to start when getting your feet wet - just have the build server run your build script that uses MSBuild to call your .sln file.

We check in our build script in a Build directory, and we are sure to use relative paths, so anyone can run the build. We have around 140 projects (both managed and unmanaged) plus a host of other activities (auto-generation of classes and objects from metadata for example).

Also, when setting up a CI server for the first time, prepare to become very familiar with your build. For the first several weeks, when something breaks people may blame it on the CI server instead of checking in broken code. Understanding your build and keeping it as simple as possible will help the whole team focus on integrating better.

Cory Foy
  • 7,202
  • 4
  • 31
  • 34
7

I found an excellent series of blog posts on setting up TeamCity, Subversion & Web Deploy. It saved me loads of time.

Richard Garside
  • 87,839
  • 11
  • 80
  • 93
6
  1. get nant to compile your code and run tests
  2. download and install teamcity
  3. setup your test report as a build artifact in the general settings

nunit is a good place to start because it works well with teamcity.

teamcity is really nice to setup, post back it you have any problems with it

here's some links to help

Scott Cowan
  • 2,652
  • 7
  • 29
  • 45
  • you can use nant to compile a solution/project/code file level. I tend to compile at a file level since it allows me to include tests in the same project as my application code. Then I filter out *Specs.cs – Scott Cowan Dec 19 '08 at 11:11
4

I've written a pretty long post on how to do this with ASP.Net and web deployment projects - sounds right up your alley (don't know if I'm allowed to post this - mods?):

Richard Garside
  • 87,839
  • 11
  • 80
  • 93
Doug
  • 6,460
  • 5
  • 59
  • 83
2

I found an article at "Pete W.'s Idea Book" blog that was invaluable to setting up TeamCity and Visual SVN for me. VisualSVN + TeamCity + NAnt + SQL Server

Even talks about getting SQL Server 2005 working with TeamCity (although, I believe it works out of the box with TeamCity 4.x). Integration with NAnt helped, too.

This is a good introduction and tutorial article.

Wai Ha Lee
  • 8,598
  • 83
  • 57
  • 92
Todd Brooks
  • 1,167
  • 1
  • 13
  • 24
0

I recently wrote a post on publishing winforms ClickOnce deployments with TeamCity. You don't mention exactly what kind of stuff you need to build with your CI environment, so I don't know how applicable it is. FWIW:

Kelly Adams
  • 750
  • 4
  • 15