What are some strategies for unit testing workflows in WF 4?

Over the past few years, I have worked a bit with WF development using 3.5, but now I am increasing WF in 4.0. My TDD is bent, and although WF 3.5 was difficult from time to time to unit test, I wonder if anyone can share their strategy for unit testing processes in WF 4 and / or point me to resources that will help me get started?

+4
source share
2 answers

The simplest approach - as in WF35 - is to separate the implementation from the activity so that they can be checked independently of each other. Expanding activity is just a regular class, so use whatever is convenient for you. Most actions can be easily tested with WorklfowInvoker.

+5
source

I totally agree with Maurice in testing independently. For workflow services for module testing, there is now Microsoft.Activities.UnitTesting . Download from the CodePlex page .

+4
source

Source: https://habr.com/ru/post/1314342/


All Articles