In my last post I discussed unit testing code activities. Now that we’ve verified our custom activities behave the way we want we need to test the workflow as a whole to ensure they work together correctly. This is called integration testing. This is especially important for WF as much of the logic may be encompassed in out of the box activities and thus not have unit tests around them.
The best part is we test workflows just like code activities!
In our test init we will setup our base mock object.
Next, in our “Because” method we will wire up the call to our Workflow.
Finally, we write our test.
This is great for workflows that need to conform to a certain behavior and you want to test to verify it or the integration tests can serve as validation for user updatable workflows to ensure that any specific requirements are still maintained.
You can see this test in action in a sample project available on GitHub.