You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by Rahul Thakur <ra...@gmail.com> on 2007/11/21 03:48:26 UTC

ORM/data store testing

Hi,

I am trying to find some OpenJPA documentation on unit testing a Data
Store implmentation. Specifically looking for pointers to docs (if
any) which demonstrate if there is a test framework available that I
can use and which takes care of some boiler plate stuff (parsing
persistence.xml/orm.xml, creating EntityManager etc).

Appreciate any pointers.

Thanks,

Rahul

Re: ORM/data store testing

Posted by Rahul Thakur <ra...@gmail.com>.
Thanks for the pointers, Patrick!

A separate module for tests (openjpa-persistence-tests - like you say)
would be great! It would help to cleanly specify a 'test' scoped
dependency for a given maven project. I think currently those sources
are not published with OpenJPA distros so I will just pull them into
my project to get started :-)

Cheers,

Rahul



On Nov 21, 2007 4:37 PM, Patrick Linskey <pl...@gmail.com> wrote:
> Hi,
>
> If you extend AbstractStoreManager (or implement StoreManager in any
> way, really), OpenJPA will take care of all the standard non-JDBC
> parsing, creating of EMs, etc.
>
> There is a very small set of test cases in the openjpa-xmlstore
> module, which includes a very basic example of how to extend
> AbstractStoreManager.
>
> Many of the rest of our tests also would run against a non-JDBC store.
> However, right now, most of them are packaged in
> openjpa-persistence-jdbc, to facilitate integration with mvn's way of
> doing testing. It would probably be possible to set something up in
> mvn to have a separate downstream openjpa-persistence-tests module or
> something that somehow dynamically includes the right upstream module
> based on some setting.
>
> -Patrick
>
>
> On Nov 20, 2007 6:48 PM, Rahul Thakur <ra...@gmail.com> wrote:
> > Hi,
> >
> > I am trying to find some OpenJPA documentation on unit testing a Data
> > Store implmentation. Specifically looking for pointers to docs (if
> > any) which demonstrate if there is a test framework available that I
> > can use and which takes care of some boiler plate stuff (parsing
> > persistence.xml/orm.xml, creating EntityManager etc).
> >
> > Appreciate any pointers.
> >
> > Thanks,
> >
> > Rahul
> >
>
>
>
> --
> Patrick Linskey
> 202 669 5907
>

Re: ORM/data store testing

Posted by Patrick Linskey <pl...@gmail.com>.
Hi,

If you extend AbstractStoreManager (or implement StoreManager in any
way, really), OpenJPA will take care of all the standard non-JDBC
parsing, creating of EMs, etc.

There is a very small set of test cases in the openjpa-xmlstore
module, which includes a very basic example of how to extend
AbstractStoreManager.

Many of the rest of our tests also would run against a non-JDBC store.
However, right now, most of them are packaged in
openjpa-persistence-jdbc, to facilitate integration with mvn's way of
doing testing. It would probably be possible to set something up in
mvn to have a separate downstream openjpa-persistence-tests module or
something that somehow dynamically includes the right upstream module
based on some setting.

-Patrick

On Nov 20, 2007 6:48 PM, Rahul Thakur <ra...@gmail.com> wrote:
> Hi,
>
> I am trying to find some OpenJPA documentation on unit testing a Data
> Store implmentation. Specifically looking for pointers to docs (if
> any) which demonstrate if there is a test framework available that I
> can use and which takes care of some boiler plate stuff (parsing
> persistence.xml/orm.xml, creating EntityManager etc).
>
> Appreciate any pointers.
>
> Thanks,
>
> Rahul
>



-- 
Patrick Linskey
202 669 5907