0

I got stuck up when I tried to run the Unit Test written using mbunit from NAnt. when I tried this lines of code in NAntbuilder.

<mbunit 
    report-types="Html;Xml;Text"
    report-filename-format="${test_results.file}"
    report-output-directory="${test_results.directory}"
    halt-on-failure="true"
    failonerror="true">
  <assemblies>
    <include name="${build.directory}\*Test*dll" />
  </assemblies>
</mbunit >

I got an error message

BUILD FAILED

./.../mbunit.build(26,5):

Invalid element <mbunit>. Unknown task or datatype.

I have copied the mbunit.framework.dll, quickgraphalgorithm.dll,quickgraph.dll to NAnt's bin folder.

Could you please any of you help me out to run the mbunit test from NAnt.

Thanks in Advance,

Ganesh

Ganesh Astroved
  • 2,421
  • 2
  • 17
  • 9

2 Answers2

0

This blog post about MbUnit & NAnt lists the assemblies you need to copy to the NAnt bin directory. As far as I can understand from your post you also need:

  • MbUnit.Core.dll
  • MbUnit.Tasks.dll
Halvard
  • 3,891
  • 6
  • 39
  • 51
  • Thanks for your comment, I have copied the MbunitTasks.dll but coudnt find Mbunitcore.dll, after copying that file also I am getting the same error. – Ganesh Astroved Jul 07 '09 at 11:03
  • It seems in the latest version of MbUnit the MbUnit.Core dll is built into MbUnit.Framework dll, so then you should have everything you need (and I'm out of suggestions). – Halvard Jul 07 '09 at 11:17
  • Last shot: Do you have a in your build file? See http://nant.sourceforge.net/release/latest/help/tasks/loadtasks.html for NAnt documentation on the task. – Halvard Jul 07 '09 at 13:08
  • You actually want to use since the Tasks assembly is the one that actually contains the NAnt tasks. – Jeff Brown Jul 11 '09 at 22:26
0

I'm using the latest Gallio framework to run mbUnit tests from Nant, but there's no MbUnit.Tasks.dll file in that package. There's a Gallio.NAntTasks.dll file, but Nant complains that there was a "Failure scanning Gallio.NAntTasks.dll for extensions. Unable to load one or more of the requested types."

Michael Blackburn
  • 3,161
  • 1
  • 25
  • 18