JSON Path Match Assertion - To compare the decimal values (.0)
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2018
09:34 PM
12-18-2018
09:34 PM
JSON Path Match Assertion - To compare the decimal values (.0)
Hi,
I am using the JSON Path Match Assertion to match the response value with my excel (Data Driven). I am using data driven (Data Source excel) having all Inputs and Outputs (expected result). Now in API response i want o compare the Value with my Excel value.(Expected output)
Problem is, say in response value is 1344.0 but in excel value is 1344 so it fails (snapshot attached). So please help how to handle it in assertion (Asset for content > JSON Path Expression) editor so that it compare the response value 1344.0 (or 134.00) with excel value 1344 and pass it
1 REPLY 1
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2018
11:42 PM
12-18-2018
11:42 PM
Hi @anagpal,
I think doing this in JSON path Match assertion is not possible, to achieve this you can write your own custom groovy code in script assertion. If you need help in that let me know.
Click "Accept as Solution" if my answer has helped,
Remember to give "Kudos" 🙂 ↓↓↓↓↓
Thanks and Regards,
Himanshu Tayal
