New Virtual Lab - Using Test First Development with WF 3.5

I'm very pleased to announce the publication of a new WF 3.5 hands-on lab to the MSDN Virtual Labs site: Using Test-First Development with WF.

The new lab covers doing test-first development in the Windows Workflow Foundation (WF) technology. The lab explains [at a high level] the concepts of test-first development, and walks the user through how to unit test both custom activities and full WF workflows.

Lab Screenshot

Unit testing and test-first development seems to become a very popular topic in the last year. The question of how to unit test WF activities/workflows has been something that I've heard asked about at the last few conferences I've attended (both internal and customer conferences; at the WF booth and advanced WF sessions), and it's been a question our field has been getting as well.

In answer to the question - there have been a couple excellent blog posts on the topic this past summer: Maurice de Beijer wrote an excellent (and concise) blog entry on the topic in June - which was the inspiration for the lab, and Ron Jacobs blogged on the topic following a conversation we were having about whether to do this HOL. And, most recently, WF unit testing was covered in the last two issues of MSDN Magazine (Matt Milner's Nov-2008 Foundations article and Josh Lane's Dec-2008 article 'Real World WF: Best Practices').

But the feedback has been what was lacking was a good, approachable manner of learning how to do WF unit testing. So we worked with David Starr, a trainer and consultant specializing in agile processes, to build a lab that attempted to demonstrate how a developer can use Visual Studio Team System and/or Professional to establish unit tests for WF activity and workflow development. The lab was written assuming basic experience with WF 3, but no prior experience with test-first development principles. To work with some of the less unit-test-ready aspects of WF 3.5, David walks the user through the use of fake objects and the Rhino Mocks mocking framework (there are a variety of mocking frameworks out there; Rhino Mocks is one of them).

As mentioned in the beginning of the blog post, in addition to hosting the lab in our hands-on-lab areas at TechEd this year, we have published the lab to MSDN Virtual Labs to enable a broader audience to experience the lab. For those unfamiliar, the Virtual Labs environment offers you a way to test drive Microsoft software without having to download or install the software on your local machine. To do the hands on lab, you visit the Virtual Lab website and it will provision you a pristine virtual server for you do the lab, which is [virtually] yours for a two-hour block. The connection to the server is done through the web browser, requiring only the installation of an ActiveX component. You can then follow the instructions in the lab manual to try out the lab and learn more about unit testing activities and workflows WF 3.5.

In addition to this WF lab, there are a couple other notable virtual labs I would like to point out:

We're working on delivering a few new WF hands on labs via this method over the coming months. We are working on a new hands-on-lab detailing conversation correlation in WCF workflow services (based on Matt Winkler's TechEd talks) and also updating the VS2005 hands-on-labs to VS2008, incorporating user feedback.

We are also in the process of posting the test-first development with WCF hands-on-lab. If you poke around in the C:\Labs directory of this virtual lab, you'll notice it's there (with lab manuals and relevant begin/end code).

I hope you enjoy the new lab; and, as always, your feedback is appreciated!

Cliff