[ Team LiB ] |
5.11 Testing Through a Firewall5.11.1 ProblemYou want to test a remote web site, but your development machines are behind a firewall. 5.11.2 SolutionSet the proxySet, proxyHost, and proxyPort system properties. 5.11.3 DiscussionHttpUnit uses java.net.HttpURLConnection, which checks the proxySet system property to determine if it should operate through a proxy server. If this property is set, the proxyHost and proxyPort properties specify the server name and port. You can set these properties in your unit test method using this code: System.getProperties( ).put("proxySet", "true"); System.getProperties( ).put("proxyHost", "myProxyHostName"); System.getProperties( ).put("proxyPort", "10000"); 5.11.4 See AlsoRecipe 3.6 shows how to set system properties using Ant. |
[ Team LiB ] |