Hi Carlus,

there is quite a lot of "magic" happening in AbstractJpaTests.   You can
still use this functionality by embedding JBehave in your testing
framework (whatever this is).   An example of this can be found in the
TraderEmbedderWithSpringJUnit4ClassRunner in the examples/trader-spring
module.  The example shows the use of Spring's JUnit4ClassRunner but a
similar approach - explicitly creating and configuring the Embedder -
can be used with other testing setups.  In your case, you'd extend
AbstractJpaTests and create the Embedder instance in the onSetUp() method.

Cheers

On 02/01/2011 21:59, Carlus Henry wrote:
> Good afternoon,
>
> I am in the process of evaluating JBehave as our BDD testing
> framework.  I am really enjoying the features and functionality that
> it provides, however, I am a little puzzled about something and I am
> hoping that you would be able to help.
>
> Currently, most of our tests are using JUnit 3 and extends Spring's
> AbstractJpaTests, which rolls back transactions auto-"magically".
>  What I would like to do is create integration tests using JBehave and
> have anything that I do to the database rollback, after each scenario.
>  I had a discussion with some folks at work and we were coming up with
> all kinds of different ways of potentially making this work.
>  (Including using JUnit 4, and a combination of the following
> annotations @Transactional, @BeforeScenario, @AfterScenario).  I did
> try it, but it didn't quite work out.
>
> After scouring your mailing list and looking online, I did not find
> anything that was extremely helpful with this predicament.  This is a
> batch application and not a web application.  Any advice you can offer
> would be great.
>
> Thanks
> Carlus


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to