DNN Blog

Feb 22

Posted by: Philip Beadle
Monday, February 22, 2010 11:10 AM  RssIcon

The Automation Test Project is well and truly underway now.  You can check out the progress we are making and the suite of tests that have been written to help with the Build Verification that now happens on every release here http://dotnetnukeautomation.codeplex.com/.  These tests test a set of scenarios that we need to ensure work every release, hence they get executed on a very regular basis which is tedious if you have to do it manually every time.  If you check out the project you will see there are a number of installation scenarios, user management scenarios and page management scenarios.  We are continuously adding more tests each release so that eventually the whole of DNN (as much as possible anyway) will have a set of automation tests running on it.

The tests are written with the idea that we would like the community to be able to contribute their own tests to the project.  With that in mind the frameworks we chose to use in the testing project are free and able to be used with any version of Visual Studio.

Watin

There are several well known was to automate the testing of a web site via the actual web page.  Watin is one of the most popular and also fits into the DNN philosophy of using free and open source products where ever we can.  Watin is used to automate the clicking of buttons, filling in of text boxes etc so that the test simulates how a person interacting with the site.  When you run the tests an instance of IE is opened and you can watch as the various UI elements are clicked and filled out.  Watin is a mature product and there is lots of information on the internet to help test writers write the tests they need.  We also have the privilege of having Jeroen van Menen on the automation test team, Jeroen is the developer and main guy for Watin.  This means that we get top notch help from Jeroen when we need some insight into how best to setup our testing projects and how to test particular elements of DNN.

MBUNit

Although Visual Studio comes with the MSTest framework built in, it is not available in all versions of Visual Studio and hence this may stop some of our community members from being able to run the tests and also contribute tests to the project.   The testing framework we have chosen is MBUnit whica ccording to Scott Hanselman is “Unit testing on crack”. MBUnit is also a free product that you can get hold of from www.mbunit.com.  The other part you need when running tests like this is to have a test runner, MBUnit comes with the Gallio test runner so even if you have Visual Studio Express you can easily run the tests and get great reports from Gallio. 

image

Gallio Icarus Test Runner with Build Verification Tests loaded.

If you have one the higher specced SKU’s of Visual Studio you can use the built in Test Runner and use the Test List Editor to manage which test are run in any particular session.

image

Test List Editor with Build Verification Tests loaded.

 

Gallio and MBUnit also have a ReSharper plugin so you can run the tests directly from the code window or you can create a test session and run them from there.

image

ReSharper test runner markings.

image

ReSharper Test Sessions

Please check out the project on CodePlex and start writing your own tests.  If you write a test please send it in so we can incorporate it into the project and gain more coverage of DNN.

Tags:
Categories:
Location: Blogs Parent Separator Philip Beadle

2 comment(s) so far...


Gravatar

Re: Automation Testing of the Core - Frameworks

Hi,

Quick question: Did you consider nUnit? If so, what's your rationale for going with MBUnit instead? Was it something about MBUnit itself, about how it fits in with other tools, or any other considerations?

(BTW, I'm not looking to attract or stir controversies over the choice - I just want to understand the rationale, because I find it quite helpful to hear the thought processes of others.)

By Daniel Gilleland on   Saturday, February 27, 2010 6:51 PM
Gravatar

Re: Automation Testing of the Core - Frameworks

They're all pretty much the same. We chaose MBUnit because its free, well maintained, you can use it in any version of VS with the Gallio test runner, it has nice video capture features and we have people on the team familiar with it.

By Philip Beadle on   Saturday, February 27, 2010 6:45 PM
Attend A Webinar
Free Demo Site
Download DotNetNuke Professional Edition Trial
Have Someone Contact Me

Like Us on Facebook Join our Network on LinkedIn Follow DNN Corporate on Twitter Follow DNN on Twitter

Advertisers

Sponsors

DotNetNuke Corporation

DotNetNuke Corp. is the steward of the DotNetNuke open source project, the most widely adopted Web Content Management Platform for building web sites and web applications on Microsoft .NET. Organizations use DotNetNuke to quickly develop and deploy interactive and dynamic web sites, intranets, extranets and web applications. The DotNetNuke platform is available in a free Community and subscription-based Professional and Enterprise Editions with an Elite Support option. DotNetNuke Corp. also operates the DotNetNuke Store where users purchase third party apps for the platform.