Committed to Code

[66 total ]
MbUnit\Gallio 3.2

MbUnit\Gallio 3.2 was released today and includes many new features and fixes.
The release notes can be found here, you can find the download here.
Icarus
Icarus continues to grow as feature rich GUI for running unit tests, this feature ... [More] has added a search feature as well a number of bug fixes.

Echo
New command line option to allow reports to be compressed as a Zip.
We also offer this support in the MsBuild task, CCNet task and PowerShell integration.
VS Integration
As noted in previous posts Gallio has offered integration with the VS unit test tools for some time now, in this release we have added support for the new VS10 Data Collector feature.

TD.NET
You can now configure TD.NET options from within the Gallio control panel.

MbUnit.
This release has added a number of new features to MbUnit. 
The Mirror framework replaces the reflection support that has existed since v2 and offers a powerful way of testing non public members.

Assert.Count
 
Also see this post from it's author.
Brand new XML Assertions

Assert.Xml.AreEqual

Assert.Xml.Exists 

Assert.Xml.IsUnique
See the new documention on this feature and this post by it's author.
 
Hash code acceptance contract verifier
 

 
Also see this post from it's author. 
New Attributes
[Converter] attribute.
 
 
[Comparer] attribute.
 
[EqualityComparer] attribute.
 

[Formatter] attribute.
 
[Disable] attribute to create abstract test fixtures and methods.
 

Fluent syntax for the Data Generation framework.
 
 
 
Also see this series of posts on the MbUnit Data Generation Framework.
Other

Gallio\MbUnit debug symbols. 

Installs in the correct program files folder when using a 64 bit OS. 

New command line option in Gallio.Utility to format an existing XML report. 

Supports .NET 4.0

Support for R# 5.0 and 5.1.

Support for XUnit 1.6.1 and NUnit 2.5.7

A number of bug fixes
This release was made possible with contributions from Jeff Brown, Yann Trevin, Graham Hay, Vadim Kreyin and Andy Stopford. The core team also wishes to thank the help of Euan Garden, Bruce Taimana and Michael Koltachev.
Finally, with this release I am resuming my role as MbUnit's poobah and help drive Gallio and MbUnit on to the next milestone. [Less]


Use Gallio with SharpDevelop

Matt Ward has a sample that shows how to write a plugin for Gallio that can then integrate with the SharpDevelop IDE.


Gallio and VS2010 code coverage

Scott mentioned on twitter a great post on using VS2010 code coverage with ASP.NET unit tests with the following comment.

So I figured I would work up a quick post on using Gallio with the code coverage features (and ... [More] thus MbUnit, NUnit etc). 
Using Gallio with the VS2010 code coverage features is exactly the same as you would use MSTest. Just enable the code coverage collector.
 
Select the assembly you want to profile (double click the collector to do this)

Run your test 

 Right Click and select code coverage.

  [Less]


Gallio and VS2010

With the launch of VS2010 this week it seems like a good time to talk about some of the work that has been going on with Gallio to integrate with VS2010. This work will be a feature of the next release, no beta yet but you are welcome to try ... [More] the nightly builds (all normal risks apply etc). Just like VS08 you can use the VS Test Runner to run Gallio tests (such as MbUnit) in the same way you can MSTest.

With Gallio installed the Test View window shows a Gallio (in this case MbUnit) test loaded (note the icon). If I go ahead and run this test I can see it working in the Test Results window.

In VS2010 you can collect additonal data that a test can include (system data, intellitrace data etc). If I set VS to collect system data and run the test I can click the 'Test run completed' link and see that it is included.

If I also right click in the Test Results window I can select "View Test Results Details" and a Gallio test results window will load up.

Note that Gallio treats the collector data as attachments so you can go ahead and view the attachment data right from the report. [Less]


MbUnit AssertEx

New month, new year, new decade and my first post (well not strictly speaking but I was getting complaints). I'm going to try and start posting more often this year and hopefully get back to posting about MbUnit again (I've even started contributing ... [More] again, more on that at a later date).
To kick things off I'm going to talk a little about a new feature in MbUnit v3, AssertEx. This assert makes use of lambda expressions to express your test, all you need is an additonal referance to the MbUnit35.dll. So rather than this.
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: Consolas, "Courier New", Courier, Monospace;
background-color: #ffffff;
/*white-space: pre;*/
}

.csharpcode pre { margin: 0em; }

