I'm testing my Java/GWT/GAE based servlets. One of my servlets accesses the datastore (CRUD type methods) that would normally be called from the client over RPC.
The flow works like this: I launch testServlet1. If I'm not logged in, it generates the login url and returns this to the user. I click it. (now I'm logged in.)
testServlet1 runs, testing my DAO, and verifies the final database state.
testServlet2 now wants to add objects to the datastore using a different logged in user to ensure that there is no interference between user1 and user2.
My question is: how can I programmatically 'switch' logged in users from within a servlet without manually clicking the logout/login links, or automating this on the client side?
There doesn't seem to be an api for this.
Anyone doing this?
Thanks Rob