1README file for the HTTP::Proxy tests 2 3* Helper modules 4 5HTTP::Proxy can test itself without using the network, 6thanks to the HTTP::Daemon module. 7 8But since I want to test the proxy against "real" servers, 9I also need to test it with an internet connection. 10 11localhost tests work as follows: 12 - a HTTP::Daemon is created and forked, that will serve 13 a certain number of simple requests 14 - a HTTP::Proxy is created and forked 15 - a LWP::UserAgent is created and connects to the proxy 16 - each of those process can run its own tests independantly, 17 thanks to Test::More 18 19The t/Utils.pm files (use t::Utils in some test files) exports 20several functions: 21 - server_start() 22 starts a new HTTP::Daemon 23 - server_next( [ \&answer ] ) 24 returns the next response from the server (accepts a coderef) 25 - fork_proxy( $proxy, [ \&end ] ) 26 fork a proxy server passed as an argument, with an optionnel 27 subroutine to run at the end 28 - web_ok() 29 test if the actual WWW is available for testing 30 - bare_request( $url, $headers, $proxy ) 31 send a simple request through the proxy without LWP::UA 32 return a string containing the full response 33 34* Test categories 35 36The tests are prefixed with a number, which indicates several categories: 37 380x - Basic tests 39 t/00basic.t - use HTTP::Proxy works 40 t/01pod.t - the POD is correct 41 t/05new.t - the HTTP::Proxy constructor 42 431x - Minimal functionnality tests 44 t/10init.t - the proxy initialisation 45 t/11log.t - the log() and logmask() methods 46 t/15accessors.t - the proxy accessors 47 t/17fstack.t - the internal HTTP::Proxy::FilterStack object 48 492x - Network protocols test 50 t/20dummy.t - tests against a dummy web server 51 t/20keepalive.t - test the keep-alive connections 52 t/22http.t - test actual HTTP servers 53 t/22transparent.t - test transparent proxying 54 t/23connect.t - test CONNECT to a ssh server 55 t/23https.t - test CONNECT for SSL 56 573x - (Reserved for future use) 58 594x - Filter-related functions 60 t/40push_filters.t - the push_filter method 61 625x - Internal header filters 63 t/50hopbyhop.t - check hop-by-hop headers removal 64 t/50standard.t - check other headers removal 65 t/50via.t - check the Via: headers 66 t/51simple.t - HTTP::Proxy::HeaderFilter::simple 67 t/51simple2.t - HTTP::Proxy::HeaderFilter::simple with a real proxy 68 696x - Internal body filters 70 t/61simple.t - HTTP::Proxy::BodyFilter::simple 71 t/61simple2.t - HTTP::Proxy::BodyFilter::simple with a real proxy 72 t/64htmltext.t - HTTP::Proxy::BodyFilter::htmltext 73 t/64lines.t - HTTP::Proxy::BodyFilter::lines 74 t/64tags.t - HTTP::Proxy::BodyFilter::tags 75 t/66htmlparser.t - HTTP::Proxy::BodyFilter::htmlparser 76 777x - Complex filter chains 78 t/71rot13.t - a simple ROT13 filter set 79 808x - (Reserved for future use) 81 829x - miscellaneous tests 83 t/90diveintomark.t - test the proxy against a lot of status codes 84 85