Marc, The nested <webtest/> occurred in an external Ant-invoked file. I suspect that's why there was no complaint.
I was using the nesting to try to deal with testing payment using the PayPal sandbox. Using the sandbox requires that another window has logged onto the sandbox account. I thought that the nested webtest would solve the problem of not destroying the state of the transaction that had begun. I have since realized that this wouldn't have worked anyway, since the sandbox log in sets a cookie (which gets lost when I exit the nested webtest). What I really needed was a way to simulate windows/tabs using webtest ... -- Jonathan Rosenberg Founder & Executive Director, Tabby's Place http://www.tabbysplace.org/ > -----Original Message----- > From: [email protected] [mailto:[email protected]] On > Behalf Of Marc Guillemot > Sent: Monday, June 08, 2009 04:43 > To: [email protected] > Subject: Re: [Webtest] Null Pointer Exception > > Hi, > > a nested <webtest/>? In fact this should not be allowed. What is your > used case for that? > > Cheers, > Marc. > -- > Web: http://www.efficient-webtesting.com > Blog: http://mguillem.wordpress.com > > Jonathan Rosenberg wrote: > > I'm hoping someone will have some tips on how to work around a > > java.lang.NullPointerException I'm > seeing in a test. > > > > I'm thinking the problem is triggered when webtest is trying to restore the > > previous response after > executing a nested <webtest/>. > > Here are the first few lines of the stack trace: > > > > --- Nested Exception --- > > java.lang.NullPointerException > > at > > com.canoo.webtest.engine.WebClientContext.getCurrentResponse(WebClientContext.java:197) > > at com.canoo.webtest.engine.Context.getCurrentResponse(Context.java:98) > > at > > com.canoo.webtest.engine.WebTestException.readUrlCurrentResponse(WebTestException.java:29) > > at > > com.canoo.webtest.engine.WebTestException.<init>(WebTestException.java:25) > > at > > com.canoo.webtest.engine.StepExecutionException.<init>(StepExecutionException.java:18) > > > > Any thoughts on this? > > > > -- > > Jonathan Rosenberg > > Founder & Executive Director, Tabby's Place > > http://www.tabbysplace.org/ > > > > > > > > _______________________________________________ > > WebTest mailing list > > [email protected] > > http://lists.canoo.com/mailman/listinfo/webtest > > > > _______________________________________________ > WebTest mailing list > [email protected] > http://lists.canoo.com/mailman/listinfo/webtest _______________________________________________ WebTest mailing list [email protected] http://lists.canoo.com/mailman/listinfo/webtest

