Category: Uncategorized

Changing mbunit helper to a task

Posted by on January 25, 2009

The mbunit function in rubicant has been changed from just a function to a complete task.

MbUnitTask

Behind the scenes, what MBUnitTask does is copies over the minimal necessary support files from an MBUnit directory and then runs the tests. It uses the MBUnit Console Runner and is only tested with MBUnit 2.4. It is used as follows:

   1: MbUnitTask.new(:task_name => :dependencies) do |mbunit|
   2:   mbunit.mbunit_dir = "/path/to/mbunit" 
   3:   mbunit.test_dir = "/path/to/testing/dir" 
   4:   mbunit.test_files = ["tests.dll"]
   5:   mbunit.assembly_path => FileList["/assemblies/to/include/*.dll"],
   6:   mbunit.report_folder => "sets /rf:",
   7:   mbunit.report_name_format => "sets /rnf:",
   8:   mbunit.report_type => "sets /rt:",
   9:   mbunit.show_reports => "sets /sr:",
  10:   mbunit.transform => "sets /tr:",
  11:   mbunit.filter_category => "sets /fc:",
  12:   mbunit.exclude_category => "sets /ec:",
  13:   mbunit.filter_author => "sets /fa:",
  14:   mbunit.filter_type => "sets /ft:",
  15:   mbunit.filter_namespace => "sets /fn:",
  16:   mbunit.verbose => "sets /v{optionvalue}",
  17:   mbunit.shadow_copy => "sets /sc:" }
  18: end

 

Mbunit helper

   1: mbunit(name, dependencies, mbunit_dir, test_dir, test_files, opts={}) 

Usage is:

   1: mbunit(:run_tests, [:compile_tests], "/path/to/mbunit/dlls",
   2:         FileList["/test/dlls/test.dll"],
   3:         {:working_dir => "/dir/to/run/tests/in",
   4:          :assembly_path => FileList["/assemblies/to/include/*.dll"],
   5:          :report_folder => "sets /rf:",
   6:          :report_name_format => "sets /rnf:",
   7:          :report_type => "sets /rt:",
   8:          :show_reports => "sets /sr:",
   9:          :transform => "sets /tr:",
  10:          :filter_category => "sets /fc:",
  11:          :exclude_category => "sets /ec:",
  12:          :filter_author => "sets /fa:",
  13:          :filter_type => "sets /ft:",
  14:          :filter_namespace => "sets /fn:",
  15:          :verbose => "sets /v{optionvalue}",
  16:          :shadow_copy => "sets /sc:" } 

Runs the tests in test_files in the test_dir with the dlls from mbunit_dir using the options in opts.

For more information on the command line arguments for the mbunit console runner, please visit: http://docs.mbunit.com/help/html/gettingstarted/MbUnitConsoleRunner.htm

Procrastination, we meet again!

Posted by on December 20, 2008

I told myself I would do a whole lot more writing than I’ve been doing. I’ve even got ideas of things I would like to write on! Honest. Anyway, between Christmas, kids and a project (that’s related to this blog!) that I’ve been working on, I haven’t had a lot of time to sit down and focus.

So to my whopping 0 subscribers, just you wait! There will be content. Oh yes. There will be content.

Starting Anew.

Posted by on October 28, 2008

Sorry to any of you who may be looking for my previous 2, very outdated posts that are no longer. These are no longer available (as they were very out of date and not quite correct anymore). I plan on putting up some new stuff as soon as I can find some time to write something out.