1 Reply Latest reply on Sep 6, 2007 8:58 AM by tom.baeyens

    Persistable version of PVM unit test...

      I have been discussing with Guillaume about how PVM unit tests suite could be executed with or without persistence.

      I agree that we can use commands for that. In this case, each unit test could be replaced by a number of commands calls (commands would associated with transactions in a persistence environment).

      The drawnback of this approach is that unit test will not be readable anymore :-)

      So, I would prefer to simply add try/finally blocks in PVM unit tests. Each try/finally block will be associated to one transaction in a persistence environment.
      Like with commands, a unit test could contain one or more try/finally block: i.e one for the process definition, another one when the Execution is created and a third one for a signal operation.

      Persistence service implementation would be injected into the environment before launching the test suite. In the case that no persistence is required we will probably require an in memory implementation of the PersistenceService interface.

      Just to write down ideas...

      regards,
      Miguel Valdes

        • 1. Re: Persistable version of PVM unit test...
          tom.baeyens

          i think we are in agreement. to summarize:

          the problem:

          we want the functional features (almost all of the process execution testing) to be tested in persistent as well as non persistent mode. non persistent mode is good for development of the feature. and it's also something we want to support.

          the problem is that we want to avoid duplication of tests as much as possible if it is just doing the same thing except for persistence.

          the solution:
          ... is not really clear and needs further experience. we have some alternatives. we have to gain and share experiences on which tests should be developed like that and which not. and how the overall test suites will include the different kinds of tests.