Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space FUNCTDEV and version SVC2024.1

...

You can also customize how tests are generated by configuring settings in one of tst_creation.properties, the test creation properties files shipped with SOAtest:

...

. See Test Creation Properties

...

.

...

SOAtest will automatically create tests using the appropriate test creation configuration file based on the Parasoft Recorder configuration. See SOAtest Smart API Test Generator for additional SOAtest will automatically create tests using the appropriate test creation configuration file based on the Parasoft Recorder configuration. See SOAtest Smart API Test Generator for additional information.

About Smart Test Templates 

...

Each Resource Template points to a specific path under emdemo. Any tests generated for the paths specified in each Resource Template will include configurations from the chained tools. For example, "Resource 3" is configured to match the "/em/virtualassets/manage" path. As a result, tests that contain this path will include a JSON Assertor configured to validate asset configurations that are returned in the response

Configuring Smart API Test Generation for Salesforce 

The Salesforce application architecture requires Smart API test generation to implement a specific configuration to properly generate tests. SOAtest creates the TestAssets/test_templates directory in the workspace and generates the salesforce_tst_creation.properties configuration file, which includes the following recommended configurations by default: 

No Format
applicationType=Salesforce

customHandlerClass.1=com.parasoft.webtool.testcreator.handlers.salesforce.AuraConfig

includeContentTypes=application/json, application/x-www-form-urlencoded, text/html, text/plain
disableDiffCreation=true
includeURLPatterns=**.force.com,**.salesforce.com

excludeURLPatterns=*/jslibrary/,/file-asset/,/auraFW/resources/,/auraCmpDef?**,*/LayoutMeta?**,*/cometd/,/_nc_external/system/,/apex/,/l/**,**/contentDoor?**,/customerportal/**,**/promos.html

requestPayloadParameterizationExcludeNames.1=^pageSize$
requestPayloadParameterizationExcludeNames.2=^max[A-Za-z]+
requestPayloadParameterizationExcludeNames.3=^actionsRequestId$
requestPayloadParameterizationExcludeNames.4=^request$
requestPayloadParameterizationExcludeNames.5=^numRecordsToShow$
requestQueryStringParameterizationExcludeNames.1=^r$

You can create multiple instances of the file and customize the configurations so that SOAtest can generate smart tests that help you achieve your testing goals. If you create different instances of the salesforce_tst_creation.properties file, you can specify unique names with the applicationType property so that SOAtest interfaces can distinguish between different instances of the configurations (see Creating Smart API Tests from Traffic). 

Configuring Smart API Test Generation for Guidewire

The Guidewire application architecture requires Smart API test generation to implement a specific configuration to properly generate tests. SOAtest creates the TestAssets/test_templates directory in the workspace and generates the guidewire_tst_creation.properties configuration file to the workspace, which includes the following recommended configurations by default: 

No Format
applicationType=Guidewire

includeContentTypes=application/json, application/x-www-form-urlencoded, multipart/form-data
disableDiffCreation=true
includeURLPatterns=**/cag/j_spring_security_check,**/bc/*.do,**/pc/*.do

You can create multiple instances of the file and customize the configurations so that SOAtest can generate smart tests that help you achieve your testing goals. If you create different instances of the guidewire_tst_creation.properties file, you can specify unique names with the applicationType property so that SOAtest interfaces can distinguish between different instances of the configurations (see Creating Smart API Tests from Traffic)the "/em/virtualassets/manage" path. As a result, tests that contain this path will include a JSON Assertor configured to validate asset configurations that are returned in the response

Test Creation Properties

You can define additional test creation properties in the tst_creation.properties configuration file. The tst_creation.properties file is located in the SOAtest workspace under the TestAssets/test_templates folder. By default, all web proxies that connect to the SOAtest server will use the settings configured in this file. 

...

Scroll Table Layout
widths40%,60%

applicationTypeDefines a unique identifier for the configuration file so that it can be read from different SOAtest interfaces, such as the Generate Smart API Traffic wizard (see Creating Smart API Tests from Traffic). customHandlerClass.<number>See Configuring Smart API Test Generation for Salesforce.
includeContentTypesDefines a comma-separated list of content types to include during traffic processing. Default is application/json,application/x-www-form-urlencoded
excludeContentTypesDefines a comma-separated list of content types to exclude during traffic processing. Default is empty.
disableDiffCreation

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

disableDiffParameterizationEnables/disables diff parameterization. Parameterization enables you to use data banked values in the diff. If diff parameterization is disabled (setting this property to true), only static values will be available. Default is false.
disableEnvironmentCreationEnables/disables the creation of an environment and environment variables. Default is false.
disableDataBankCreation

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

disableAssertorCreationEnables/disables the creation of JSON Assertor tools. Default is false. See JSON Assertor for additional information.
diffToolIgnoreNames.<number>

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>

diffToolIgnoreValues.<number>

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>

assertorToolIgnoreQueryParameterNames.<number>

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>.

assertorToolIgnoreQueryParameterValues.<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>.

assertorToolIgnoreFieldNames.<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>.

assertorToolIgnoreFieldValues.<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>

includeURLPatterns

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.

The following examples describe common scenarios:

# include any URL for the host 'www.example.com'  

includeURLPatterns=www.example.com 

# include URLs in the 'example' domain

includeURLPatterns=*.example.com 

# include URLs that have a 'path' segment

includeURLPatterns=**/path/**

# include URLs that end with a 'path' segment and does not have a query string

includeURLPatterns=**/path

