Forum Discussion
I know I'm a little late to the party on this, but ...
We use HTTP assertions on every test; header exists, header equals (with some regex thrown in the re as well) , status codes, etc.
Additionally 99% of our tests are data driven, so, those values could change on every request.
There are two operations in the Smart Assertion; "Received Data" and "Received Metadata."
After executing one specific test I performed the following
I turned off (deselected active) the "Received Data" as we have groovy code validating the response
I then turned off (deselected active) all "Received Metadata", then activated the specific HTTP data we need to validate. This was performed using conditions (equals, exists, matches regex, etc.) and updating the "valid value" column (some data driven info) as needed.
I then disabled all the "deprecated" assertions we previously used and saved the project (did not commit and push to GIT just yet --- smart move)
I then executed the test to see if everything still passed, which it did.
When I opened the Smart Assertion to see if all of my changes were still in place, the "Received Metadata" page was displayed and showed my changes were still in place (which I was very happy about).
When I changed to "Received Data" I received a popup showing all the content was being updated with the last response, which removed all the work I did above. Not a happy moment any more.
From my perspective once you have "saved" what you want to validate (Active box selection) for both options of the Smart Assertion, the Smart Assertion should not repopulate unless you choose the "Populate from Received Data" or "Populate from Received Metadata" because everything you previously setup will be removed.
If new HTTP parameters are added in a new release of your code, one would want those to be available to configure but not have to update all previously set items as there is a very good chance one may miss something which was or was not previously configured. In previous releases, the HTTP assertions remained so if something new came along you could easily add the one, two, etc., HTTP assertions without having to reconfigure everything.
Please let me know if we are doing something incorrect when configuring the "new" Smart Assertion. Happy to do a demo for the support Staff !
Stu
Related Content
- 8 years ago
- 9 months ago
- 2 years ago
Recent Discussions
- 5 days ago
- 10 days ago