I've done quite a bit of WF development using 3.5 over the last few years, but am just now ramping up on WF in 4.0. I have a TDD bent, and while WF 3.5 was difficult at times to unit test, I'm wondering if anyone could share their strategy for unit testing workflows in WF 4 and/or point me to resources that would help get me started?
The easiest approach is, just like in WF35, to separate the implementation from the activity so they can be tested independently of each other. The activity extension is just a regular class so use whatever you are comfortable with. Most activities can be unit tested quite easily using the WorklfowInvoker.
I completely agree with Maurice on testing activities independently. For unit testing workflow services, there is now Microsoft.Activities.UnitTesting. Download from the CodePlex page.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With