Andrew Stopford's Weblog

poobah

News

Articles

Family

Old Blogs

Adding MbUnit to CCNet

Some slightly older guides knocking about on the web, the easiest way of adding MbUnit to CCNet is to change the XSL reports (you can try the plugin option if you want). As noted in an earlier post, the XSL to show MbUnit reports is shipped with CCNet so you will have everything you need. I will get this into the docs I promise but for now here is a quick guide.

Get MbUnit reports into CCNet.

You will need to ensure that MbUnit is reporting to XML (you can use either the msbuild, nant or console tasks for this) and is merged into the CCNet XML by changing the ccnet.config and your projects MERGE group.

Use MbUnit XSL

When this is done you will need to change CCNet to use MbUnit XSL over the default NUnit XSL. You will need to make this change for the webdashboard and the server. There two ways of doing this, the easiest is to rename files (in the XSL folder) as follows.

  • unitests.xsl to unitests2.xsl
  • MbUnitSummary.xsl to unitests.xsl
  • tests.xsl to tests2.xsl
  • MbUnitDetails.xsl to tests.xsl

The other option is

  • change the ccservice.exe.config and the xslFiles section replacing tests.xsl with MbUnitDetails.xsl
  • change the dashboard.config, replacing unitests.xsl with MbUnitSummary.xsl and tests.xsl with MbUnitDetails.xsl.

Comments

Noticias externas said:

Some lightly older guides knocking about on the web, the easiest way of adding MbUnit to CCNet is to

# July 4, 2007 8:59 AM

Setting up a basic continuous integration server with CruiseControl.NET « How to become a better programmer said:

Pingback from  Setting up a basic continuous integration server with CruiseControl.NET « How to become a better programmer

# December 11, 2007 5:02 AM

Babak Naffas said:

I am integrating MbUnit tests for a project I'm working on that our CCNET implementation is building. I have an NAnt script that compiles the solution and runs the MbUnit tests.

When I run the NAnt script manually from a command line, I get a successful build. However, when I run the same script via CCNET, I get the following error message:

Build Error: NAnt.Core.BuildException

Unexpected engine error while running Tests

  at MbUnit.Tasks.MbUnitTask.ExecuteTests(FileSet assemblySet)

  at MbUnit.Tasks.MbUnitTask.ExecuteTask()

  at NAnt.Core.Task.Execute()

  at NAnt.Core.Target.Execute()

  at NAnt.Core.Project.Execute(String targetName, Boolean forceDependencies)

  at NAnt.Core.Project.Execute()

  at NAnt.Core.Project.Run()

I do not want to mess with the configuration files since there are 10 other projects on this server and this project is the only one that's using MbUnit instead of NUnit.

Any ideas?

# April 1, 2008 5:46 PM

Jeff Brown said:

@Babak

Dunno about your NAnt problem since in any case I am only using the Gallio test runners nowadays.  You might try using an <exec> task to run MbUnit.Cons.exe.

(Or try Gallio Alpha 3 while we will release this weekend.  Instructions on configuring CCNet are included in the installation folder under "extras/ccnet".)

However, you probably do want to take the time to edit the CCNet dashboard.config file.  It's not hard.  You can customize your reports by project so that only the MbUnit project is affected.

# April 5, 2008 8:38 PM

Babak said:

I had to step away from this issue for a while but I'm revisiting it. I've resolved some of hte issues I was having, but now I get the following error message from CC.NET and is preventing my progress:

Unexpected engine error while running Tests

Failed loading assemblies

Failed loading TestDomain

Failed loading assembly

The argument type 'MbUnit.Core.Filters.AnyTypeFilter' cannot be converted into parameter type 'MbUnit.Core.Filters.ITypeFilter'.

Object must implement IConvertible.

# April 29, 2008 7:50 PM

Lee Englestone said:

This seems very hacky to me.

And we sometimes use NUnit and sometimes MBUnit.

Is it true that it is better to use Gallio to run either NUnit or MBUnit Tests as the output from Galiio is the same for either unit test type?

-- Lee

# August 12, 2009 4:55 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)