2

how do i create integration tests that use the services (requestfactory) and also the JDO-persistancemanager to save and retrieve data.

the GWTTestCase + requestfactory is working just fine. normal JUnitTests also work with the database but are testing just the serverside (with LocalServiceTestHelper)

i tried using the LocalServiceTestHelper also in the GWTTestCase but the compiler can't import the code:

   [ERROR] Line 3: The import com.google.appengine.tools.development cannot be resolved
   [ERROR] Line 15: LocalServiceTestHelper cannot be resolved to a type

however, the libs appengine-api-labs.jar appengine-api-stubs.jar appengine-api.jar appengine-testing.jar are in the classpath! if i am not using the LocalServiceTestHelper i am getting the "java.lang.NullPointerException: No API environment is registered for this thread".

java.lang.NullPointerException: No API environment is registered for this thread.
com.google.appengine.api.datastore.DatastoreApiHelper.getCurrentAppId(DatastoreApiHelper.java:80)
com.google.appengine.api.datastore.DatastoreApiHelper.getCurrentAppIdNamespace(DatastoreApiHelper.java:90)
com.google.appengine.api.datastore.Key.<init>(Key.java:97)
com.google.appengine.api.datastore.Key.<init>(Key.java:87)
com.google.appengine.api.datastore.KeyFactory.createKey(KeyFactory.java:84)

i was looking for a solution about 3 heuers but i can't find anything

thanks for your help!

headgrowe
  • 529
  • 1
  • 5
  • 17

0 Answers0