Bertrand,

The output from a direct request to the test URL is successful:

curl -u admin:admin
http://localhost:4502/apps/geometrixx/test-content/example.test.txt
TEST_PASSED

It looks like there is a NullPointerException being thrown by the
ParameterSupport class when it tries to iterate over the request parameter
map entries when TestAllPaths attempts to render the test resource. It seems
like there should be a null check in the ParameterSupport class to prevent
the NPE, but perhaps it might be a good idea to return an empty map instead
of null in the
org.apache.sling.junit.scriptable.HttpRequest.getParameterMap()
implemententation.

Is this something I could submit a patch for?

Mark Adamcin
Acquity Group



On Thu, Apr 28, 2011 at 3:05 AM, Bertrand Delacretaz <[email protected]
> wrote:

> Hi Mark,
>
> On Wed, Apr 27, 2011 at 11:47 PM, Mark Adamcin <[email protected]> wrote:
> > ...I'm excited to get started with using this framework for CQ 5.4
> > applications...
>
> Cool ;-)
>
> > ...I thought I'd jump in with the Scriptable Tests Provider, but
> > I ran into a snag, identified by the following stack trace snippet...
>
> > ..."verifyContent[0](org.apache.sling.junit.scriptable.TestAllPaths):
> Expecting
> > HTTP status 200 for path /apps/geometrixx/test-content/example.test.txt
> > expected:<200> but was:<500>"...
>
> Did you try requesting /apps/geometrixx/test-content/example.test.txt
> directly with curl or with a browser? It looks like that fails, if
> that's the case the problem is independent from the testing framework.
>
> All what TestAllPaths does is make an internal request to that path
> and expect TEST_PASSED in the response, so first step would be to test
> this via HTTP. One problem might be credentials, as currently
> TestAllPaths doesn't provide them, but you shouldn't get a 500 if
> that's the problem.
>
> -Bertrand
>

Reply via email to