Steve Ankeny
Steve Ankeny

Reputation: 335

Integrating Visual Studio 2012 into Cruise Control.NET

I am trying to easily display unit test results and code coverage reports from Visual Studio 2012 into the CruiseControl.NET Build Reports. The pieces are the following:

My problem is how can I control the output name for the vstest.console.exe. I am not finding anyway to control this. My only solution at this point is to write some custom script to find the coverage file and TRX file and rename to a known value. Then the cruise control tool can find the files properly.

Any help would be appreciated. Thanks,

Upvotes: 2

Views: 1260

Answers (2)

granadaCoder
granadaCoder

Reputation: 27852

The command line looks very limiting:

http://msdn.microsoft.com/en-us/library/vstudio/jj155796.aspx

"The TRX logger doesn't support any parameters (unlike the TFS publisher logger)."

From:

Specifying results filename for vstest.console.exe

Here is a general tip.

One way to think of CC.NET is like this: It's a big, fancy "Msbuild.Exe" executor.

So if you can write up your logic in msbuild (.proj) file, you can get CC.NET to call it.

1.  CC.NET calls a source-control retrieve task.
2.  In that retrieve, there is a .proj file.
3.  You get CC.NET to call "msbuild.exe MySolutionBuild.proj"
4.  Have the .proj file run Unit-Tests, create xml, create artifacts (.zip(s) or .msi(s), etc)
5.  After the build, have CC.NET pull in the results (usually xml with File-Merge) and have CC.NET send out emails (publishers).

If you do it this way, if you ever go to TFS (or Jenkins or other), you'll minimize the transition effort.

If you rely very heavily on CC.NET proprietary commands, you can get it to work, but its harder to maintain IMHO.

Upvotes: 1

Williams
Williams

Reputation: 741

Take a look at this post http://rubenwillems.blogspot.be/2011/09/setting-up-ccnet-in-combination-with.html

It shows the step needed. Look at step 4 and step 5 there, these cover unit testing and coverage.

Upvotes: 0

Related Questions