how to test / WebResponse creating by reading a filesystem resource

"Maciej Zywno" <[email protected]>
Newsgroups gmane.comp.web.httpunit.devel
Message-ID <[email protected]>
Hi,

I want to test a method that extracts various forms, fields etc from a
WebResponse to make sure that this method extracts the info as I expect it
to do. I wanted to avoid the test methods doing any network connections. So
I though I could download html, store them on a hard drive and let test
methods use them. However when I pass filesystem urls to
WebConversation.getResponse(url), there is a problem with embedded
javascript. One javascript includes the other on various levels. It seems it
may not be so easily downloaded by hand as urls to thos javascripts are
generated dynamically.

I would like to ask about your approach to testing code that uses
WebResponse and other httpunit classes. Any hints? Do you stub a WebResponse
somehow? Did you manage to store It seems like mu unit tests will have to
connect to a real webportal to create a WebResponse object. Do you have any
solution to that?

Thanks for any info,

Maciej Zywno

-- 
zywy

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
Httpunit-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/httpunit-develop
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.