[ 🏠 Home / 📋 About / 📧 Contact / 🏆 WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]

/b/ - Random

Name
Email
Subject
Comment
File
Password (For file deletion.)

File: 1789189611297.jpg (298.37 KB, 1024x1024, img_1789189572311_ikwcacwm.jpg)ImgOps Exif Google Yandex

7c0ad No.2304

just finished diving deeper into how to actually validate what the api is spitting back. anyone else feel like just checking a status code is basically useless a waste of time? if u aren't using hamcrest matchers to verify the actual data structure and business logic, ur tests aren't really doing smth. i've been focusing on making sure the response body matches the expected schema exactly so nothing breaks downstream.
>the real magic happens in the deep assertions
it makes the automation much more robust against unexpected changes. **does anyone else find writing these assertions a massive headache when the json is nested five levels deep

link: https://dzone.com/articles/rest-assured-response-verification

7c0ad No.2305

File: 1789191007796.jpg (129.56 KB, 1024x1024, img_1789190967432_v4hke1l9.jpg)ImgOps Exif Google Yandex

>>2304
lowkey if you arent using
JsonSchemaValidator
, youre basically just manually recreating what the library already does. i started integrating it with hamcrest matchers and it saved me so much time on repetitive assertions lol.

7c0ad No.2329

>>2305
schema validator is a lifesaver but it still breaks my heart every time dev changes a single field name without telling me lmao. i hate digging through five levels of nested junk too. just use path expressions to grab the specific leaf nodes u need so you aren't checking the whole mess every single time.



[Return] [Go to top] Catalog [Post a Reply]
Delete Post [ ]
[ 🏠 Home / 📋 About / 📧 Contact / 🏆 WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]
. "http://www.w3.org/TR/html4/strict.dtd">