Thursday, May 29, 2008

Announcing Gallio Alpha 3 Update 2

Today we are releasing an update to Gallio Alpha 3 with a few new features.

Download here: (link)

New and Noteworthy

ReSharper v4.0 Beta Integration

If you haven't already heard, ReSharper v4.0 Beta is out!  (link)

And now we have support for it...

Gallio Test Report Action in ReSharper

ReSharper's unit test explorer is a great tool but it does not currently support all of the features needed for full native integration with Gallio.

For example, there is no way for us to display embedded images -- such as screenshots -- as part of the test output.  There are also some limitations as to how we can present the results of data-driven tests -- like Row-based tests -- in ReSharper.

No matter.  We have now added a custom action to display the full Gallio Test Report.


We have also made a few other small improvements to the output.

Unfortunately stack traces still are not clickable and there does not seem to be much we can do about it just now due to ReSharper limitations.

Pex Integration for MbUnit

Microsoft Pex has finally be released!  (link)

We already had support for an earlier prerelease version of Pex but we have now upgraded it to the latest edition.

The basic idea is that you can write parameterized tests using MbUnit v3 syntax and run Pex against them to generate test cases.

Step 1: Add a reference to MbUnit.Pex.


Step 2: Add the MbUnit Pex package attribute to your test assembly.


Step 3: Give Pex something to chew on.


Step 4: Pex It!


Step 5: Examine the generated tests.


There you go!

MbUnit v3 Contract Verifiers

I've added a couple of test fixtures to help verify common contracts such as equality and correct exception implementation.

Currently you use these verifiers by creating subclasses.  However, I'm tempted to transform the verifiers into mixins in the long run.


This checks Equals, GetHashCode(), IEquatable<T>.Equals(), operator== and operator!=.  You just need to provide the verifier with suitable distinct instances of your type.



This checks that an exception is serializable and has the standard constructors.


Upcoming Stuff

There's a bunch of new stuff on the way in Alpha 4 as we march onwards to feature-completeness.

Here's a little list to whet your appetite:

  • First partial draft of the Gallio Book.
  • Constraints framework.
  • Improved assertions.
  • .Net 3.5 features.
  • Workspace model for managing test project resources like historical test reports.
  • Metadata in CSV files.
  • [Factory] attribute for easier implementation of custom data sources.
  • New plug-in model and performance optimizations (might slip to Alpha 5).

I'm aware that there are a number of pending bugs and feature requests for the standard Gallio GUI (Icarus).  If you're interested in giving Graham a hand with this please let me know!

Ditto for the Visual Studio Team System integration.

Technorati Tags: ,


Yann Trevin said...

I'm just playing with the EqualityContractVerifier. It's a really nice feature which saves time. Equality tests are usually always similar, painful to write, and prone to forgetting some of the possible combinations. I had never heard about such contract verifiers before. Is it an original idea for MbUnit ? Or does it come from another world (Java) ?

Anonymous said...

Great stuff guys,

I've been using R#4 beta integration with mbunit 2.0 but I noticed
that if I use rowtest with 2 tests only 1 test is actually executed,
has rowtest integration with resharper been implemented? Using it runs both tests
Reshaper 4.0 beta integration with mbunit
[rowtest] problem, I worked out that if I do Run Tests at class level
then it does go through all the [rowtest] but if I run the tests at
method level, only run 1 of the 2 tests run not both

[TestFixture, FixtureCategory("Database Tests")]
** public class UserTests

[RowTest, RollBack]
[Row("User2", true)]
[Row("User1", false)]
**** public void UserManager_Can_CreateUser(string username, bool

Scenario: Clicking ** Run Tests, 2 tests are run
Clicking **** Run only UserManager_Can_CreateUser test
1 test is only run

Regards DotnetShadow

Anonymous said...

We've just tried to use this version of Gallio with our MSTest tests, however when we run them Gallio just reports that they have been skipped.