"Alexandre Martins" <[EMAIL PROTECTED]> wrote on 11/06/2007 22:58:35:
> Hi everybody,
> in one of my projects that I use JBehave I had to find a way to write
> integration tests,
> so I decided to make it using an in memory database, created through
> Spring configuration.
> I wanted to integrate it with JBehave, in a way that, for each
> behaviour, the container should be assembled first,
> so that I could use any of its beans. For example:
>
> public class FooBehaviour() extends UsingSpringContext {
Hi Alex,
It's great that you're mixing Spring and JBehave; I've tried to do that
here but my understanding of Spring is limited (and limiting); please
correct or question if what I'm saying doesn't make sense.
Here we also have lower-level tests for database interaction. We have
described how Hibernate and our domain objects should interact, to help us
design our Hibernate configurations and check that they're correct (and
they do feel more like tests than descriptions of behaviour, to be honest,
probably because we're just checking our understanding of Hibernate's
magic). So maybe a UsingSpringContext would be useful. Can anyone with
more experience help decide?
What I would really like to see is something like a SpringWorld, which
lets us use Spring at a Story level. I think I would use that much more
than at a unit level, since we don't really need the full application
context just to set up a database. Are you using the Story framework with
Spring at all?
Cheers,
Liz.
--
Elizabeth Keogh
[EMAIL PROTECTED]
http://sirenian.livejournal.com
http://jbehave.org