cancel
Showing results for 
Search instead for 
Did you mean: 

ReadyAPI response appending zeroes after decimal and also printing fields values as hexadecimal

Contributor

ReadyAPI response appending zeroes after decimal and also printing fields values as hexadecimal

Hi I am running a Rest API in both ReadyAPI (pro version of SoapUI) and also in postman. The response pattern in json in postman valid while in ReadyAPI for some fields zeroes are appended after decimal value even for a integer type field like for example 

"PackSize": 60 (this is in postman which is right)

"PackSize" : 60.0000000000000000 (this is in ReadyAPI response which is incorrect)

 

Also for some fields values are returned as hex decimal pattern for example 

"PrivateTax" : 0E-16 (this is in ReadyAPI which is incorrect)

"PrivateTax": 0(this is in postman which is right)

 

I have attached json files of the responses in both postman and ReadyAPI for your reference. Am I missing any setting in ReadyAPI which is causing this issue

The version of ReadyAPI I am using is ReadyAPI 2.3.0

Build Date: 2018-03-06T16:28:42Z(433)

 

cheers,

Bharadwaj

12 REPLIES 12
Community Hero

Re: ReadyAPI response appending zeroes after decimal and also printing fields values as hexadecimal

It works just fine for me.

 

2018-03-27_08h28_20.png

 

But how do you get your response? Where do you look for it? Is it in a groovy script? Is it in the JSON response tab? And what kind of request are you making? Is it a POST HTTP Request? Could you give more details? I am curious about this.



If my answer helped please click on the 'Accept as Solution' button.
Contributor

Re: ReadyAPI response appending zeroes after decimal and also printing fields values as hexadecimal

Hi Lucian
Its a Rest API Call which does a http Get and I am looking the response in the JSON response tab as well as in groovy script and its the same at both places.
Cheers
Bharadwaj
Community Hero

Re: ReadyAPI response appending zeroes after decimal and also printing fields values as hexadecimal

Maybe it's a bug? It works fine for me. I don't see why there would be a property to convert your JSON response to hexadecimal. 



If my answer helped please click on the 'Accept as Solution' button.
Contributor

Re: ReadyAPI response appending zeroes after decimal and also printing fields values as hexadecimal

Hi,
I haven't used any properties its a simple RestAPI get call. If you notice the outcome of both postman and ReadyAPI(2 attached files) you will notice the difference in output. I am not sure why this should happen. In your comment you mentioned you got the same output. Sorry I couldnot understand how you executed the rest API endpoint.
Community Hero

Re: ReadyAPI response appending zeroes after decimal and also printing fields values as hexadecimal

I created a mock service with the JSON you posted. This is how I could test it. Maybe just ask for smart bear support?



If my answer helped please click on the 'Accept as Solution' button.
Contributor

Re: ReadyAPI response appending zeroes after decimal and also printing fields values as hexadecimal

Hi,

I am attaching the screenshots of API called in Postman and ReadyAPI. they both are exactly the same API's with same input parameters,exactly same environments and no extra logic has been applied in either of them. Has anyone had this kind of experience before or am I missing any setup in ReadyAPI which is causing this. Can someone please share some knowledge.

 

cheers,

Bharadwaj.

Highlighted
Community Hero

Re: ReadyAPI response appending zeroes after decimal and also printing fields values as hexadecimal

I am not sure if there's a setting that directly controls this, but I've seen similar issues where ReadyAPI will pretty-print or format a response. If you inspect the RAW of the response, is it still the same?




---

Click the Accept as Solution button if my answer has helped, and remember to give kudos where appropriate too!
Community Hero

Re: ReadyAPI response appending zeroes after decimal and also printing fields values as hexadecimal

Couple of things :
1. Do you see this issue with latest version only? Was it working find in earlier version?

2. Try to submit a case with SmartBear Customer care to address it quick

https://support.smartbear.com

3. If you are getting issue while comparing (in assertions) because of the above? If so, then you can parse both the values (actual and expected ) to specific data type before compare.


Regards,
Rao.
New Contributor

Re: ReadyAPI response appending zeroes after decimal and also printing fields values as hexadecimal

I am experiencing the same issue after installing 2.3 last week.  I am using a simple built in assertion on the response, comparing to the expected result stored in SQL DB. I have both 2.2 and 2.3 installed so can easily run the same test in both to see the different assertion result; success in 2.2 and failure in 2.3.  I have opened a support case.  But has anyone already successfully resolved this?