title: Android: How do I perform automated integration tests with a server secured by OAuth
body: <p>I'm building an android application which fetches some data from a server which in turn controls access by OAuth. (Xing in my case, could be Facebook or whatever without loss of generality). Builds are controlled by Jenkins and the maven-android-plugin.</p>
  
  <p>Proper integration testing of the application would require that I somehow pass the user credentials to the emulator under test. Assuming that I can put the credentials into the integration tester app at build time (<a href="https://stackoverflow.com/questions/14585228/how-can-secret-api-keys-be-used-while-using-public-build-servers">separate question about that</a> on stack overflow), how would I go about simulating the user typing and clicking in the web browser which will be launched during the OAuth authorization phase?</p>
  
  <p>Futher complicating the issue is that my own app (package com.mycompany.myapp) and the web brower used to enter the credentials (com.android.browser) share neither a common package not a signature, which seems to be required by Robotium ( see <a href="https://code.google.com/p/robotium/wiki/QuestionsAndAnswers" rel="nofollow noreferrer">https://code.google.com/p/robotium/wiki/QuestionsAndAnswers</a> , question about test case spanning two applications)</p>