This page last changed on Mar 22, 2007 by grahamhay.

MbUnit ships with a console appliction (MbUnit.Cons.exe) that can execute test assemblies. To access the console built-in help, type

MbUnit.Cons.exe or MbUnit.Cons.exe /? or MbUnit.Cons.exe /help

and the following should appear:

MbUnit xxxxx Console Application
 ------------------------------------------
     /report-folder:<string>             short form /rf  Target output folder for the report s
     /report-name-format:<string>        short form /rnf Format string for the report name. {0} is
 	replaced by the date, {1} by the time.Default = mbunit-{0}{1}
     /report-type:{Xml|Html|Text|Dox}    short form /rt  Report types supported: Xml, Html, Text
     /show-reports[+|-]                  short form /sr  Show generated reports in a window
     /filter-category:<string>           short form /fc  Name of the filtered category
     /exclude-category:<string>          short from /ec  Name of the categories to exclude (v2.4+)
     /filter-author:<string>             short form /fa  Name of the filtered author name
     /filter-type:<string>               short form /ft  Name of the filtered type
     /filter-namespace:<string>          short form /fn  Name of the filtered namespace
     /verbose[+|-]                       short form /v   Return a lot of information or not...
     @<file>                             Read response file for more options
     <Files>

Examples

  • Execute a single assembly
MbUnit.Cons myassembly.dll
  • Execute two assemblies
MbUnit.Cons myassembly.dll myassembly2.dll
  • Execute tests in an MbUnit project (v2.4+)
MbUnit.Cons myproject.mbunit
  • Execute a single assembly and create an HTML report
MbUnit.Cons myassembly.dll /report-type:Html
  • Execute an assembly and filter by category
MbUnit.Cons myassembly.dll /filter-category:A or MbUnit.Cons myassembly.dll /fc:B,C
  • Execute an assembly and exclude by category (v2.4+)
MbUnit.Cons myassembly.dll /exclude-category:A,B or MbUnit.Cons myassembly.dll /ec:C
  • Execute an assembly and filter by author
MbUnit.Cons myassembly.dll /filter-author:John or MbUnit.Cons myassembly.dll /fa:Mike,Bill

The MbUnit GUI also supports a limited set of arguments, see TestExecutionUsingWinFormsApplication for details.

Document generated by Confluence on Jun 11, 2007 11:56