[Update: See the follow up post “Significant Advances in Unit Testing Windows Workflow”]
If you’ve been working with Windows Workflow, you’ll find it has some cool features for orchestration, long running operations, state machines, etc.
However you won’t find very much support for Test Driven Development (TDD) or unit testing in general. In fact the architecture that makes Windows Workflow powerful (strict separation of workflow, activities, and the host for example) really gets in the way of unit tests.
There has been some work done on unit testing Windows Workflows. Here’s some links:
- Unit Testing Activities with Windows Workflow Foundation by Ron Jacobs
- TDD and Windows Workflow Foundation by Ron Jacobs
- WF – Unit Testing: Simple approach to Activity testing and improving the XOML loader by Andreas Erben
- Unit Testing Workflow Activities by K. Scott Allen
These are all very creative solutions. But, personally I find all of them more complex than they need to be. So in the near future I’ll be putting together some libraries and samples on unit testing Windows Workflow. I think you’ll find them far more powerful and at the same time simpler than anything out there.
So until I get that finished, if you have any feedback or considerations on unit testing Windows Workflow I’d love to hear it. If there are other articles I’m missing, please post them in the comments.
I think you’re going to like this…