# include URLs that end with a 'path' segment and have a query string

includeURLPatterns=**/path?**

excludeURLPatterns

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.

The following examples describe common scenarios:

# exclude any URL for the host 'www.example.com'  

excludeURLPatterns=www.example.com 

# exclude URLs in the 'example' domain

excludeURLPatterns=*.example.com 

# exclude URLs that have a 'path' segment

excludeURLPatterns=**/path/**

# exclude URLs that end with a 'path' segment and does not have a query string

excludeURLPatterns=**/path

# exclude URLs that end with a 'path' segment and have a query string

excludeURLPatterns=**/path?**

includeTextResponseValues.<number>

Defines a regular expression matching values that the test generator will consider for potential extraction to a data bank. If a match is found, the substring that matches the pattern enclosed in the parentheses will be considered. At least one set of parentheses is required to define the desired value and its boundaries

Two parameters are configured with the following regex patterns by default:

includeTextResponseValues.1="([-A-Za-z0-9%_=+./]{10,})"

includeTextResponseValues.2='([-A-Za-z0-9%_=+./]{10,})'

includeTextResponseContentTypesDefines a comma-separated list of content types the test generator will process against the includeTextResponseValues parameter. Default is text/html
requestPayloadParameterizationExcludeNames.<number>

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).*

requestQueryStringParameterizationExcludeNames.<number>

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

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

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

useServerSettings

Anchor
useServerSettings
useServerSettings

Enables/disables using the settings from the tst_creation.properties file on the SOAtest server, instead of the settings configured in the local tst_creation.properties file. Default is true.
Code Block
languagetext
titleExample tst_creation.properties File
includeContentTypes=application/json, application/x-www-form-urlencoded
excludeContentTypes=image/png,font/ttf,text/css,application/javascript
disableDiffCreation=false
disableDiffParameterization=false
disableEnvironmentCreation=false
disableDataBankCreation=false
disableAssertionCreation=true
# Ignore values that start with "time", "date", "url" or "href" in diff tool, case insensitive
diffToolIgnoreNames.1=(?i)^(time|date|url|href).*
# Ignore values that end with "time", "date", "url" or "href" in diff tool, case insensitive
diffToolIgnoreNames.2=(?i).*(time|date|url|href)$
# Ignore values like a timestamp in diff tool, e.g. 2018-03-21T07:00:00.000Z
diffToolIgnoreValues.1=[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)?
# Ignore query parameters when creating assertions based on parameter name pattern
assertorToolIgnoreQueryParameterNames.1=(?i)^(maxResultSize).*
# Ignore query parameters when creating assertions based on parameter value pattern
assertorToolIgnoreQueryParameterValues.1=[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)?
# Ignore fields in payload when creating assertions based on field name pattern
assertorToolIgnoreFieldNames.1=(?i)^(time|date|url|href|SessionId|transactionId).*
# Ignore fields in payload when creating assertions based on field value pattern
assertorToolIgnoreFieldValues.1=[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)?
# Comma separated list of URL patterns where pattern matching is the same as Apache Ant. URLs can be case sensitive.
includeURLPatterns=http://{host}:8080/path/**/resources/*
excludeURLPatterns=https://{host}:8443/path/**/resources/*

# Exclude from being parameterized field names in request payload
requestPayloadParameterizationExcludeNames.1=(?i)^(time|date).*

...