...
If you are using Jython scripts, you can specify a Jython path variable in the Scripting tab of the Preferences panel. Jython scripting support can be used without setting this variable. The Jython path specifies a list of directories to search for python modules that are not already included with Jython. Separate multiple directory paths using the OS default path separator (";" for Windows and ":" for Linux and macOS). If you set the Jython path then you need to restart SOAtest or Virtualize for the change to take effect.If you are using Java for scripting and want to use SOAtest recompile modified Java files, see Using Eclipse Java Projects in SOAtest for details on how to set your environment on scripting.If you are using Java for scripting and want to use Virtualize to recompile modified Java files, see Using Eclipse Java Projects in Virtualize for details on how to set your environment on scripting.
...
| Info | ||||
|---|---|---|---|---|
| ||||
If you’re building your Java project with Apache Maven, you can add the following to your project's pom.xml:
|
...
A variable can be referenced in a script as follows: ${varName}. ${varName}.
A script example for SOAtest:
| Code Block |
|---|
-----------------------------
var TestHome=C:\functional-tests\src\test\soatest\tests\LoadTests var ReportHome=C:\LoadTestReports
var minutes = 1
var scenario = "Linear Increase"
var test=echo
open ${TestHome}\${test}.tst
loadtest -minutes ${minutes} -report ${ReportHome}/%d/${test}/${test}.rpt -xml${ReportHome}/%d/${test}/${test}.xml -html ${ReportHome}/%d/${test} ${scenario}
----------------------------- |
Jython Syntax Coloring
Jython syntax coloring for the Extension tool is enabled using the PyDev plugin (http://www.pydev.org/). This plugin must have its jython interpreter configured for advanced functionality such as code auto completion. For more details, see http://www.pydev.org/manual_101_interpreter.html.
...
For details on how to create and apply an Extension tool that executes a custom script you have written, see Extension Tool for Custom Scripting. For a step-by-step demonstration of how to extend SOAtest with scripting, see Extending SOAtest with Scripting.