mardi 25 octobre 2011 14:07Hello everyone.I am working with wwf approximated for 2 years now, and one of the tasks that i have to do is to test workflows. It is relativly easy to test them when all I have to do is to test workflow activities. I use something like this "http://msdn.microsoft.com/en-us/magazine/dd179724.aspx".but now I have a more difficult task, I need to ensure that a State machine workflow (a very big one) is working as expected. what i am doing so far is testing the workflow from the begining to end in one single unit test, but I realize now that this method is not correct, because when something wrong happens I have no idea where the problem ocurred. I need to be able to instanciate the workflow in a defined state and test just a single piece of the code in a single unit test. But I have no idea how to do this. can anyone help me please. do you have any example how I can instanciate a workflow in a state that i want and test just a part of it.My workflow is created with WCF, every event driven have a recieve activity that recieve the incoming messages and then change the WF state. I need to test those single steps not the entire workflow from beginig to end.Can enyone please help me. This is a critical part of my work. Thank you very much .
Toutes les réponses
vendredi 28 octobre 2011 09:47does anyone have any ideia please?
lundi 31 octobre 2011 11:56
I think you want to jump to a specifc state of your workflow and then do some testing. You can run StateMachineWorkflowInstance.SetState Method to transit to a specific state.
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
- Marqué comme réponse José Brazeta lundi 31 octobre 2011 14:20