Now that my library of MbUnit unit tests is growing it's becoming a non-trivial amount of time to run them, something that I'd rather avoid when doing a very tight red/green/refactor loop.
To speed things up I've been using the CurrentFixture attribute like so:
[CurrentFixture]
and the associated property of the AutoRunner in main:
[Test]
public void DoSomeTest()
{
...public static void Main (string[] args)
{
using (AutoRunner auto = new AutoRunner ())
{
auto.Domain.Filter = FixtureFilters.Current;
...
The issue is, I keep having to check out my previous test fixture to remove the attribute so I can worry only about my current fixture. That leads to a lot of comments like "Removed CurrentFixture attribute" in my version control.
Here's what I now do. I don't use CurrentFixture at all. Instead I have the following in main:
public static void Main (string[] args)
{
using (AutoRunner auto = new AutoRunner ())
{
auto.Domain.Filter
= FixtureFilters.Type ("My.Full.Class");
...
Now I only need to check out the main line (or more often just keep it checked out) to work on another fixture.
[Listening to: Stone Temple Pilots - Trippin' on a Hole in a Paper Heart]
Saturday, September 18, 2004
An alternate to MbUnit's CurrentFixture
Posted by BigEasy at 9/18/2004 03:35:00 PM
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment