Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space FUNCTDEV and version SOAVIRT_9.10.7_CTP_3.1.3

...

Table of Contents
maxLevel1

Proxy System Properties

You can configure the web proxy by specifying system properties in the Manage Web Proxy console or from the command line when executing the .jar file. You can specify the following properties:  

...

-DapiPortSystem property that specifies the API port number. Default is 40090.
-DproxyPortStart

System property that specifies the starting port number when scanning for an open port. Default is 40443.

-DproxyPortRange

System property that limits the number of ports scanned after the starting port number (value specified with the proxyPortStart argument). Set to 0 to prevent scanning.

-DuseSystemProxy

System property that enables using the network-level proxy. Default is true.

-DdebugEnables/disables system debugging information. Default is false.

Manage Web Proxy Example

Add the system properties to the Java Options field in the Java tab. The following example sets the API port to 45000 and enables debugging:

Command Line Example

Specify the configuration options on startup from the command line. The following startup command sets the API port to 10090, scans for a range of port numbers, and enables debugging:

Code Block
%INSTALLDIR%/jre/bin/java -DapiPort=10080 -DproxyPortStart=20443 -DproxyPortRange=10 -Ddebug=true -jar com.parasoft.traffic.proxy.jar
Info
titleJava Support

The Smart API Test Generator Parasoft Recorder ships with its own instance of Java, but you can use any Java 8 or later that is already installed on your system.

Test Creation Properties

You can determine how the recorder generates tests by defining properties in the tst_creation.properties configuration file. The tst_creation.properties file used by default is located in the SOAtest workspace under the TestAssets folder. By default, all  All web proxies that connect to the SOAtest server will use the settings configured in this file. An   An instance of the tst_creation.properties file also ships with the web proxy installed on a local machine. You can configure the settings in the local file to override settings configured in the tst_creation.properties file on the SOAtest server by setting the the useServerSettings property to false (see Advanced SOAtest Smart API Test Generator Configuration). If you want to use the local settings, make sure that the tst_creation.properties file is in the same directory as the com.parasoft.traffic.proxy.jar file so that it can automatically be read during test creation.

The existing tst_creation.properties file is preserved during updates. If the existing file is moved or deleted, all default settings, as well as new settings added from the latest update, will be applied. 

Scroll Table Layout
widths40%,60%

...

Enables/disables diff creation. See Diff for additional information. Default is false.

...

Enables/disables data bank creation. See Data Exchange Tools for additional information. Default is false.

...

Defines a regex matching element names that should be ignored when creating diffs. Default is (?i)^(time|date|url|href).*

You can specify additional name patterns by adding properties and appending them with .<number>.

For example:

diffToolIgnoreNames.1=<name_pattern_1>

diffToolIgnoreNames.2=<name_pattern_3>

diffToolIgnoreNames.3=<name_pattern_3>

...

Defines a regex matching values that should be ignored when creating diffs. Default is to ignore timestamps:

[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}([.][0-9]{1,3})?(([+-][0-9]{2}:[0-9]{2})|Z)?

You can specify additional value patterns by adding properties and appending them with .<number>.

For example:

diffToolIgnoreValues.1=<value_pattern_1>

diffToolIgnoreValues.2=<value_pattern_3>

diffToolIgnoreValues.3=<value_pattern_3>

...

Defines a regex matching query parameter names that should be ignored when creating JSON Assertor tools.

Default is to ignore query names starting with "maxResultsSize":

(?i)^(maxResultSize).*

The property is not case sensitive.

You can specify additional patterns by adding properties and appending them with .<number>.

...

Defines a regex matching query parameters values that should be ignored when creating JSON Assertor tools.

Ignore query parameters when creating assertions based on parameter value pattern

Default is to ignore timestamps:

[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}([.][0-9]{1,3})?(([+-][0-9]{2}:[0-9]{2})|Z)?

You can specify additional patterns by adding properties and appending them with .<number>.

...

Defines a regex matching values in the response payload that should be ignored when creating JSON Assertor tools. Default value is to ignore values in response payload that starts with time, date, url, href, SessionId, or transactionId.

Default is to ignore timestamps:

(?i)^(time|date|url|href|SessionId|transactionId).*

The property is not case sensitive.

You can specify additional patterns by adding properties and appending them with .<number>.

...

Defines a regex matching values that should be ignored when creating JSON Assertor tools. Default is to ignore timestamps:

[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}([.][0-9]{1,3})?(([+-][0-9]{2}:[0-9]{2})|Z)?

You can specify additional value patterns by adding properties and appending them with .<number>.

For example:

assertorToolIgnoreFieldValues.1=<value_pattern_1>

assertorToolIgnoreFieldValues.2=<value_pattern_3>

assertorToolIgnoreFieldValues.3=<value_pattern_3>

...

Defines a comma-separated list of resource URL patterns to include for test generation. You can define case-sensitive patterns using Ant-style syntax. Default is to include all URLs.

In the following example, all URLs in the parasoft.com domain will be included:

includeURLPatterns=*.parasoft.com

...

Defines a comma-separated list of resource URL patterns to exclude from test generation. You can define case-sensitive patterns using Ant-style syntax. Default is to include all URLs.

In the following example, all URLs at port 8443 in the parasoft.com domain will be excluded:

excludeURLPatterns=*.parasoft.com:8443

...

Defines a regex that matches field names in a request payload that should be excluded from parameterization.

The following example excludes date and time field names from parameterization:

requestPayloadParameterizationExcludeNames.1=(?i)^(time|date).*

...

languagetext
titleExample tst_creation.properties File

...

Refer to Configuring Smart API Test Generation for details about the test creation properties.

Using the API

After starting the web proxy, you can go to the following URL to review the API defintions:

http://<host>:<port>/api/openapi.json

Training the Smart Test Generator

See Configuring Smart API Test Generation for information about teaching the Smart Test Generator how to create tests for your project.