Forum Discussion

Ina-LookYong's avatar
Ina-LookYong
Occasional Contributor
6 years ago

JASONPass and XQuery "Allow Wildcards" checkbox isn't working in my assertions?

Hi, community. My assertions using Allow Wildcards checkbox for one of the TC are failed.  As you can see it on the screenshot I was expecting to see total =1578 in my TC the same as in JASON.  ...
  • richie's avatar
    6 years ago

    Hi Ina-LookYong 

     

    I'm a little confused, but I'll try and clarify.

     

    Point 1.  Your screenshot indicates you selected to include wildcards in your assertion expected results - but you haven't included a wildcard operator (e.g. *) so checking the 'Allow wildcards' tickbox won't do anything anyway....?

     

    Point 2.  You mention JSON in your title - but your assertion is using XPATH, not JSONPATH - so I'm guessing you're response is XML not JSON...??  You are displaying the Outline tab in your response - so I can't see whether it's json or xml - but the fact that you've created an assertion with an XPATH indicates the response is in XML, not JSON

     

    Point 3.  Are you trying to assert that the 'Total' value is '15' followed by any other digits?  if you wanted to use wildcards for this assertion the value would be '15*'

     

    Cheers,

     

    richie