2 Replies Latest reply on Mar 31, 2011 4:57 AM by salaboy21

    Unit testing JBPM processes

    valgoerad

      Could someone point me to any resource explaining how to properly unit test JBPM 5 processes?

       

      I'm looking for info on how to test a process, on JBPM5 provided helper classes, how to mock/stub custom service tasks, how to test script tasks, etc.

        • 1. Unit testing JBPM processes
          cheetah100

          We have been using our own message system which delivers messages onto queues. When under test we could replace this message delivery system with a mock delivery system. However, now I'm looking at moving to use the ESB Service Node to call services and have run into the same issue; that is you can't test the process in absence of the live ESB services.

           

          I would like to find a way to test a process without calling live services.

          • 2. Unit testing JBPM processes
            salaboy21

            Hi, in jBPM5 you have the concept of work item. Using that you can provide different implementations of your services that can run in different environments. Creating a workitemHandler that mock your services and another one that do the real thing, will help you to test your business processes without changeing them when you need to test them.

            I was creating a simple project to be able to easily test processes, but I think that kris will probably do something similar and include it in the master repository for the next version. Take a look at:

            https://github.com/Salaboy/JBPM5-Test-Framework

            Greetings.