This was the first full RTM release in about 9 months, an unfortunate side-effect of our busy schedules. :) The major new feature of 1.5 is the new GUI runner, which has evolved over several CTP and beta builds.
Here is a screenshot of the new GUI runner in 1.5:
If you're used to using the GUI runners in other testing tools, you'll notice that our GUI runner is significantly different. Rather than the traditional "tree" view, we've opted for a flat, integrated list of tests (the large box in the upper right of the window). Whatever is visible in this list will be run if you click "Run All"; you can also select specific tests, which turns the button into "Run Selected".
These test methods can be filtered in several ways, using the Refinements section on the left:
- The search box will search and filter methods whose method name, namespace name, or display name match the provided text
- The assemblies list allows you to filter down to just the tests in one or more of your selected assemblies
- The traits list shows all the [Trait] attribute name/value combinations in your tests.
- The count buttons at the top of the method list also work as filters, so you can quickly just see the tests that have passed, failed, or were skipped.
Assemblies are not locked, so you can leave the GUI runner open while working on your test code, and when test assemblies are recompiled, the GUI will automatically reload the DLL. Tests are run on a background thread so that the UI remains responsive while running tests.
There are lots of other small new features, plus a bunch of bug fixes, which we cover in the release notes (shown below):
xUnit.net release 1.5Build #1479
Change set #42400
Important notes for Resharper users:
Resharper support has been moved to the xUnit.net Contrib project.
Important note for TestDriven.net users:
If you are having issues running xUnit.net tests in TestDriven.net, especially on 64-bit Windows, we strongly recommend you upgrade to TD.NET version 2.20 or later. It is also important to uninstall and reinstall TD.NET support using xunit.installer.exe.
This release adds the following new features:
- Better support for 64-bit machines, including forced 32-bit runners
- Introduced a new GUI runner, which allows:
- Multiple assemblies
- Filters on text, assembly, traits, and last run state
- Project (.xunit) files
- Multithreaded UI so that tests aren't slowed down by UI updates
- Assemblies are not locked and are automatically reloaded so that you can continue to work on your tests in Visual Studio while leaving the GUI runner running
- Automatically remembers UI window placement and recent assemblies/projects
- Additional MSBuild task which consumes project (.xunit) files
- Support for MVC 1.0 and MVC 2 Preview 1, including both C# and VB.NET
- A new test runner object model for runner authors (supporting multiple assemblies)
- IEnumerable/IEnumerable<T> support for Assert.Equal
- Better support for Assert.Throws for expressions which return values
- Support for installation-free running with TestDriven.net (2.23 or later)
- Added an output property named ExitCode to the MSBuild runner (0=success, -1=fail)
- Expected/actual messages are improved when values are the same but types don't match
- Fixed an issue where assemblies without config files run from MSBuild were using MSBuild.exe.config as their config file.
- Fixed several broken samples.
- Fixed an issue where long-running tests would be aborted in the console runner.
- Fixed an issue with CDATA handling in test results.
This release includes:
- Core library (xunit.dll)
- Support for ASP.NET MVC 1.0 and 2.0 Preview 1
- Support for CruiseControl.net (see the wiki for more information)
- Support for TeamCity (see the wiki for more information)
- Version-resilient runner support (xunit.runner.utility.dll)
- Installer utility for runners and ASP.NET MVC (xunit.installer.exe)
- Console runner (xunit.console.exe and xunit.console.x86.exe)
- GUI runner (xunit.gui.exe and xunit.gui.x86.exe)
- MSBuild runner (xunit.runner.msbuild.dll)
- TestDriven.net 2.x runner (xunit.runner.tdnet.dll) see note above
- Extensions for .NET 2.0+ (xunit.extensions.dll):
- Data theories using [Theory] with support for data from inline values, properties, Excel spreadsheets, SQL Server, and OLE DB data sources
- [AssumeIdentity] extension
- [AutoRollback] extension
- [FreezeClock] extension
- [Trace] extension
- TestClass and Assertions base class for assertion extensibility