How to set the script to use different username/password/proxies for different servers

Using different username/password/proxies for different servers

1. If there is a different proxy, use web_set_proxy to change the information:

  1. If the protocol is HTTP, use

web_set_proxy("proxyname:<port>");

  1. If the protocol is HTTPS, use

web_set_secure_proxy("proxyname:<port>");

2. If you need to change the username/password as well, use the web_set_user to change the information:

web_set_user("username","password","proxyname:<port>");

3. In the script, parameterized the server name. Basically, you will just need to change any hard coded URLs and Server IPs to point to the new server. This will work assuming both servers are exactly the same in terms of the application under test.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s