Ask a Question

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

SOLVED
Ina-LookYong
Occasional Contributor

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. 

Did I miss something or I got it wrong how it supposed to work?

3 REPLIES 3
richie
Community Hero

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

 

 

if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
Ina-LookYong
Occasional Contributor

Hi @richie ,

 

Thank you. I knew that I did something not quite right. Cat Sad

Ina-LookYong
Occasional Contributor

Hi @richie 

Thank you for such a thorough solution. I appreciate it. It's working now 🙂 

P.S. I am very new to this that's why so simple things are not in my head yet, but i am learning Cat Embarassed

cancel
Showing results for 
Search instead for 
Did you mean: