Forum Discussion
mgroen2, you're using JsonPath Regex Match. Try the regular JsonPath Match instead.
Hi,
HKosova as you suggested, I implemented the JsonPath Match,
the strange this is, that validation initially succeeds (I clicked on "select from current"), however when re-executing the test it fails, and the reason for that is that expected value is changed, a comma is added to the end (see second screenshot).
After re-selecting the value again (" select from current"), the assertion passes again first time, but re-executing the test, makes the assertion fail again (comma is added again). Is this known behaviour? Possibly a bug?
- HKosova8 years agoSmartBear Alumni (Retired)
Mathijs,
The comma is part of the error message, not the value. And the error happens because the token value is different - e.g. on your image the expected value ends with "...D8LE" and the actual value ends with "... JSPPA" (or vice versa).
I guess the token is generated dynamically and is different for each new session, like a unique session ID. How are you supposed to validate it? Do you just need to verify this token is present in the response, regardless of the value?
Related Content
- 6 years ago
Recent Discussions
- 3 days ago