Don't make the tests transactional...that is more for unit
testing than
ATDD/BDD/functional testing.  I'll start with a clean database
(use
dbunit but only to wipe the data - or have hibernate/spring
startup
do that) but then let my tests actually hit the database.

Brian

----- Original message -----
From: "Sathish Kumar" <[email protected]>
To: [email protected]
Date: Sun, 27 Feb 2011 21:24:28 +0530
Subject: [jbehave-user] Test data setup considerations

Hi,
Are there any good practices for Test data setup with JBehave.
I tried the following approaches:
1. Use DbUnit to setup data and Run scenarios (Works perfectly)
2. Use builder/factory and Given methods to setup data
Ex: Given the store has book titled Spring which sells at 20 $
will internally use BookFactory to persist book and Then will
check the webapp.
I haven't had success in the 2nd approach due to Transactions not
being committed.
Do you have any suggestions on this?
Thanks,
Sathish
---
Brian Repko
LearnThinkCode, Inc.
http://www.learnthinkcode.com
email: [email protected]
phone: +1 612 229 6779

Reply via email to