Skip to main content

I would like to automatically test a workflow using NUNIT or the MS equivalent. Has anyone tried this?


 I can foresee some problem areas:



  • user roles
  • workflows that wait for time periods e.g 1 week

I imagine I would need to run Action.Execute(true) with sync set to true. If there are server events, how can I ensure they have completed before running the next client action?


Please add your 2 cents!


Macrel

Hi Macrel,


This is a very interesting topic, and I've had to deal quite a bit with NUnit testing of K2 workflows on previous projects, and often there is no easy straightforward way to do it, because it will depend so much on what your process looks like.


However I must say that for me the ideal use of Nunit is to try and focus the tests on smaller units of the workflow rather than testing the whole process in one shot. I would for instance write unit tests to test a specific activity's execution (especially if this is a server event that needs to execute some server code!), or complicated line rules.


As for the points you mention above - workflows that wait for a week, you could potentially test that the "start date" of your event is set to a week from now, rather than waiting for a full week to complete the test. Not sure what you mean with user roles, because I'm sure you can test if an item is assigned to the correct users...


Cheers,


Hi,

 

You can create automated unit tests similar to NUnit using Bluewave. It has a designer to set up your tests, and can even interface with dlls to create complex assertions on your tests.

 

http://www.archonbpm.com/Home/AutomatedProcessTesting


Reply