SpecsFor.Mvc 2.0 is out today.  This release includes drastically improved performance, support for Chrome, and support for the very latest versions of Selenium, ASP.NET MVC, and other libraries.

[more]

This is not what I had originally planned for the SpecsFor.Mvc 2.0 release.  I had originally planned to have more performance improvements as well as a flexible system for specify conventions.  Unfortunately several things have forced me to make breaking changes sooner rather than later.  First was the release of ASP.NET MVC 4.0.  There were a few changes there that were causing assembly version conflicts for new projects that tried to install the SpecsFor.Mvc package.  Second and more importantly though are the changes that have recently been made to Selenium WebDriver. 

Selenium is moving towards a model where the core of WebDriver no longer includes the actual web drivers.  Instead, they’re counting on browser vendors to supply their own web drivers.  This means that, out of the box, SpecsFor.Mvc 1.4 no longer included everything you needed to write awesome end-to-end tests.  Because installing SpecsFor.Mvc fresh grabs the latest version of Selenium WebDriver, new projects don’t have the necessary web driver servers to actually execute the tests.  You had to go out and download the web driver server for Internet Explorer separately.

I thought long and hard about how to handle this.  I don’t like the idea of bundling anything directly within the SpecsFor.Mvc package except for the core components of SpecsFor.Mvc itself.  However, the goal of the project is to make it super-easy to start writing end-to-end tests, and having people manually go and install the web driver servers just doesn’t fit that goal.  So, SpecsFor.Mvc 2.0 comes with two web driver server executables in the package: one for Internet Explorer (32-bit) and one for Google Chrome (yes, Chrome is now supported).  Firefox is still baked in to Selenium Web Driver directly for the time being.  That means you can use any of the three major browsers for your tests.

I also made some potentially breaking changes concerning how the web drivers are used.  Because the web drivers are now separate executables, it is substantially more expensive to create/recreate one.  SpecsFor.Mvc 1.4 destroyed and recreated the driver between every test, but that approach just doesn’t work with the new Selenium WebDriver model.  SpecsFor.Mvc 2.0 therefore reuses the same browser window for all tests.  This may lead to some unforeseen issues.  Testing locally with some of my projects didn’t uncover anything, but still, this was a big enough change that it warranted the bump to “2.0” in my mind.  One nice thing about this change is that has a tremendous impact on speed.  It used to take 3-4 minutes to run approximately 100 end-to-end tests for one of my mobile apps.  With SpecsFor.Mvc 2.0 and Chrome, that same suite of tests completes in approximately 90 seconds.

I may move the web drivers out of SpecsFor.Mvc in the next version.  I’m strongly considering putting them in their own NuGet packages that can be pulled in separately.  This will make it possible to version the various pieces separately, which will cut down on the size of the NuGet package.

The SpecsFor package also received a minor upgrade to 2.7 tonight.  This upgrade does not include any new features, but it was rebuilt against the latest versions of its various dependencies, which should make it easier to pick up and use on new projects.

If you encounter issues with either upgrade, please let me know!