Forum Discussion

electric_Insura's avatar
electric_Insura
Contributor
12 years ago

[Res]Proxy settings at project level for loadtestrunner.bat

I need to set proxy host and port AT THE PROJECT LEVEL for loadtestrunner.bat

I DO NOT WANT to set the proxy system-wide via File => Preferences => Proxy Preferences.

I've tried setting http.proxyHost and http.proxyPort as properties in the LoadTestRunner dialog. They get passed to the command line but when I actually run loadtestrunner.bat they aren't observed.

My project-level load test settings are:

http.proxyHost=127.0.0.1
http.proxyPort=8888

Any ideas? Thanks.

3 Replies

  • you will have to do some groovy scripting if you want to dynamically change the Proxy while running on command line. Try something like this:

    import com.eviware.soapui.SoapUI
    import com.eviware.soapui.settings.ProxySettings

    SoapUI.settings.setString( ProxySettings.HOST, "127.0.0.1" )
    SoapUI.settings.setString( ProxySettings.PORT, "8888" )

    Let me know if this helps.

    Regards,
    Temil
  • After several tests, I have tried these lines in the following locations:

    * Project TestSuites setup script
    * Groovy script within test case when the Groovy script is the first step in the test case
    * Setup script, test case
    * Setup script, load test case

    They don't work to set the proxy in any of those locations.
  • Try this:



    import com.eviware.soapui.SoapUI
    import com.eviware.soapui.settings.ProxySettings

    SoapUI.settings.setString( ProxySettings.AUTO_PROXY, "false" )
    SoapUI.settings.setString( ProxySettings.HOST, "127.0.0.1" )
    SoapUI.settings.setString( ProxySettings.PORT, "9999" )