shibboleth-dev - RE: Integration Test
Subject: Shibboleth Developers
List archive
- From: "Howard Gilbert" <>
- To: <>
- Subject: RE: Integration Test
- Date: Fri, 11 Nov 2005 15:27:57 -0500
> Well, there is that stuff, but Will also checked in black box tests
> for the IdP about a month ago. These tests use mockrunner and test
> overall IdP functionality.
Yes, and the differences are modest but important:
public class SSOTest extends IdpTestCase {
This is about how my stuff worked until a week ago (extends SPTestCase). The
new helper class simply moves the MockRunner setup for IdP, SP, and Filter
into a single class. I believe, for example, that this can instantiate two
IdPs, and one SP to run multiple Entity/Federation scenarios on the SP side.
I don't think there is important overlap between the two or that anyone will
get confused.
public void testBasicSsoPostFlow() throws Exception {
...
testModule.doGet();
...
assertTrue(responsesAreEqual(FileUtils.readFileToString(new
File("data/idp/blackbox/sso/response01.txt"), "utf-8"), assertion));
}
This does test the complete function of the IdP. However, it does so by
generating a request (at the Servlet API) and then comparing the response to
a file. This is about the same as the other tests, except that it calls the
higher level API. The point is that if you now want to test the AA Query,
you typically run another request/file in and compare the response to
another expected response.
The next step up from this probably isn't to add an SP just to daisy chain
the SSO to the AA Query. JAXP has some XPath support, and I think it might
be interesting to use it to extract key elements from the XML productions.
This would enable the test code to actually check the values in timed
attributes rather than the current pattern to skip them:
<Conditions NotBefore="[^"]+" NotOnOrAfter="[^"]+">
That is, I see a future where you get some XML back and can do some
assertEquals on an XPath expression on the XML. As you say, we can talk
about this Monday.
- Integration Test, Howard Gilbert, 11/09/2005
- Re: Integration Test, Will Norris, 11/10/2005
- RE: Integration Test, Howard Gilbert, 11/10/2005
- Re: Integration Test, Walter Hoehn, 11/10/2005
- RE: Integration Test, Howard Gilbert, 11/11/2005
- Re: Integration Test, Walter Hoehn, 11/11/2005
- RE: Integration Test, Howard Gilbert, 11/11/2005
- Re: Integration Test, Walter Hoehn, 11/11/2005
- RE: Integration Test, Howard Gilbert, 11/11/2005
- Re: Integration Test, Will Norris, 11/10/2005
Archive powered by MHonArc 2.6.16.