Forum Discussion

anusha21's avatar
anusha21
Occasional Contributor
7 years ago

SOAPUI Json Response is not same as POSTMAN response OR Swagger response

HI all,

 

Please help me on this i am really sucked with my testing , i am performing negative testing on REST (POST) API,

 

I am using INPUT as below in SOAPUI and also I am using same input in POST man (see attachment for details) , but post man is returning the response what i am expecting but SOAP UI is returning invalid error message (which doesn't match with my expected result) so i am stuck in taking decision whether to pass my test case or not (please help me with this)

 

Thanks in advance

 

Regards

Anusha 

 

 

  • Try setting the Encoding property on your REST TestRequest properties to UTF-8.

     

    Then in your Raw request, you should see

     

    £

    change to

     

    £

    and that might help.

  • JHunt's avatar
    JHunt
    Community Hero

    Try setting the Encoding property on your REST TestRequest properties to UTF-8.

     

    Then in your Raw request, you should see

     

    £

    change to

     

    £

    and that might help.

    • anusha21's avatar
      anusha21
      Occasional Contributor

      Grt it did work, thanks a lot for your help 

  • PaulMS's avatar
    PaulMS
    Super Contributor

    Is there any difference between the Soap UI Request Raw tab and postman (like encoding of £ )?

    • anusha21's avatar
      anusha21
      Occasional Contributor

      No its all same (see below) , I felt like there is bug in SOAPUI as it is escaping some special characters where as in POST man and swagger are not 

       

      copied from SOAPUI Raw request section:

      POST http://xxxxxxxxxxxxxxxxxxxxxxxxxx HTTP/1.1
      Accept-Encoding: gzip,deflate
      Content-Type: application/json

      Content-Length: 99
      Host:xxxxxxxxxxxxxxxxxxxxxxxx
      Connection: Keep-Alive
      User-Agent: Apache-HttpClient/4.5.2 (Java/1.8.0_144)

      {
      "permissionName":"££APName111",
      "scopeObjectId": "£ASOID1231",
      "userId": "£AUID111"

      }