title: Integration tests for single sign-on pages
body: <p>How do you test pages with single sign-on (SSO) login during <a href="http://en.wikipedia.org/wiki/Integration_testing" rel="nofollow">integration tests</a> (for instance by using caybara or cucumber)? For a normal login, you would write a method which visits the login page, fills out the form, and submits it. This is a bit difficult if the login form comes from an external SSO server like Shibboleth or OpenAM/OpenSSO. How is it possible to write integration tests for pages protected by SSO?</p>
  
  <p>A similar problem is integration testing with a separate search server (Solr or Sphinx). You would probably solve it by using some form of mocks or stubs. Can someone give a good example how to mock or stub a SSO for cucumber or capybara? If this is too difficult, then a comparable example for a search server would be helpful, too.</p>