Advanced parameters

Using advanced parameters in Flood

In the Advanced Parameters section in the Stream Editor, you can set values to properties and pass them on to your script. This allows you to change certain properties on the fly instead of needing to modify them in your script each time.

Some properties you can use for this purpose are domain names when switching between environments, user accounts, or keystores.

JMeter/Gatling

System (Java) properties can generally be specified with the -D prefix. Examples might include:

To set the time to cache successful name resolutions for the InetAddress Cache, edit the following to reflect the desired value:

-Dnetworkaddress.cache.ttl=10

To set the time to cache unsuccessful name resolutions for the InetAddress Cache, edit the following to reflect the desired value:

-Dnetworkaddress.cache.negative.ttl=10

To set a custom keystore and password for client certificates as described here:

-Djavax.net.ssl.keyStore=/data/flood/files/yourkeystore.jks
-Djavax.net.ssl.keyStorePassword=yourpassword

You can also modify JMeter properties with the -J prefix. Examples might include:

Change from the default TLS protocol to SSLv3 for HTTPS:

-Jhttps.default.protocol=SSLv3

Modify CookieManager behaviour to store Cookies as variables:

-JCookieManager.save.cookies=true

Change the number of TCP retries for HttpClient 4

-Jhttpclient4.retrycount=2

Override parameters with caution. Flood makes an effort to provide sensible defaults, changing parameters may affect the performance of your tests.

Selenium

You are able to pass in command line parameters using the -D prefix too. An example of this is shown below:

-DmyUsername=admin

You can then retrieve these in your script by utilising the following statement in your script:

System.getProperty("myUsername");

Troubleshooting

Some more complex parameter values, especially those with special characters that need to be escaped (like = or spaces), may not work in this field. We recommend you set these in user.properties instead if you're using JMeter or in a separate configuration file that you upload and refer to in your main scala script if you're using Gatling.