mbunit

[MBUnit 3] Is there any good way to run one set of tests with two different AssemblyStartups

I'm working on a pretty standed ASP.NET MVC application. We've got the core logic behind a set of services and we're using StructureMap to inject appropriate instances of appropriate IRepositories to abstract communications with the data layer proper. We've also got a rather exhaustive series of unit tests on these services. But, as thin...

Mbunit and selenium

Hi, Can anyone tell me how get mbunit to run more than one test at a time without it setting up and tearing down after every test? Currently I'm using selenium for UI testing and need to run the tests consecutively do a login page. Thanks in advance, cb ...

Can I create a wrapper around NUnit, MbUnit, xUnit or other testing framework?

How can I create a wrapper around a testing framework? We still doesn't know which testing framework are going to use, but I need to start writing unit tests. With this question I want to know how can I switch from NUnit to mbUnit, xUnit or even MSTest. ...

Unit test summary incorrect in Visual Studio for mbunit tests

When I run my mbunit tests in Visual Studio test runner (VS 2008) my tests pass but the test summary does not include the passed tests. For a test, I created a test project with a single test and this is the test summary VS returns when I run it: Run Result: 0/1 tests passed, 0 failed, 1 skipped But the test is shown as passed in the T...

FixtureSetup on MbUnit / Gallio doesn't run

I don't understand this problem. First I had MBUnit v2 referenced and everything worked perfectly. Then I installed and referenced MBunit v3... Which seems to be MbUnit.dll and Gallio.dll in the Gallio install bin-folder. And when I compiled I got some warnings on TestFixtureSetup, so I changed those to FixtureSetup. But now they don't g...

Implementing NHibernate Unit Test to Generate Schema with VB.NET/MBUnit

Hi, I'm trying to implement unit tests for my NHibernate data access layer. The first test, which I drew from an example I found on the web (http://blogs.hibernatingrhinos.com/nhibernate/archive/2008/04/01/your-first-nhibernate-based-application.aspx), is just trying to recreate the database using my domain classes/mappings. I've been...

Setting up Hudson with Selenium RC to run tests written in C#

I just deployed a Hudson server and configured it to checkout, build and deploy to a testing http server. Now I want more =) I have some Selenium RC tests wrtten in C#/.Net, using the MbUnit infrastructure, that runs ok on Gallio Icarus. How to setup Hudson to run these tests? Our is in a Windows 2003 server. I was thinking about jus...

How do you Test that a IEnumerable<SomeClass> has all items of class SomeClass in MBunit?

How do you Test that a IEnumerable has all items of class SomeClass in MBunit? I've once used Visual Studio Unit Test Framework and found CollectionAssert.AllAreInstancesOfType or something to check that. But how do I do it in MBunit? ...

Use of <mbunit> in NAnt fails

Hi Everyone, 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="tru...

mbunit v2 vs v3 xml report files

Our test source tree currently contains c# projects that either contain mbunit v2 tests or v3 tests (the newest projects). Our old v2 test projects were exes that used the "autorunner" to generate XML reports. Since the new projects are using Gallio which does not have the autorunner, we use gallio.echo.exe to generate the appropriate xm...

Resharper running all tests when only a single one is selected

I'm using Resharper 4.5 with Visual Studio 2008 and MBUnit testing, and there seems to be something odd with using ReSharpher to run the tests. On the side there are the icons beside the class each test method with the options Run and Debug. When I select Run it just shows me the results of the single test. However I noticed that the te...

Is it possible to have factory tests in mstest, like in MbUnit?

Dear ladies and sirs. We are using mstest for unit tests at our company. The main reason is that there is no free Visual Studio integration for MbUnit (TestDriven.NET is not free for companies). Recently, I have stumbled upon a need to run the same unit tests on two different implementations of the same interface. From my past experien...

UsingFactories alternative in MbUnit v3.

Dear ladies and sirs. I am trying to figure out how to write combinatorial test in MbUnit v3. All of the sample code on the web refers to MbUnit v2, which means using 3 attributes: CombinatorialTest Factory UsingFactories In MbUnit v3 there is no UsingFactories attribute (and the Factory attribute semantics is widely different and C...

How can I emulate MbUnit's [MultipleCulture] attribute in MSTest?

MbUnit has a great attribute: MultipleCultureAttribute. I am wondering if there is an easy way to do this in MSTest? So far, the best I can come up with is: Externalizating the actual test code to a private method Saving the current culture Setting the culture and calling the private method (repeated for each culture) And finally, rev...

How to mock just a method?

I need to mock just Method1 to test my process exception. How I can do that? public interface IFoo { void Method1(); object Method2(); } public class Foo : IFoo { public void Method1() { // Do something } public object Method2() { try { // Do something Method1(...

How do I ignore a test conditionally in mbUnit?

I'm using TeamCity to do automated builds of test and production. TeamCity runs our mbUnit 3.1 tests at the end of the process with Gallio. When running the test build, Gallio should try to execute tests against the test database server. However, when running a production build, these tests should not be run because TeamCity can't acce...

NCover, Mbunit, command line Profiler connection can not connect?

I am trying to use NCover 1.5.8 with Mbunit 2.4.2.130. I am using the following example from a bat file. I everytime I try running this, it tells that I can not connect to the NCOVER process? SET NCOVERPATH=C:\Code\rsinetmvc\branches\web_app\trunk\build_tools\ncover\ REM Target path for assembly output, and report output. SET TARGETPATH...

Visual Studio .NET - MbUnit tests using Gallio Integration - issues with multiple asserts

I am using gallio to integrate mbunit's test runner with the mstest test runner in visual studio. it works VERY well - except when I am running a test with multiple assert statements. The test will either pass or fail based on the FIRST assert statement. I know a lot of people are against multiple asserts, but they are unavoidable in cas...

MbUnit: Comparing distinct object instances

Hi, I'd like to know whether there is a way to compare two objects in MBUnit so that the test is passed when the objects "look" the same, even if those are distinct instances? For example: [TestFixture] class ComparisonTestFixture { class foo { public string bar; } [Test] public void Compari...

Gallio Integration with NANT and CruiseControl.NET

In our build process we're currently using MBUnit 2.x tests, called from an NAnt task, called from CruiseControl.NET. I've uprgaded to Gallio and MBUnit 3.x locally and am able to run tests from VS2008. I'm having trouble getting our build process upgraded. It looks like we have two options, either run the tests from CruiseControl.net...