...
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 | ||
---|---|---|
|
applicationType | Defines 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. | ||||
---|---|---|---|---|---|---|---|
includeContentTypes | Defines a comma-separated list of content types to include during traffic processing. Default is application/json,application/x-www-form-urlencoded | ||||||
excludeContentTypes | Defines 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 | ||||||
disableDiffParameterization | Enables/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 . | ||||||
disableEnvironmentCreation | Enables/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 | ||||||
disableAssertorCreation | Enables/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 You can specify additional name patterns by adding properties and appending them with For example:
| ||||||
diffToolIgnoreValues.<number> | Defines a regex matching values that should be ignored when creating diffs. Default is to ignore timestamps:
You can specify additional value patterns by adding properties and appending them with For example:
| ||||||
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":
The property is not case sensitive. You can specify additional patterns by adding properties and appending them with | ||||||
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:
You can specify additional patterns by adding properties and appending them with | ||||||
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:
The property is not case sensitive. You can specify additional patterns by adding properties and appending them with | ||||||
assertorToolIgnoreFieldValues.<number> | Defines a regex matching values that should be ignored when creating JSON Assertor tools. Default is to ignore timestamps:
You can specify additional value patterns by adding properties and appending them with For example:
| ||||||
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 URLs that have a 'path' segment
| ||||||
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:
| ||||||
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:
| ||||||
includeTextResponseContentTypes | Defines 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:
| ||||||
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:
| ||||||
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 | ||||
---|---|---|---|---|
| ||||
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).* |
...