Search code examples
automationautomated-teststeamcityautomated-deployncrunch

Integrating NCrunch w/ TeamCity


Does anybody know of any resources/guides on getting NCrunch integrated w/ TeamCity? My company just started investing in more automation research and development; I am working on creating the automated testing suite using NCrunch while another developer is working on integrating automated build deployment/testing w/ TeamCity.

I am currently only running what tests I have locally but would like to look to setup an NCrunch grid and eventually integrate this w/ TeamCity so that tests fire periodically or upon a new build.

I would like to have an idea of how all of this may conceptually work together as automated builds/tasks are new to me. I've tried some google searching but am finding it hard to piece together, any help is appreciated.


Solution

  • We have recently done this and it was fairly easy. basically it breaks down like this:

    • install NCrunch console app on the TC agent machine
    • install NCrunch grid node software on each machine you want to act as a grid node (should not be the TC machines). Get this working with a dev machine first.
    • configure the console tool to use the grid node (by cutting and pasting the config element from a dev machine into the console tool config was the easiest way we found)
    • Set your build to run the tests using NCrunch by creating a step in the TC build which invokes the NCrunch console tool from the command line

    The Ncrunch docs on the console tool (and contain a section on using TeamCity) were pretty good and Remco is a responsive guy if you ask questions on the forum.

    One thing worth remembering is that you can override some of the settings in the console tool by passing them as arguments when you invoke it. We use this to restrict the number of test threads the console tool uses to run tests (as its running on the build agent) and force the grid to do more of the work.