Forum Discussion

amelaao's avatar
amelaao
New Contributor
7 years ago
Solved

JSONPath Existence Match always returns true

Hello, I am using  JSONPath Existence Match Assertion on an array and I noticed that it always evaluates to true. This is my expression and no matter which custom property I use inside the conditio...
  • Lucian's avatar
    Lucian
    7 years ago

    It looks like a bug. I also tested this on the PRO version and it is not reproducible there. 

     

    You could also use a JSONPath RegEx Match Configuration. The JSONPath Expression can stay the same. You will only have to add a regular expression like:

     

    \[.+\]

     

    Then you can set the expected results to 'true'.

     

     

    You will notice then that if the id doesn't exist the assertion will fail.

     

    Cheers!