Follow-up to dev call regarding integration tests

Tom Zeller tzeller at dragonacea.biz
Mon Jun 9 23:00:05 EDT 2014


On the last dev call I spent some time talking about how I was having
trouble with the Selenium tests running in Eclipse, even though they
ran okay via Maven. About 5 minutes after the call I figured out what
I was doing wrong, which was unpacking the IdP and Jetty distributions
to the Maven build directory, which apparently was confusing Eclipse.
So I went ahead and finished the Selenium test work I was doing before
moving on to the app ctx initializer.

The Selenium tests in java-idp-integration-tests now unpack the Jetty
and IdP distributions to the 'test-distributions' directory and then
launch Jetty via 'java -Didp.home ... start.jar' in a new Process
created by a ProcessBuilder, which matches our platform independent
instructions for launching the IdP. The POM also copies the testbed
war and a context deployment descriptor to the IdP's jetty-base
directory so that the Selenium tests run against the testbed's SP.
It's great that the testbed SP displays the SAML response in the
browser, because we can grab that via Selenium and use the same
validation code as the testbed flow tests.

Of note : Eclipse is not able, or rather I am unable to tell it how to
unpack the idp-distribution package correctly, so if you want to run
the Selenium tests in Eclipse you will need to run 'mvn compile' from
the command line first.

I bumped the Jetty version in java-idp-integration-tests to the latest
9.1.x, and will probably do so in the parent POM, as long as that does
not require Servlet API 3.1.

There are only two Selenium tests right now, the trivial 'status'
profile and SAML 1 SSO, the rest should hopefully be straightforward,
but I will put off working on those.

Thanks.

Oh, the code to launch Jetty in a Process via ProcesBuilder is
probably a hack, the code reads the log output of the Jetty Process
and waits for it to say "Server:main: Started" before running the
Selenium tests. Obviously there is room for improvement, but I wanted
to get some work committed.


More information about the dev mailing list