How to unit test the windows workflows?
-
1Please specify your question and give an example, as it seems too broad right now. What are you looking for exactly? – Kena Oct 8 '08 at 13:41
-
See similar question already asked: > Unit/Automated Testing in a workflow > system – Ray Oct 22 '08 at 16:44
-
I think Workflow activities are relatively testable. Here's an entry from my blog about unit testing Workflow activities: unit-testing.net/CurrentArticle/… – T123 Mar 6 '12 at 5:30
K. Scott Allen has posted this, which provides an approach to unit testing custom activities (although he says that he is not satisfied). A similar approach is presented by Ron Jacobs here and here.
Another approach is presented by Maurice here and here (he uses TypeMock as Will already mentioned).
-
The Ron Jacobs articles are very promising, especially the second one which contains a sample solution showing how to wire-up the WWF runtime to host the unit tests. – Tim Long Aug 27 '10 at 3:12
Microsoft.Activities.UnitTesting.
A library of helper classes and activities designed to make unit testing of workflows easier.
Looks like there's a Channel 9 video for it on the downloads page, too.
-
@jlafay Have you found it possible to test the value of a variable in a workflow service? Please look at this post and let me know what you think. – Mike Perrenoud Mar 13 '12 at 14:51
MS dropped the ball on making workflows easily mockable and testable. If you want to do thorough tests on your custom activities you'll need to purchase a mocking framework that can mock sealed types such as TypeMock. Otherwise, you'll have to write your code around the limitations of Workflow.