Forum Discussion

fsamwel's avatar
fsamwel
Occasional Contributor
5 years ago
Solved

Quotes added in expected result for json

When taking the actual value to the Expected Result of a JSONPath Match assertion, SoapUI adds double quotes.

 

For example if response is:

{ "name": "John Doe" }

 

Then when the JSONPatch expression = $.name, clicking Select From Current will add "John Doe" (including the double quotes) to the expected Result box. Next clicking Test wil show the assertion failed. Thus I need to manually remove the quotes to make the assertion correct.

 

Same thing happens when creating the assertion from the response window using Add assertion>for content.

 

Am I doing anything wrong? Is there a setting to change this?

 

N.B. The open source version of SoapUI does this better as it fills the expected result without the quotes. Pro (I'm using SoapUI Pro 2.8.0) should be better than the freeware version, shouldn't it?

  • Hi fsamwel,

     

    I see that you worked with our Support Team. As far as I understand you couldn't reproduce the issue anymore. 

     

    Let's mark this question as solved. Please post the update if you see the issue again.

6 Replies

  • richie's avatar
    richie
    Community Hero

    Hi fsamwel 

     

    SoapUI Pro v2.8 is really, really, really old

     

    Yes you'd expect the Pro version to be more effective than the open source version - but what version of the open source are you actually comparing your Pro instance against?

     

    I think the latest open source version is about v5.5.0 - so if you're comparing a Pro version of software from I don't know - maybe 10 years ago against a reasonably new version of the open source - then surely you'd expect the open source version to be better!

     

    Cheers,

     

    rich

     

    • fsamwel's avatar
      fsamwel
      Occasional Contributor

      > SoapUI Pro v2.8 is really, really, really old

      Hi Rich, thanks for your response. I downloaded the update just Today, so think it's not that old. I'm actually using SoapUI Pro in ReadyAPI 2.8.0. Sorry for the confusion.

      • richie's avatar
        richie
        Community Hero

        Hi fsamwel

         

        ok - Im running v2.7.0 (I always wait for a while before upgrading to the latest version) and I've just tried reproducing what I think you've described - but I'm not seeing quote marks being inserted - please see screenshot of a JSONContent Match assertion

         

         

        The value was generated without quote marks when I hit 'assert' >> 'for content'

         

        I then selected 'from the current' button - but stiill no quote marks.

         

        can you provide a screenshot to explain?

         

        cheers

         

        rich