.csharpcode .rem { color: #008000; }

.csharpcode .kwrd { color: #0000ff; }

.csharpcode .str { color: #006080; }

.csharpcode .op { color: #0000c0; }

.csharpcode .preproc { color: #cc6633; }

.csharpcode .asp { background-color: #ffff00; }

.csharpcode .html { color: #800000; }

.csharpcode .attr { color: #ff0000; }

.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}

.csharpcode .lnum { color: #606060; }

int value = numbers.Add(1,1);
AssertEx.AreEqual(2, value);
I can do this
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: Consolas, "Courier New", Courier, Monospace;
background-color: #ffffff;
/*white-space: pre;*/
}

.csharpcode pre { margin: 0em; }

.csharpcode .rem { color: #008000; }

.csharpcode .kwrd { color: #0000ff; }

.csharpcode .str { color: #006080; }

.csharpcode .op { color: #0000c0; }

.csharpcode .preproc { color: #cc6633; }

.csharpcode .asp { background-color: #ffff00; }

.csharpcode .html { color: #800000; }

.csharpcode .attr { color: #ff0000; }

.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}

.csharpcode .lnum { color: #606060; }

int value = numbers.Add(1,1);
AssertEx.That(() => value == 2);

I rather like how expressive this is, I could also do this.
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: Consolas, "Courier New", Courier, Monospace;
background-color: #ffffff;
/*white-space: pre;*/
}

.csharpcode pre { margin: 0em; }

.csharpcode .rem { color: #008000; }

.csharpcode .kwrd { color: #0000ff; }

.csharpcode .str { color: #006080; }

.csharpcode .op { color: #0000c0; }

.csharpcode .preproc { color: #cc6633; }

.csharpcode .asp { background-color: #ffff00; }

.csharpcode .html { color: #800000; }

.csharpcode .attr { color: #ff0000; }

.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}

.csharpcode .lnum { color: #606060; }

int value = numbers.Add(1,1);
AssertEx.That(() => value == 2 && value > 1);

Combine as many expressions for my data as I wish, if you prefer you can break it down.
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: Consolas, "Courier New", Courier, Monospace;
background-color: #ffffff;
/*white-space: pre;*/
}

.csharpcode pre { margin: 0em; }

.csharpcode .rem { color: #008000; }

.csharpcode .kwrd { color: #0000ff; }

.csharpcode .str { color: #006080; }

.csharpcode .op { color: #0000c0; }

.csharpcode .preproc { color: #cc6633; }

.csharpcode .asp { background-color: #ffff00; }

.csharpcode .html { color: #800000; }

.csharpcode .attr { color: #ff0000; }

.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}

.csharpcode .lnum { color: #606060; }

int value = numbers.Add(1,1);
Assert.Multiple(() =>
{
AssertEx.That(() => value == 2);
AssertEx.That(() => value > 1);
});
I recommend you explore AssertEx more. [Less]


Sharepoint and MbUnit

Do you use sharepoint or have any interest in using\testing your sharepoint applications with MbUnit, let me know?


MbUnit 3.1

Jeff and the team have announced MbUnit 3.1, this is another major release from the team with a great deal on offer. Rather than repost please see Jeffs announcement post as there is a great deal of new stuff to see.


CodeRush TestRunner

CodeRush have shown a preview of their new TestRunner with NUnit and MbUnit support right out of the box. Jeff and the Gallio team have done a lot of work with these kinds of test execution engines (Gallio supports the R# TestRunner for example) and hopefully the CodeRush guys will connect.


MbUnit 3 RTM

MbUnit 3 has been a long, long labour. It started around early fall of 2007 and under Jeff had grown and grown into todays final release. Along the way Gallio was born which as a Test Automation Platform this not only acts as the platform for ... [More] MbUnit 3.0 but is intended as a complete stand alone infrastructure for test frameworks and it offers a great deal of exciting possibilities.
Jeff has today announced v3.0.6 Update 1 when in fact MbUnit has been stable since v3.0.4, sure there are bugs and changes to make but consider v3.0.6 as final, in other words MbUnit v3 is RTM.
There are a great deal of reasons why you should consider upgrading to MbUnit 3.0 from MbUnit 2.*. MbUnit 3.0 was a ground up rewrite, everything from the framwork to the installer is all new code, we threw out v2 and started again and the result is very powerful framework that while lending a great deal to the work Peli and the MbUnit team did is great deal more powerful. Other than offering a vaster range in asserts (including lamba based asserts) and more powerful row, typefixture, factory and combinatorial pairwise based tests MbUnit now also offers features such as contract verifiers and parallel processing. Gallio provides MbUnit with the runner infrastructure and the list of supported runners is amazing, like MbUnit v2 you can still run MbUnit v3 in MSBuild, NAnt, TD.Net, CruiseControl, commandline (much more ehanched in v3) and GUI (also vastly enhanced in v3) but now tools such as TeamCity, VSTS, Resharper, Powershell, NCover, TypeMock and even AutoCAD. Finally MbUnit v3 supports the MS MVC framework just as v2 does.
 I am excited about MbUnt v3 and I do want to say a huge thank you to Jeff, Julian, Graham, Yann and the whole team for so all their hard work in making this happen.
  [Less]


MbUnit & VS10

MbUnit 3.0.5 has added support for Visual Studio 10, as before you can now run MbUnit tests direct from the VS test runner. Don't take my word for it though, check out this video from Karen Liu (lead PM on the C# and VB.NET IDEs). If you are playing with the VS10 CTP then you download the MbUnit support here.