Using the wisdomtool restclient for automated test REST API, the default is to strictly match and verify the return HTTP status code and body content.
(1). If the body content returned by the API is changed dynamically, the body content can be verified.
(2). If the body returned by the API is in JSON format , some attribute fields need to be excluded, not verified, and only the excluded attribute fields will be verified;
(3). Modify the contents of the HTTP request and response.
All three of the above can be set in the history Detail window interface. For more information, please refer to Wiki
Choose HistoryView, select a record, right-click on the menu barConfigureOpen itHistory DetailWindow.
Un-Check the body content and uncheck it in the right-hand formAssert Body, so that the automated test does not validate the body content, only the HTTP status code is verified by default.
Exclude certain attribute fields, do not check them, check in the right-hand form firstAssert Body, which verifies the body content and, of course, the HTTP status code is also verified by default.
And then in the right form.ViewerThe expanded JSON node is checked on the view, and the selected node is the attribute field for which you want to exclude validation.
InHistory DetailThe window can also modify the contents of the HTTP request and response as follows:
HTTP methods-HTTP method
Url-request URL
Message headers for HTTP requests-HTTP request Header
Message body for HTTP requests-HTTP request body
HTTP Response State Code-HTTP Status
HTTP Response message body-HTTP Response body
Description of History Record-Description
Precautions :
(1). By default, the HTTP status code is verified, and the status code changes must match the expected results.
(2). If the check box is not uncheckedAssert Body, the body content of the HTTP response is checked by default, and it is strictly string-matched. Therefore, the changes must be cautious, you have to keep the content and format returned by the server is exactly the same.
(3). Tick the expanded JSON node, will exclude the selected node, so that it does not check, not checked node will be matched and verified, this function is the premise is to check theAssert Body。
Using Wisdomtool restclient for automated testing, how can I cancel the checksum of the returned body content? Do not validate JSON attribute fields that are excluded?