Issues and Feedback about Smart Assertions
Some issues and feedback about Smart Assertions after a day or so of using them.
I would like to provide some hopefully helpful feedback on the newly introduced Smart Assertion.
Please set the default name generated based on the type selected by the user. e.g. Smart Assertion - Metadata or Smart Assertion - Data
The smart assertion does not handle simple text responses in the way that message content assertions do. The following response cannot be parsed by the Smart Assertion. Sure it isn't following good API design practice but it is a valid HTTP response and it is valid JSON data.
HTTP/1.1 200 OK
Date: Mon, 19 Jul 2021 21:43:03 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 29
Connection: keep-alive
Server: Kestrel
Cache-Control: no-cache
Pragma: no-cache
Expires: -1
"Your name has been updated."
It doesn't seem all that smart to automatically include and enable in the metadata assertions data that is obviously going to change from response to response. Who thought that automatically adding response headers such as Date and Content-Length was a good ides? Date is guaranteed to change with every request. Content-Length is also likely to vary. This is not going to be an enjoyable experience for the novice user of ReadyAPI - "Use our Smart Assertion on your response, make your testing easier, you'll get a fail the moment you re-run the test".