Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


The purpose of the java-idp-integration-tests project is to test the IdP using Selenium. Only a handful of profile flows are currently tested.

The IdP is run in a java.lang.Process to separate it from the tests themselves. Consequently, the testbed is used to provide a mock SP as well as storage interface to validate tests.

Maven is used to :

  • retrieve and unpack the Jetty (jetty-distribution) and IdP (idp-distribution) artifacts

  • retrieve and deploy the testbed webapp

  • add test credentials, flows, metadata, and views from idp-conf to the IdP

resulting This results in a test-distributions directory containing Jetty and the IdP + testbed.

Each test class instance (of the abstract test class BaseIntegrationTest) creates an idp.home directory. This per-test-class idp.home directory is usually customized by test classes or instances using Java, and is deleted if all tests are successful. Helper methods are provided in the abstract test class to customize idp.home by copying or modifying configuration files, etc. Each test class instance runs the IdP + testbed on separate ports so that tests may be run in parallel, this may be disabled during development.


Test methods may test SAML profiles by validating assertions displayed by the browser via the testbed's mock SP. The same SAML validators are used in browser tests (java-idp-integration-tests) as well as flow tests (idp-conf).


Source Code

Checkout the java-idp-integration-tests project. See Git Repository Access for details.

git clone

cd javacd java-idp-integration-tests

Initial Maven Build


Build using Maven from the command line, not Eclipse.


At this point the java-idp-integration-tests directory should contain a test-distributions directory containing the IdP and Jetty distributions. You should be able to run tests via Maven from the command line or import the project into Eclipse and run them using the TestNG plugin.

Sauce Labs Authentication

To run remote tests on Sauce Labs, an account is required.

Populate the ~/.sauce-ondemand file with your username and access key. For example


Code Block
username = myname-shibboleth
key = 789z... 

Run Tests

Tests may be run from Maven on the command line or via Eclipse and the TestNG plugin.


The Maven POM of the integration tests project unpacks the IdP (idp-distribution) and Jetty (jetty-distribution) to the test-distributions directory, deploys the testbed (idp-testbed), and installs test flows from idp-conf. Each instance of the abstract test class (BaseIntegrationTest) copies the default idp.home directory to a new per-test-class idp.home directory named by a timestamp.




Per-test-class idp.home directory.




Default idp.home directory : idp-distribution, idp-testbed, and test flows from idp-conf.

The per-test-class idp.home directory is deleted only if all tests pass.


To use the default ports (8080, 8443, and 9443 for backchannel), disable the setUpAvailablePorts() method :

Code Block
@BeforeClass(enabled = false)
public void setUpAvailablePorts() {


Possible values for browser, OS, and version :


Values Documentation





Some example values  :



"internet explorer"

"Windows Server 2012"





Selecting a Browser via System Property

Instances of are populated from the SAUCE_ONDEMAND_BROWSERS system property. For example :


To test a remote browser set the following system properties :

Property Name

Property Value




Remote browser if true, local browser otherwise.


IP address

IP address of server.


IP address

Optional private IP address of server.

For example :

-DSELENIUM_IS_REMOTE=true -Dserver.address=