On 30 Jul 2010, at 07:09, Sydney wrote:
I have a question that seems trivial but I can't figure out how to do
it. I would like to be able to test my application but with persistent
data. So I need to create a local environment to store the data. I
read the documentation about unit testing but the default behavior is
to store the data in memory and then wipe out everything. Is there a
way to have an environment where the data would be persistent on the
disk. I don't know if it matters but I am using twig-persist to deal
with the datastore.
private LocalServiceTestHelper helper =
new LocalServiceTestHelper(new
LocalDatastoreServiceTestConfig().setBackingStoreLocation(DS_PATH));
You could copy the WEB-INF/appegine-generated/local_db.bin file with
your data next to your test case and in a @Before method, delete the
old copy and copy a new one to DS_PATH. You might also want to check
out LocalDatastoreServiceTestConfig().setNoStrage(true)
--
You received this message because you are subscribed to the Google Groups "Google
App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine-java?hl=en.