[jbpm-dev] Persistence "test framework"

Marco Rietveld mrietvel at redhat.com
Thu Dec 1 08:26:45 EST 2011


Hi Mauricio,

Ahh.. I was wondering what that branch was for!

I haven't looked at your code, but there are two things that are 
important to me

1. is being able to test with different databases by simply changing an 
XML (or properties) file -- and not having to touch the code at all.

The reason this is important is because of test automation -- I already 
have a jenkins job setup that runs all jbpm tests against different db's 
and would like to keep that functionality.

2. is being to be able to proxy the entityManagerFactory and 
userTransaction -- by being hooking into the operations that those 
objects execute, I can save the persisted data for later comparison 
(backwards compatibilty).

I've already written the invocationHandler/proxy objects, I just need 
someplace (annotation handler?) where I can insert those based on a 
property or flag (yes/no test backwards compatibilty).


I'll make sure to look at the code and send feedback!

Thanks,
Marco

12/01/2011 02:00 PM, Mauricio Salatino:
> Hi Marco,
> I'm working with another community guy in a jBPM5 testing framework,
> can you check that code and see how we can merge your ideas with ours?
>
> https://github.com/droolsjbpm/jbpm/tree/testing-framework/jbpm-testing-framework
>
> This testing framework is getting really powerful and we are expecting
> to get it ready to merge in the next couple of weeks if everyone is ok
> with it.
>
> Right now the testing framework support the configuration of
> persistence via Annotations what we think that is good and easy to
> use, we definitely need support for multiple DBs as you mention and
> having those features to test backward and forward compatibility
> sounds great as well.
>
> Check the following tests:
> https://github.com/droolsjbpm/jbpm/blob/testing-framework/jbpm-testing-framework/src/test/java/org/jbpm/test/JbpmJUnitRunnerTest.java
>
> Please let us know what you think.
>
> Cheers
>
> On Thu, Dec 1, 2011 at 9:49 AM, Marco Rietveld<mrietvel at redhat.com>  wrote:
>> Hi all,
>>
>> During the past couple months, I've ended up creating a "persistence" test
>> framework in order to do 2 things:
>> 1. be able to run tests on other db's (oracle, db2, postgresql)
>> 2. test the backwards/forwards compatibility of the data jBPM/Drools writes
>> to the database
>>
>> All of this code has now been moved to the drools-persistence-jpa jar, in
>> the org.drools.persistence.util and org.drools.marshalling.util packages.
>> It's been moved there so that I can include the test-jar in places where
>> adding the jbpm-persistence-jpa dependency would cause a problem, and also
>> because I end up using it in drools tests as well (DRY.. ).
>>
>> But I can very easily imagine that people setting up tests just want to set
>> the test up, and not also deal with some complicated "hobby" util that
>> someone else wrote, so to speak. On the other hand, in the course of testing
>> and solving database and marshalling bugs, I end up converting lots of tests
>> to use the framework so that I can do 1. and 2. (above).
>>
>> To that end:
>>
>> - If you have any tips, wishes or ideas about how you would like a
>> persistence test util to work, please share them!
>>
>>
>> The more tests that use both, the easier it is for me (us?) to catch bugs
>> and fix them.
>>
>>
>> Thanks!
>> Marco
>>
>> --
>> jBPM/Drools developer
>> Utrecht, the Netherlands
>>
>>
>> _______________________________________________
>> jbpm-dev mailing list
>> jbpm-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/jbpm-dev
>>
>
>


-- 
jBPM/Drools developer
Utrecht, the Netherlands



More information about the jbpm-dev mailing list