Integration tests for Google App Engine (java)

后端 未结 2 1681
忘掉有多难
忘掉有多难 2021-02-08 05:09

I\'m trying to develop some effective integration tests for my GAE/j application. I\'m familiar with https://developers.google.com/appengine/docs/java/tools/localunittesting --

2条回答
  •  无人共我
    2021-02-08 05:52

    Basically, you need to do two things:

    1. Add two servlets (or whatever), which must be only enabled during testing, which allow you to invoke setup and teardown on the helper remotely.
    2. Make your servlet engine serve requests in a completely single-threaded way. This is needed because for some reason, the Helper class Google provides only takes effect in the current thread.

提交回复
热议问题