REST Assured Beginner Tutorial 10 | How to validate JSON Schema

preview_player
Показать описание
Step 1 : Create JSON Schema
Step 2 : Add JSON Schema file in classpath
Step 3 : Add Maven dependency for JSON Schema Validator
Step 4 : Create a new function to validate json response against schema
Step 5 : Run & Validate

#RestAssuredBeginnerTutorials
Every LIKE & SUBSCRIPTION gives me great motivation to keep working for you

You can support my mission for education by sharing this knowledge and helping as many people as you can

If my work has helped you, consider helping any animal near you, in any way you can.

________ ONLINE COURSES TO LEARN ________

------------ UI TESTING ------------

------------ API TESTING ------------

------------ MOBILE TESTING ------------

------------ CI | CD | DEVOPS ------------

-------------VIRTUALISATION-------------
------------ VERSION CONTROL SYSTEM ------------

------------ PERFORMANCE TESTING ------------

------------ PROGRAMMING ------------

------------ IDE ------------

------------ BUILD TOOLS ------------

------------ OTHERS ------------

----------- Connect with Raghav ------------

Please share this knowledge with everyone
If my work has helped you consider helping an animal near you in any ways you can

Never Stop Learning
Raghav
Рекомендации по теме
Комментарии
Автор

Your voice is so calming brother, I came here stressed and found everything is do-able 😇

bn
Автор

Raghav is Saint of Test automation.. Personally he is a awesome human being

krishnakumarkumar
Автор

awesome Raghav, very nice explanation. Thank you so much.

sureshgarine
Автор

Thanks for wonderful video explaining very simply.
In JMeter, this can be done using this Plugin, "ApacheJmeter Schema Assertion", right?

psinha
Автор

Thank you so much for this tutorial, Raghav

ahmedsamir
Автор

Hi Raghav bro, Thanks for your tutorials which helps me lot to improvise my skillsets. I've a doubt in Json Schema validation. In real time, we have multiple schema for each API, so do we need to create n number of schema.json under target folder with different names?? Also it's preferable/ gud practice method to validate the real time get api in frame work ? I'm gonna execute API automation in my project, so pls suggest me your valuable feedbacks.

prakashart
Автор

Raghav could you please record a video of HOW to combine using REST Assure with UI?

MD-imwu
Автор

Hi Ragav,

The local host api section really helpful to practice... Thanks for the video

saranyajothi
Автор

Very good explanation. One question. /target will get deleted when we use mvn clean ? Then how can we use schema valdiator ?

debarnabbanerjee
Автор

Si JSONSchema Validated sucessfully...Thank you...

MalluManish
Автор

Here you took response and using convertor you have generate the schema but what If we don't have response then how we are generating the schema. Are we creating manually by own.

vaishalikumari-oo
Автор

Hi Raghav, thanks for creating a series of simple and effective tutorials. I have a question, How can I execute services that require anonymous or password-type tokens.

anubhavtyagi
Автор

Hi Raghav,

Thank you for sharing your knowledge extensively in a calm understandable manner.

I have been trying to use the POJO class inorder to generate json body to the Request Payload.

But this looks tedious on multi level nested jsons, is there a way or library available, which can consider the json template and populate the data from either a csv file or xls . I tried to check online but couldnt get much info.

Ex: consider below as the template, with $variables could directly be replaced

{
"names":["firstname": "$fname", "lastname":"$lname"],
"personal":["Occup":{ "occ1":"$occvalue", "occ2":"$occvalue2" }]

}


csv file has
fname, lname, occvalue, occvalue2 etc
Raghav, Pal, value2, value3
James, Jim, value4, value5

johnlin
Автор

Nice Video Raghav. But U have a question. Why do we need to keep schema JSON in Target/Class path? T

praveenify
Автор

it was a great explanation but can we do soft assertions for validating json schema ? If yes how can we do that.

debanjandatta
Автор

very good tutorial dear. Keep up the good work.

rajivjindal
Автор

Nice job. How we can achieve this if we are using a non-bdd script?

ankitshrivastava
Автор

Hi Raghav, Thank you for this video. I am able to do schema validation as you explained in video. However, one of the API schema which I am working on, contains NaN value. I am not able to do schema validation due to NaN values. Please advise on how to resolve this issue.

swatipandharkar
Автор

Hi Raghav !!! can we get a tutorial on API Testing with the BDD framework using feature files, step definition files, and runner files, and kind-hearted is for your reply

harisake
Автор

Hi Raghav - Sir I am getting the "Schema to use cannot be null" exception because the json file is getting auto-cleaned up / deleted from the target folder. How to fix this?

rohitkd