Forum Discussion

Yelena's avatar
Yelena
Occasional Contributor
7 years ago

ReadyAPI 2.5 - Content assertions with values that contain single quotes are always failing

After upgrade to 2.5 all my assertions that had values with single quotes are always failing. 

 

I tried the following with no luck:

 - recreating the assertion

 - get value from the test (was thinking maybe there are some invisible characters or spaces)

 

Assertion is failing with the message:

-> Comparison failed. Path: [my path (JSON)]; Expected value: [my 'value' not found]; Actual value: [my 'value' not found].

 

P.S. Using wildcard to remove single quotes is the only thing that works as a workaround.

 

 

  • I opened a support ticket with Smartbear and they were able to reproduce the issue. It was forwarded to R&D team.

     

  • update from our developers:

    "It seems that in ReadyAPI 2.5.0, the Expected Result is now parsed as a JSON object, so in order to use special characters such as quotes, they will need to be escaped if they are part of a string value. 

    That said, please change your Expected Result to the following and let me know if that works for you:  \'yourValue\'."

     

     

  • Radford's avatar
    Radford
    Super Contributor

    If there is nothing in the release notes to state that something has changed I think it is safe to assume it should work as before, therefore I would raise a issue with SmartBear support:

     

    https://support.smartbear.com/message/?prod=ReadyAPI

     

    If there is a bug you can ask them to release a fix in the maintenance builds. When I have upgraded in the past I have had to get various bugs fixed and release in a maintenance build.

     

    If you have found a bug (and get a fix) please reply back here and let us know.

     

     

    • Flo's avatar
      Flo
      Contributor

      Hello. Four your information I had the exact same issue. I roolback in 2.4.0. I will wait for maintenance build, I hope

      • Yelena's avatar
        Yelena
        Occasional Contributor

        I opened a support ticket with Smartbear and they were able to reproduce the issue. It was forwarded to R&D team.