The following gives a brief overview on how to use MBUnit (v 220.127.116.11) using the GUI or console.
This version of MBUnit is the default testing framework up to version 0.4.0.428 of DBTestUnit.
It assumes MBUnit has been installed to C:\Program Files\MbUnit\.
1. Open the GUI via: C:\Program Files\MbUnit\MbUnit.GUI.exe
2. Click on ‘Assemblies – Add Assemblies’
Browse to location of the the database unit test dll to be tested.
eg for AdventureWorks – the example database used in previous blogs – browse to:
3. The following image shows what the GUI looks like:
Individual tests or groups of tests can be run by selecting various nodes on the hierarchy on the left hand side.
1. The console can be run via: C:\Program Files\MbUnit\MbUnit.Cons.exe.
2. The following sample bat script could be used to run all the sample AdventureWorks database unit tests.
SET testDll=C:\Projects\AdventureWorks\src\AdventureWorksDatabaseTest\bin\Debug\AdventureWorks.DatabaseTest.dll cd C:\Program Files\MbUnit\ MbUnit.Cons.exe %testDll% /v
3. The following examples show a number of different switches that can be used to limit the set of tests to run.
Only run test fixtures categorised as ‘CoreTests’
Only run test fixtures in this namespace.
Only run this individual test fixture.