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.
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.
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.
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.
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.
ReSharper test runner markings.
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.