none
Forefront 2010 and unit tests RRS feed

  • Question

  • Hi,

    Are there any guidelines how to unit tests FIM workflows? Also FIM custom activities?

    Best regards

        Rafal Grzybowski

    Tuesday, November 13, 2012 1:37 PM

Answers

  • I haven't seen any official guidelines.

    I guess you should follow generic samples for verifying your code. For testing, I usually have a unique set and MPR combination that triggers the workflow - and also try to make sure that it triggers several instances of the workflow at the same time to check behaviour on concurrency which is likely to happen in the FIM Service.


    Regards, Soren Granfeldt
    blog is at http://blog.goverco.com | twitter at https://twitter.com/#!/MrGranfeldt

    Friday, November 16, 2012 3:28 PM
  • I think that in general there is no guidelines for unit testing for any of a products. It is just how you are using unit testing in your development cycle and what is your development team doing in this area.

    For example we have at Predica our own set of practices for unit testing of synchronization engine code and FIM service code and it works for us :). Other part is testing of your code in a context of configuration - here Soren has already provided some answer but also it can be automated and put in a "unit test" framework with some effort,


    Tomek Onyszko, memberOf Predica FIM Team (http://www.predica.pl), IdAM knowledge provider @ http://blog.predica.pl


    Saturday, December 29, 2012 10:56 PM

All replies

  • I haven't seen any official guidelines.

    I guess you should follow generic samples for verifying your code. For testing, I usually have a unique set and MPR combination that triggers the workflow - and also try to make sure that it triggers several instances of the workflow at the same time to check behaviour on concurrency which is likely to happen in the FIM Service.


    Regards, Soren Granfeldt
    blog is at http://blog.goverco.com | twitter at https://twitter.com/#!/MrGranfeldt

    Friday, November 16, 2012 3:28 PM
  • I think that in general there is no guidelines for unit testing for any of a products. It is just how you are using unit testing in your development cycle and what is your development team doing in this area.

    For example we have at Predica our own set of practices for unit testing of synchronization engine code and FIM service code and it works for us :). Other part is testing of your code in a context of configuration - here Soren has already provided some answer but also it can be automated and put in a "unit test" framework with some effort,


    Tomek Onyszko, memberOf Predica FIM Team (http://www.predica.pl), IdAM knowledge provider @ http://blog.predica.pl


    Saturday, December 29, 2012 10:56 PM
  • I think that in general there is no guidelines for unit testing for any of a products. It is just how you are using unit testing in your development cycle and what is your development team doing in this area.

    For example we have at Predica our own set of practices for unit testing of synchronization engine code and FIM service code and it works for us :). Other part is testing of your code in a context of configuration - here Soren has already provided some answer but also it can be automated and put in a "unit test" framework with some effort,


    Tomek Onyszko, memberOf Predica FIM Team (http://www.predica.pl), IdAM knowledge provider @ http://blog.predica.pl


    I cannot find any solution for clean unit testing of FIM workflows.

    It's too tightly coupled to workflow designer or workflow runtime. The latter cannot be customized.

    Using .NET reflction I could try to put my hands on FIM services registered within workflow runtime and use it directly instead of FIM workflow activities but it will be risky, unsupported way to use FIM API.

    Also I could use public FIM web services but I'm not sure whether mixing workflow services with this won't introduce problems: different results obtained depending on which service was used.

    Anyway, I will probably endup with a kind of integration tests not plain unit tests.

    Thank you and best regards.

        Rafal Grzybowski


    Sunday, December 30, 2012 11:57 AM