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.
Setting Command Line and JVM Options
Depending on how you run ReadyAPI, it passes the parameters from different locations:
Running ReadyAPI via... | Passes parameters from... |
---|---|
Executable | The helper .vmoptions file. |
Command line | The .bat/.sh script. |
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.
Running ReadyAPI via Executable
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.
![]() |
The last line in the .vmoptions file must be followed by a new line. |
Running ReadyAPI via Command 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
Adding New Parameters
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"
Add a parameter for parsing legacy JDBC connection strings’
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: Dcom.sun.jndi.ldapURLParsing="legacy"
Specifying Properties via Command Line
Using command-line arguments, you can modify system and global properties.
Specify System Properties
To specify system properties, use the -D
argument:
-Dproperty.name=value
Specify Global Properties
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. |
Specify Properties of Specific Test Items
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:
-
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
![]() |
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. |