Integration testing is the phase in software testing in which individual software modules are combined and tested as a group. It occurs after unit testing and before validation testing.

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.

Blake Helms

Blake Helms is a .NET Software Development Manager for EBSCO Industries, a global company with businesses in a range of industries including Information Services, Publishing and Digital Media, Outdoor Products, Real Estate, Manufacturing and Distribution, and Business Services, headquartered in Birmingham, Alabama.

There he is responsible for several core business applications and has been a driver for software craftsmanship and creating a culture that promotes mentorship and continuous improvement.

He is also the cofounder of the Birmingham .NET Meetup with a mission to promote good development practices and .NET technologies in the Birmingham, Alabama area.

Blake is incredibly passionate about technology in all areas from writing code for work, to audio/video production for his church to automating his home.