Note
We have identified some use cases where ReadyAPI Windows users required broader character encoding through UTF-8. To set encoding to UTF-8, you need to make one configuration change to <readyapi-installation-folder>\bin\ReadyAPI.vmoptions
. Insert a new line at the end and add -Dfile.encoding=UTF-8
. Save, close the file, and open ReadyAPI. For additional details on setting the encoding to UTF-8, refer to this page.
When ReadyAPI runs, it passes a number of parameters to the Java virtual machine to prepare the environment. You can modify these parameters according to your needs.
Depending on how you run ReadyAPI, it passes the parameters from different locations:
Running ReadyAPI via... | Passes parameters from... |
---|---|
Executable | The helper |
Command line | The |
Note: To modify JVM options for command-line runners (testrunner.bat/.sh
, loadtestrunner.bat/.sh
, and so on) use the approach described for the ReadyAPI command line.
For the description of the JVM parameters, see Java Virtual Machine Parameters.
The ReadyAPI installer creates a *.vmoptions file that contains default arguments for the Java virtual machine. Here is a sample snippet of that file:
-Xms128m
-Xmx4096m
-Dsoapui.properties=soapui.properties
-Dgroovy.source.encoding=iso-8859-1
...
Open this file with any text editor and modify any parameter that you need. If the parameter is absent, you can add it.
Important
The last line in the .vmoptions
file must be followed by a new line.
When you use the .bat
or .sh
file to run ReadyAPI, the Java virtual machine uses parameters specified in the script file. These parameters are stored in the JAVA_OPTS
variable.
When the script calls Java, it passes the specified parameters as command-line arguments. You can find the desired parameter and modify it according to your needs. If the parameter is absent, you can add it.
Here is how variables look like in script files:
In the
.bat
file:set JAVA_OPTS=-Xms128m -Xmx%READY_XMX% -XX:MinHeapFreeRatio=20 -XX:MaxHeapFreeRatio=40 -XX:MaxPermSize=256m -Dsoapui.properties=soapui.properties
In the
.sh
file:JAVA_OPTS="-Xms128m -Xmx$READY_XMX -XX:MinHeapFreeRatio=20 -XX:MaxHeapFreeRatio=40 -XX:MaxPermSize=256m -Dsoapui.properties=soapui.properties
To append a new parameter to the already specified parameters, specify the JAVA_OPTS
variable itself before specifying the desired parameter. For example:
In the
.bat
file:set JAVA_OPTS=%JAVA_OPTS% -Dsoapui.browser.disabled="true"
In the
.sh
file:JAVA_OPTS="$JAVA_OPTS -Dsoapui.browser.disabled=true"
As of Java 17.0.3 and from adopting 17.0.4 in ReadyAPI 3.41.0, the '_' characters are no longer allowed in JDBC connection strings.
If your existing tests have the '_' in their JDBC connection string, please add and use this JVM option:
when using the command line - Dcom.sun.jndi.ldapURLParsing="legacy"
when using *.vmoptions or vmoptions.txt file - Dcom.sun.jndi.ldapURLParsing=legacy
You can now configure your Vmoptions file to prevent it from being updated or overwritten during ReadyAPI upgrades.
To implement this, add the following to your a *.vmoptions file - -Dcom.sun.jndi.ldapURLParsing=legacy
Note
The default path of *.vmoptions file is usually: C:\Program Files\SmartBear\ReadyAPI-3.46.0\bin.
Using command-line arguments, you can modify system and global properties.
To specify system properties, use the -D
argument:
-Dproperty.name=value
To specify global properties, use the -G
argument:
-Gproperty_name=value
Also, you can load a list of properties from a file. To do this, use the following argument:
-Dsoapui.properties=file name
Note
The file name is a path to a file that contains properties to load.
By using command-line arguments, you can specify properties of a specific project, test suite, test case or virtual service. To do this, use the following pattern:
-Dsoapui.properties.testitem=file name
testitem – The name of the desired test item with spaces removed.
file name – The path to the file that contains the list of properties.
For example, to specify properties for “TestSuite 1”, use the following line:
-Dsoapui.properties.TestSuite1=testsuite1.properties
Important
This will affect any test item the name of which matches this pattern. For example, the argument above will also affect test items with names “Test Suite 1”, “Test Suite1” or “T est S uite 1”, and so on.