1) Create your page tester instance: PageTester tester = new 
PageTester("packagename","Appname","contextpath");
2) get the registry from the page tester : tester.getRegistry();
3) Get the RequestGlobals service from the registry: RequestGlobals globals = 
registry.getService(RequestGlobals.class);
4) store your overrides: globals.storeServletRequestResponse(customRequest, 
customResponse);

You can use a mock framework (easymock, etc.) to make your life easier in 
overriding the services servlet request/response.

Cheers,

Robert

On Nov 25, 2011, at 11/258:10 AM , parranz wrote:

> 
> Hi,
> 
> sorry, I didn't. Eventually I gave up trying :(. If you do, don't forget 
> to write it!
> 
> 
> El 25/11/2011 15:05, donarus [via Tapestry] escribió:
>> hi... Did you found any simple solution on this? I am totaly confused 
>> and after 12 hours of searching a solution I'm not able to test any 
>> page where user should be logged in.
>> 
>> 
>> The problem is, i think in TestableRequest/TestableResponse 
>> implementation. It should be possible to change TR/TR to provide 
>> httpServletResponse/Request, which can be accebted by 
>> WebUtils.isHttp(...)
>> 
>> But I don't se how to do it..
>> 
>> ------------------------------------------------------------------------
>> If you reply to this email, your message will be added to the 
>> discussion below:
>> http://tapestry.1045711.n5.nabble.com/PageTester-with-an-application-that-uses-tynamo-tp4942722p5022861.html
>>  
>> 
>> To unsubscribe from PageTester with an application that uses tynamo, 
>> click here 
>> <http://tapestry.1045711.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4942722&code=cGFycmFuekBiaWxib21hdGljYS5lc3w0OTQyNzIyfDIwMDMzMTU1MDk=>.
>> NAML 
>> <http://tapestry.1045711.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.InstantMailNamespace&breadcrumbs=instant+emails%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>  
>> 
>> 
>> No se encontraron virus en este mensaje.
>> Comprobado por AVG - www.avg.com <http://www.avg.com>
>> Versión: 2012.0.1873 / Base de datos de virus: 2101/4637 - Fecha de 
>> publicación: 11/24/11
>> 
> 
> 
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/PageTester-with-an-application-that-uses-tynamo-tp4942722p5022869.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to