...
By default, the Smart API Test Generator ignores timestamps, but it can be configured to ignore other parameters based to fit your needs. See Test Creation Parameters for additional information.
...
You can apply assertion logic to from an existing .tst file to train Smart API Test Generator. See Training the Smart API Test Generator Using a .tst File.
...
You can use existing REST Clients to teach the Smart API Test Generator authentication settings and JSON assertion logic. You can create training rules from from the from the .tst file, Test Suite, or REST Client node. SOAtest will create an HTTP Authentication or a JSON Assertor Assertor rule under the resource resource template that most closely matches the path specified in the REST Client. If no match is identified, then new .stt files will be created–a file for the HTTP Authentication tool and a file for JSON Assertorscreated for each rule. The .stt file(s) will contain Resource Suites and Resource Templates with their Match settings configured to match all endpoints. An HTTP Authentication or JSON Assertor tool will be chained to the Resource Template that is configured with the authentication settings from the REST Clientmatch the REST Client's endpoint.
The match pattern for new .stt files is based on the type of rule you are teaching the Smart API Test Generator. For assertions, the parent suite match is set using the REST client's basePath. Subpaths are configured in a nested suite match and/or a resource template match. The resource template will be configured to match the "Exact" field at the specific method type.
For authentication, the parent suite match is set using the REST client's scheme, host, and port. The resource template contained in the parent suite will be configured to match to the REST client's basePath and all subpaths and method types.
- Right-click the .tst file, Test Suite, or REST Client node in the Test Explorer and choose Train Smart Test Template.
Review the rules when prompted. Smart API Test Generator will attempt to match resources in existing .stt files and add new rules accordingly. If a matching .stt is not found, a new file will be created.
Info title Training Smart API Test Generator with JSON Assertors Equality assertions (assertions configured with the
==
orequals
operator) with fixed values will be created based on traffic. If the value is parameterized with a non-equality assertions, the assertor chained to the resource will be a converted to a fixed value set to[Smart - User Input]
. For parameterized equality assertions the value will be[Smart - From Traffic]
.New assertions will be added to existing assertors in the .stt file.
- Click OK to update or add a new .stt file to the Smart Test Templates view that contains the settings configured in the REST Client. If a new file .stt file is created, the file name will be determined based on whether you are teaching the Smart API Test Generator authentication settings or assertion logic. For assertions, the original client's basePath will be used for the name. For authentication, the name will be based on the host name configured in the original client. If the host name and/or basePath are parameterized in the original client, the resource resource will be named with "Template.stt". You can right-click the file in the Smart Test Templates view and rename it.
- Double-click the Resource Suite and the Resource Template and configure their Match settings to define the test generation scope. See Defining Smart API Test Generation Scope.
- You can manually add additional resources to finish configuring the .stt file. See Manually Creating and Configuring Test Templates.
...