You see all these other tutorials, where people work on the project so easily using all the shortcuts and we are left wondering how did they do that. Only person I found who teaches shortcuts as well. Helped me a lot man.Thanks. Keep this amazing work up. (Y)
I found through your website in recent time. One of the best tutors I have seen. The videos/explanations are very clean and crisp. Very inspirational teacher you are and it gives positive vibes. My best wishes to you Sir, Great work!
Wow, finally found some great videos to start with RestAssured. Weldone Raghav!!! Very detaiks explanations and all required prerequisites are also mentuoned clearly and precisely. Thanks a lot !!!! I may have some doubts after starting work on this. Can you pleae elet me know how can I rechout to you for my queries. 😊
My pleasure Shakti Whenever you face any issues or have any ques, write in the comment section of that video.. like you did here. I read and reply to all comments
On this date Mon Feb 15, 2021, I have interview in the freecharge company (Software Development Engineer In Test) so It's really really helpful for me. thank you so much😍
I am so happy to know this Kapil, All the Best. Take care of following things 1. Talk politely, take pauses, keep your volume and tone medium, not too low not too high 2. If asked or whenever you find the right opportunity discuss about your past exp on how you worked in teams, how you helped your team mates. How you handled team projects 3. Keep the general questions ready, I talked about it in this video ua-cam.com/video/Wp40YePeTUA/v-deo.html like - Tell me a little about yourself - About your work, project, past, experience 4. Whenever asked about your last or earlier companies, always be +ve, don't say anything bad about your earlier jobs or places 5. When asked how do you see yourself in future, 5 yrs from now - Say I look myself handling imp projects, helping my teams grow, I see myself more skilled and exp in my domain, 6. Now there can be some tricky questions like do you like Java or Python OR do you prefer Selenium over some xyz tool. Now here, in case you have worked with one of the options more than the other you can safely say that, I have worked more with Java and I really like it but as of now, did not get many opportunities to work with Python, but will love to have options to work on it in future. If you have worked with both or all options again you can say that I was fortunate to have worked with both of these..., Although it will be difficult to choose one among them, Still if I have to I will go with xyz as I have worked more on this. Basically you should not just criticise any tool or tech Be confident Raghav
Great videos and so easily explained by you. Am not seeing any videos on TestNG specifically... if there is, please provide the link ...Thanks a lot!!!!
@@RaghavPal Anyway, why when I import this import static io.restassured.matcher.RestAssuredMatchers.*; import static org.hamcrest.Matchers.*; those unrecognised. It's grey. Im using intellij and gradle
Hi Meenakshi This playlist - ua-cam.com/play/PLhW3qG5bs-L8xPrBwDv66cTMlFNeUPdJx.html has single videos per topic And this - ua-cam.com/play/PLhW3qG5bs-L8dDZPP1tpQldU4tzZdPfRv.html has multiple topics covered in single videos You can learn from may of these
Hi Raghav, I have a question, As there are a lot of API Testing Tools like POSTMAN, SOAP UI, and all. Are testers use all of them in testing the APIs? and Similar question for mobile testing as well
Hi Gazal, In an organization, testers usually use one of these. It can be an organizational or team choice based on what works best for them and same goes for Mobile testing.
Thankyou so much for your work. You are providing a great service to all of us by not only by imparting your knowledge but trying to give better lives for all of us. God Bless you and your family.
Excellent videos bro love it.❤. Being a beginner in Automation , what tools/coding language I should be learning first ? I mean alongside REST api what else I should strat learning? We are using sdwan orchestration in our day today work and there is room for automation. So please suggest a good combination of tools/languages I can start for my automation
Hi Yusuf, As a beginner in automation, it is a good idea to start with the basics of programming and then move on to automation tools and technologies. Here are some tools and languages you can start with: Programming languages: Start with learning a programming language such as Java, Python, or JavaScript. Java is a popular language for automation as many automation tools such as Selenium, Appium, and TestNG are written in Java. Python is also a great language for automation and has many libraries and frameworks for automation such as PyTest and Robot Framework. JavaScript is used for automation with tools such as Playwright and Cypress. Automation frameworks: Once you have a good understanding of programming, you can start learning automation frameworks such as Selenium WebDriver or Appium for web and mobile automation respectively. These frameworks are widely used in the industry and have a large community of users who can provide support and resources. API testing tools: Since you mentioned REST API, you can also start learning API testing tools such as Postman, Rest-Assured, or Karate. These tools can help you automate the testing of REST APIs and make your testing more efficient. SD-WAN orchestration: For SD-WAN orchestration, you can start by learning the basics of networking and SD-WAN. You can then explore automation tools such as Ansible or Terraform that can help you automate the deployment and management of SD-WAN infrastructure. Overall, it's important to focus on learning the fundamentals of programming and then move on to learning automation tools and technologies that are relevant to your work. Start small and gradually build up your skills and knowledge as you gain more experience.
Very Detailed and amazing content. Thanks for posting this video. It will be very helpful for any Restassured Interview Questions. Again, Thanks a lot.
Very nice video. Your website is very helpful and in sync with what automation testers want at a place. Much thanks. Subscribed. Keep it up. You can further add a QnA forum to it.
The quality of this video is very good...but I must ask...why are we doing all of this when we can just use Python and the very user friendly requests library to accomplish all of this?
@@RaghavPal Thank you for the reply, sir. I thought about it after asking, and I realized it was a stupid question. I can also see that Rest Assured provides a lot of automation options and built-in functionality. I am looking forward to seeing how to use it to create my own local server with API responses to be used for testing. So far, I have been using Docker and Flask to do this...I wonder if I can use Rest Assured to more easily create a local server for API testing, and then use Python to test responses?
Thanks for the great tutorial! I'm having a small problem you might be able to shed some light into. I'm trying to test an api that i'm locally hosting, i have the problem that the test are running before the API gets deployed by the ide, so as expected all test fails. How do you make it so the ide deploys the .war first and then run the tests? I'm running netbeans in this case.
Hi Germán, f you're using NetBeans, you can try configuring the build process to deploy the .war file first and then run the tests. Here's how you can do it: Right-click on the project in NetBeans and select "Properties". In the "Project Properties" window, select the "Build" category. In the "Build" section, click on the "Post-Build Command" option. In the "Post-Build Command" field, enter the command to deploy the .war file to your local server. For example, if you're using Apache Tomcat, you might enter a command like the following: cd $CATALINA_BASE/bin sh shutdown.sh sh startup.sh Click "OK" to save the changes. In the "Project Properties" window, select the "Run" category. In the "Run" section, select the "Run Test(s)" option. In the "Test Task" field, enter the command to run your tests using Rest Assured. For example: mvn test Click "OK" to save the changes. Now, when you build the project in NetBeans, it will first deploy the .war file to your local server and then run the tests using Rest Assured. You should be able to see the results of the tests in the NetBeans output window.
Hi Raghav... I was successfully able to create a maven project but on my POM.xml an error was comming " Failure to transfer org.apache.maven.plugins:maven-surefire-plugin:pom:2.12.4 " Regarding the same I hv performed below actions but this not change anything in pom Right click on project -- Run (as) Maven clean n then Right click on project -- Run (as) Maven install.. N build was failed Maven version installed in my machine is - Apache Maven 3.3.9 Java Version is 1.8.0 Eclipse is Mars Even I added two dependencies as well into pom.xml which were testng and extentreports I have restarted my system as well but it's showing the same error while for rest of my earlier maven projects pop.xml is doing good Please suggest
Hi Ravi, did you try Maven > Force update I believe you may already have seen this stackoverflow.com/questions/25447590/maven-error-in-eclipse-pom-xml-failure-to-transfer-org-apache-maven-plugins Also try stackoverflow.com/questions/25447590/maven-error-in-eclipse-pom-xml-failure-to-transfer-org-apache-maven-plugins/48728149 stackoverflow.com/questions/5074063/maven-error-failure-to-transfer
Hi, I want to learn automation , i do not have any idea about any CI/CD tool.. just have core Java knowledge. I am finding this session will be helpful as well.Please Guide me about other sessions that i can go through.
I wanted to know how restassured calls work with TestNg, for example we have multiple restassured calls in the same @test annotation method I wanted to know which is calling first second like that
@@RaghavPal . I have seen a lot of videos like naveen, mukesh regarding rest assured api but i feel your content and your explanations is better than theirs. why dont you put all the content and kee pon updating in udemy. you will nail the market.
Good videos, Raghav. Can rest assured be used for dotnet microservices? Is coding need to be done in java only or can it be done in c#? Which one is more beneficial?
Thank you for these videos One question How we can read and write the PUT API XML data The thing is in the XML body I have to update the attribute with respective data.
Hi Tima, Rest Assured is a java library, as we can create a java project in VS Code, we can also create Rest Assured framework in VS Code, I have not done it yet, you can try finding some tutorials on this
I just have a question, in a single record (for example) in id 7 we want to check the id as well as the first name or multiple elements, how can we do that?
Hi Mustafa In Rest Assured, you can use the assertThat() method along with Matchers to validate multiple fields in a single record. Here's an example: Let's say you have a REST API endpoint that returns a JSON response with the following structure: { "id": 7, "firstName": "John", "lastName": "Doe", "email": "john.doe@example.com" } To validate both the id and firstName fields in this response, you can use the following code: import static io.restassured.RestAssured.*; import static org.hamcrest.Matchers.*; given() .when() .get("/users/7") .then() .assertThat() .body("id", equalTo(7)) .body("firstName", equalTo("John")); Here, the equalTo() method is used to validate the value of each field. The body() method is used to specify the field name in the JSON response. You can add as many body() assertions as you need to validate multiple fields. If any assertion fails, the test will fail and an error message will be displayed indicating which assertion failed.
To fetch the token from the response headers in Rest Assured, you can use the following steps: 1. Get the response headers. 2. Get the token header value. 3. Extract the token from the header value. *Step 1: Get the response headers.* To get the response headers, you can use the `getHeaders()` method. This method returns a `Headers` object that contains all of the response headers. ```java Headers headers = response.getHeaders(); ``` *Step 2: Get the token header value.* To get the token header value, you can use the `getHeader()` method. This method takes the name of the header as a parameter and returns the value of the header. ```java String tokenHeaderValue = headers.getHeader("Authorization"); ``` **Step 3: Extract the token from the header value.** The token header value is typically in the following format: ``` Bearer ``` To extract the token from the header value, you can use the `substring()` method. This method takes the start index and the end index as parameters and returns a substring of the string. ```java String token = tokenHeaderValue.substring(7); ``` **Example:** The following code shows how to fetch the token from the response headers in Rest Assured: ```java import com.jayway.restassured.RestAssured; import com.jayway.restassured.response.Headers; import com.jayway.restassured.response.Response; public class FetchTokenFromResponseHeaders { public static void main(String[] args) { // Make a GET request to the server. Response response = RestAssured.get("example.com/api/token"); // Get the response headers. Headers headers = response.getHeaders(); // Get the token header value. String tokenHeaderValue = headers.getHeader("Authorization"); // Extract the token from the header value. String token = tokenHeaderValue.substring(7); // Print the token. System.out.println(token); } } ``` This code will print the token to the console.
Hi, I have used one json file for request body for my rest assured project. But I want pass some parameter from my framework into the json. Or r u have any other way to pass parameter to my request body. This is my project need. Can u plz suggest any idea.
Hello, Raghav I am totoaly new in IT .I want to learn Automation tool so what can I do and In REST Assured how can I know that how many Dependency we need ? Plese advice me Thank you
Hi Raghav Sir, one request to you . Can you please make one framework using Intellij, Gradle, Junit with BDD cucumber framework which is integrated with Jenkins and GIT. No video has been done and available in youtube with this combination
I have payload { "authorized users": [ { " first name" :" john", "last name":" kesly" } ] } Map arr=new LinkedHashMap(); arr.put("first name","john"); arr.put("last name","kesly"); Map body=new LinkedHashMap(); body.put("authorized users",arr); given().contentType("application/json").body(body); When I hit this I am getting error { "reason": Invalid type: object (expected array)" } How to resolve this issue? In this case how to convert map into array ? How to write a code for this ? Can you please help me on this ?
Yes Anantha If you follow these with hands-on, you can work on any Rest Assured project. There will be some new things you will face specific to your project needs as you will progress, but you will be able to handle with this foundation
hey Raghav, getting below error java.lang.SecurityException: class "org.hamcrest.Matchers"'s signer information does not match signer information of other classes in the same package
Hi Anurag, I found this online - The hamcrest.jar needs to go before the Junit library in the build path. You can check all options here stackoverflow.com/questions/9651784/hamcrest-tests-always-fail
@@RaghavPal sure, Thank you so much POSTMAN Beginner Tutorials - www.youtube.com/watch?v=juldr... It's really good and helped me to understand the topic Thanks again
@Raghav Pal : Thank you very much for the detailed explanation. Awesome explanation with details and short cuts. I want to learn all these shortcuts. Thanks
You see all these other tutorials, where people work on the project so easily using all the shortcuts and we are left wondering how did they do that. Only person I found who teaches shortcuts as well. Helped me a lot man.Thanks. Keep this amazing work up. (Y)
Most welcome Vivek
Raghav, simply superb. You've kept everything that is required to get started in one video and saved so much time.
so happy to know this Kalyan
I found through your website in recent time. One of the best tutors I have seen. The videos/explanations are very clean and crisp. Very inspirational teacher you are and it gives positive vibes. My best wishes to you Sir, Great work!
Thanks a lot for your kind words Soumya
This was a phenomenal intro to Rest Assured API. Thank you so much for breaking this down so well for all of us to understand!
Glad it was helpful!
Cant describe your effort for us.you are preparing video at 2:23 AM at deep night .Thank you so much Raghav
Most welcome Satyam
You are exceptional Raghav, May God Bless you!!
You recorded this in the mid night at around ~2AM oh man!!!!
Thanks a ton Bhanu
@@RaghavPal isnt that the time from the windows VM and the actual of recording is early morning 7:30 am
I am so glad I found your channel and webpage! Thanks a million!
Most welcome Marija
Teaching can never be more clear, God bless you for sharing us your knowledge
You are very welcome Subash
You are a gem ! Telling all the micro level things shows how much knowledge you have.
So happy to see your message Aakash
@@RaghavPal you are seriously a "GEM".
Wow, finally found some great videos to start with RestAssured. Weldone Raghav!!! Very detaiks explanations and all required prerequisites are also mentuoned clearly and precisely. Thanks a lot !!!! I may have some doubts after starting work on this. Can you pleae elet me know how can I rechout to you for my queries. 😊
My pleasure Shakti
Whenever you face any issues or have any ques, write in the comment section of that video.. like you did here. I read and reply to all comments
You are amazing, God bless you for taking your time and educating us !
You are so welcome Abdus
@@RaghavPal Thank you Sir, lv u 3000
Let Jesus give you all what's good!
Recalled all from this video testng java eclipse RA maven
Thank you for great teaching style.
Keep uploading
Great to know this Sudheesh
Even a blind can learn coding with your illustration 🤝, Kudos Raghav
Thanks Karun, humbled
YOU ARE THE BEST TUTOR EVER IN THIS WORLD
Thanks a lot Ian, humbled
Here from Argentina watching all your videos! Thanks a lot for sharing your knowledge
Most Welcome Franco
1st lecture in youtube i got interest in api automation...thank u bro
Glad to hear that Shreyash
On this date Mon Feb 15, 2021, I have interview in the freecharge company (Software Development Engineer In Test) so It's really really helpful for me. thank you so much😍
I am so happy to know this Kapil, All the Best.
Take care of following things
1. Talk politely, take pauses, keep your volume and tone medium, not too low not too high
2. If asked or whenever you find the right opportunity discuss about your past exp on how you worked in teams, how you helped your team mates. How you handled team projects
3. Keep the general questions ready, I talked about it in this video ua-cam.com/video/Wp40YePeTUA/v-deo.html like
- Tell me a little about yourself
- About your work, project, past, experience
4. Whenever asked about your last or earlier companies, always be +ve, don't say anything bad about your earlier jobs or places
5. When asked how do you see yourself in future, 5 yrs from now - Say I look myself handling imp projects, helping my teams grow, I see myself more skilled and exp in my domain,
6. Now there can be some tricky questions like do you like Java or Python OR do you prefer Selenium over some xyz tool. Now here, in case you have worked with one of the options more than the other you can safely say that, I have worked more with Java and I really like it but as of now, did not get many opportunities to work with Python, but will love to have options to work on it in future.
If you have worked with both or all options again you can say that I was fortunate to have worked with both of these..., Although it will be difficult to choose one among them, Still if I have to I will go with xyz as I have worked more on this.
Basically you should not just criticise any tool or tech
Be confident
Raghav
Exactly what I needed to refresh my memory before the interview. Thank you
Most welcome Kostiantyn
U are explaining each and every point.. And also ur providing required notes 📝 in the video description .. 💯👏👍
Hope it helped Ilavarasan
Great videos and so easily explained by you. Am not seeing any videos on TestNG specifically... if there is, please provide the link ...Thanks a lot!!!!
Sujata
Thanks, can check more here - automationstepbystep.com/
Hi Raghav , I am new to this automation world, however the way you make it a piece of cake, is great. I am looking much from your classes
Thanks
So happy to know this Saten, You can find more here - automationstepbystep.com/. All the best
the only video which cleared all concept in youtube.. thankyou
Happy to know Satyam
Thankyou so much sir for detailed explanation of each and every concept..🙏
Most welcome
This is the best way i can say..Keep uploading. As i go on watching your videos i became fan of yours sir. Thank you.
So happy & humbled to know this Sudhanshu
Very detailed and helpful. Along with the setup, you have also shown a lot of other shorcuts in eclipse. Vry helpful. Thank you..
Most welcome Amrita,
So detailed,, even give a way if don't have the tool yet. Like java and IDE. BIG THANKS ❤️
Most welcome Frista
@@RaghavPal Anyway, why when I import this import static io.restassured.matcher.RestAssuredMatchers.*;
import static org.hamcrest.Matchers.*; those unrecognised. It's grey. Im using intellij and gradle
just phenomenal , easy to get started everything with clear picture
Happy to know this
Bro . I am the tech lead for a java restful backend project . Can we use this with junit . Is there only one video you made on this🤔🤔
these are the only videos of Rest Assured I have for now
You have mentioned two playlist for Rest assured. Can you clarify whether they both are same or different?
Hi Meenakshi
This playlist - ua-cam.com/play/PLhW3qG5bs-L8xPrBwDv66cTMlFNeUPdJx.html
has single videos per topic
And this - ua-cam.com/play/PLhW3qG5bs-L8dDZPP1tpQldU4tzZdPfRv.html
has multiple topics covered in single videos
You can learn from may of these
Hi Raghav, I have a question, As there are a lot of API Testing Tools like POSTMAN, SOAP UI, and all. Are testers use all of them in testing the APIs? and Similar question for mobile testing as well
Hi Gazal, In an organization, testers usually use one of these. It can be an organizational or team choice based on what works best for them and same goes for Mobile testing.
amazing tutorial. i like background peacock sound... is it real peacock around you area ?
Yes, thanks
You are a blessing Mr Pal. You are the Virat Kholi of mentors.. the best ever
Humbled to see your message Mzamo
You are Awesome. God bless you.. luv from USA
Thanks
teaching style outstanding 😍
Thanks Ranjeet
Thankyou so much for your work. You are providing a great service to all of us by not only by imparting your knowledge but trying to give better lives for all of us. God Bless you and your family.
You are very welcome Ramya
Thanks for your videos its easily understandable and doable.. your explanation is very clear and telling explaining From scratch
You are most welcome Devi
hi raghav , are you gonna add more videos or those 5 videos of rest assure are good enough ??
I will do Ahmed
Excellent videos bro love it.❤. Being a beginner in Automation , what tools/coding language I should be learning first ? I mean alongside REST api what else I should strat learning? We are using sdwan orchestration in our day today work and there is room for automation. So please suggest a good combination of tools/languages I can start for my automation
Hi Yusuf,
As a beginner in automation, it is a good idea to start with the basics of programming and then move on to automation tools and technologies. Here are some tools and languages you can start with:
Programming languages: Start with learning a programming language such as Java, Python, or JavaScript. Java is a popular language for automation as many automation tools such as Selenium, Appium, and TestNG are written in Java. Python is also a great language for automation and has many libraries and frameworks for automation such as PyTest and Robot Framework. JavaScript is used for automation with tools such as Playwright and Cypress.
Automation frameworks: Once you have a good understanding of programming, you can start learning automation frameworks such as Selenium WebDriver or Appium for web and mobile automation respectively. These frameworks are widely used in the industry and have a large community of users who can provide support and resources.
API testing tools: Since you mentioned REST API, you can also start learning API testing tools such as Postman, Rest-Assured, or Karate. These tools can help you automate the testing of REST APIs and make your testing more efficient.
SD-WAN orchestration: For SD-WAN orchestration, you can start by learning the basics of networking and SD-WAN. You can then explore automation tools such as Ansible or Terraform that can help you automate the deployment and management of SD-WAN infrastructure.
Overall, it's important to focus on learning the fundamentals of programming and then move on to learning automation tools and technologies that are relevant to your work. Start small and gradually build up your skills and knowledge as you gain more experience.
Very nice Raghav. great work.
Thanks a ton
Raghav !! Your voice is superb . the way you deliver your content it's amazing !!!
Thank you so much 😀
Seriously...very good explaination Raghav...Thanks a lot.
You're most welcome Sandesh
Very Detailed and amazing content. Thanks for posting this video. It will be very helpful for any Restassured Interview Questions. Again, Thanks a lot.
Hi Simranjit, i will do
Raghav you are just awesome. Your videos are so understanding.
Glad to hear that Sean
Thank you! Question: Why are you stick to the Eclipse? I see guys from India generally using Eclipse.
Hi, I 've been using Eclipse since start, But will add session on IntelliJ as well
@@RaghavPal I just interested.
Hi Raghav, very nice. Thank you! Just one thing do you have Rest assured with cucumber bdd videos anywhere? If yes, please share the link.
Hi Mukta, not yet with cucumber bdd, I will do in some time, You can get all here - automationstepbystep.com/
Automation Step by Step - Raghav Pal sure,thanks Raghav! I will keep a check.
Very nice video. Your website is very helpful and in sync with what automation testers want at a place. Much thanks. Subscribed. Keep it up. You can further add a QnA forum to it.
Sure Vinay. All the best
The quality of this video is very good...but I must ask...why are we doing all of this when we can just use Python and the very user friendly requests library to accomplish all of this?
Hi, REST assured is a very popular and widely used library for Java and there were many requests to create this series
@@RaghavPal Thank you for the reply, sir. I thought about it after asking, and I realized it was a stupid question. I can also see that Rest Assured provides a lot of automation options and built-in functionality. I am looking forward to seeing how to use it to create my own local server with API responses to be used for testing. So far, I have been using Docker and Flask to do this...I wonder if I can use Rest Assured to more easily create a local server for API testing, and then use Python to test responses?
I will have more sessions on this
Best 👍. Awesome teaching and best technical teaching.
Thanks a ton
Simple, interesting... Good to learn from ur videos
Thanks Gayathri
Thanks for the great tutorial!
I'm having a small problem you might be able to shed some light into.
I'm trying to test an api that i'm locally hosting, i have the problem that the test are running before the API gets deployed by the ide, so as expected all test fails. How do you make it so the ide deploys the .war first and then run the tests? I'm running netbeans in this case.
Hi Germán,
f you're using NetBeans, you can try configuring the build process to deploy the .war file first and then run the tests. Here's how you can do it:
Right-click on the project in NetBeans and select "Properties".
In the "Project Properties" window, select the "Build" category.
In the "Build" section, click on the "Post-Build Command" option.
In the "Post-Build Command" field, enter the command to deploy the .war file to your local server. For example, if you're using Apache Tomcat, you might enter a command like the following:
cd $CATALINA_BASE/bin
sh shutdown.sh
sh startup.sh
Click "OK" to save the changes.
In the "Project Properties" window, select the "Run" category.
In the "Run" section, select the "Run Test(s)" option.
In the "Test Task" field, enter the command to run your tests using Rest Assured. For example:
mvn test
Click "OK" to save the changes.
Now, when you build the project in NetBeans, it will first deploy the .war file to your local server and then run the tests using Rest Assured. You should be able to see the results of the tests in the NetBeans output window.
Wonderful steps and explanation
Thanks
I have little understanding of webdriver UI automation.. Can I watch this series to automate apis? Or do I need to have any other prior knowledge?
You can watch this from 1st video
Hi Raghav... I was successfully able to create a maven project but on my POM.xml an error was comming
" Failure to transfer org.apache.maven.plugins:maven-surefire-plugin:pom:2.12.4 "
Regarding the same I hv performed below actions but this not change anything in pom
Right click on project -- Run (as) Maven clean n then
Right click on project -- Run (as) Maven install..
N build was failed
Maven version installed in my machine is - Apache Maven 3.3.9
Java Version is 1.8.0
Eclipse is Mars
Even I added two dependencies as well into pom.xml which were testng and extentreports
I have restarted my system as well but it's showing the same error while for rest of my earlier maven projects pop.xml is doing good
Please suggest
Hi Ravi, did you try Maven > Force update
I believe you may already have seen this
stackoverflow.com/questions/25447590/maven-error-in-eclipse-pom-xml-failure-to-transfer-org-apache-maven-plugins
Also try
stackoverflow.com/questions/25447590/maven-error-in-eclipse-pom-xml-failure-to-transfer-org-apache-maven-plugins/48728149
stackoverflow.com/questions/5074063/maven-error-failure-to-transfer
Hi Raghav
Do you have tutorial for API creation?
I have got API testing tutorial but not API creation.
Priyanka
Can check these ua-cam.com/play/PLhW3qG5bs-L_dJ0YvpKE0m-VK6WRsXDTp.html
Hi Raghav. What is that tool you are using to draw red rectangles around parts of the screen you want to highlight?
Its mac tools Jay
Hi, I want to learn automation , i do not have any idea about any CI/CD tool.. just have core Java knowledge. I am finding this session will be helpful as well.Please Guide me about other sessions that i can go through.
Hi Ruchi, you are ready to start learning Automation. You can select the topics from here as per your need - automationstepbystep.com/
Sir i don't have any java knowledge can i still learn rest assured
Yes, you can, just get started on it and learn the concepts wherever needed, this is how I learn
This is a great tutorial. I was able to setup the framework within minutes. Thanks for this.
Glad it helped!
I wanted to know how restassured calls work with TestNg, for example we have multiple restassured calls in the same @test annotation method I wanted to know which is calling first second like that
I will try to do a session Swathi, for now can try if any info is available online
Very Helpful sir, are there peacocks around you or is it cats?
Yes, many
Thanks a lot
Great work! Keep on
Wish you the best
Most welcome
Raghav i must say u teach better than many other like rahul shetty you should get on udemy
Humbled to see your message. I am on Udemy, will add more courses
@@RaghavPal . I have seen a lot of videos like naveen, mukesh regarding rest assured api but i feel your content and your explanations is better than theirs. why dont you put all the content and kee pon updating in udemy. you will nail the market.
hi Raghav ,
worth watching .
Facing on issue. using equalTo in second test case is giving syntax error . can you tell which inbuit class it belongs
Hi Prerna, status code is integer. if you need to compare as String can convert it using .toString()
TestNG can also be added from Eclipse Market place. Any specific reason you dint mention that?
nothing specific, you can try that
From Seattle, WA, Thank you :)
Awesome explanation... Thank you so much Raghav :)
Glad you liked it
Very nice explanation..Thanks a lot sir.. god bleas u.
You're most welcome Sandeep
Can you please makes some clarification on using the END POINTS
Hi Jerin, you can watch my API basic playlist here - automationstepbystep.com/
Excellent Job.. Your way of teaching is really appreciable. Thanks for helping.
Most welcome Preeti
Thank you so much for explaining in detail..
Glad it was helpful Tejas
It is very easy to understand...awesome video
Glad to hear that Suvarna
Hey Raghav .... Can you please tell me what is the difference b/w oauth 1.0 and oauth 2.0
Hi Himani, for starting you can read the Story of OAuth here - automationstepbystep.com/stories/
I will plan a more detailed session too
Good videos, Raghav.
Can rest assured be used for dotnet microservices? Is coding need to be done in java only or can it be done in c#? Which one is more beneficial?
Hi Ritesh, you can use Rest Assured for testing any APIs, it is a java library so will need to use java in the testing project
Hi Raghav, thanks for the video. Is it possible to automate protobuff using rest assured. Could you please guide on this. Thanks
I am not much aware on this Vipin, will need to check online
Hello Raghav, is there any other language other than JAVA that is supported by rest assured?
Hi Ankit, as far as I know REST-assured is a java lib, You can find similar lib in other languages
Amazing Raghav, Thank You so much
Most welcome!
Sir REST Assured API & REST API dono alag alag hai kya ?
Yes Binod REST is a web services protocol and REST Assured is a framework to test REST web services API
Thank you Raghav. You’re amazing
Most welcome Karan
Hello sir can you say what does it mean configuring of rest assured??
means setup process
Thank you for these videos
One question How we can read and write the PUT API XML data
The thing is in the XML body I have to update the attribute with respective data.
Hi Pawan, I have some examples on this in the next sessions of this series
Raghav do you have any frame work using RestAssured like Java selenium Hybrid Frame work
Hi Nagarajan, Not a combined framework with Rest assured and Java, you can find separate frameworks to get help from here - automationstepbystep.com/
Was that Peacock in the background. You must live in heaven
Yeah, there are a lot of them
Thanks a lot, Raghav...Most useful video...
You're welcome Govind
Hello Sir, can we do it in vscode.. I tried finding but failed
Hi Tima, Rest Assured is a java library, as we can create a java project in VS Code, we can also create Rest Assured framework in VS Code, I have not done it yet, you can try finding some tutorials on this
@@RaghavPal thank you sir, that would be helpful
I just have a question, in a single record (for example) in id 7 we want to check the id as well as the first name or multiple elements, how can we do that?
Hi Mustafa
In Rest Assured, you can use the assertThat() method along with Matchers to validate multiple fields in a single record. Here's an example:
Let's say you have a REST API endpoint that returns a JSON response with the following structure:
{
"id": 7,
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com"
}
To validate both the id and firstName fields in this response, you can use the following code:
import static io.restassured.RestAssured.*;
import static org.hamcrest.Matchers.*;
given()
.when()
.get("/users/7")
.then()
.assertThat()
.body("id", equalTo(7))
.body("firstName", equalTo("John"));
Here, the equalTo() method is used to validate the value of each field. The body() method is used to specify the field name in the JSON response.
You can add as many body() assertions as you need to validate multiple fields. If any assertion fails, the test will fail and an error message will be displayed indicating which assertion failed.
Hello Sir,
Can you please tell me how to fetch the token, from response ?
The token is present in headers tab of response
To fetch the token from the response headers in Rest Assured, you can use the following steps:
1. Get the response headers.
2. Get the token header value.
3. Extract the token from the header value.
*Step 1: Get the response headers.*
To get the response headers, you can use the `getHeaders()` method. This method returns a `Headers` object that contains all of the response headers.
```java
Headers headers = response.getHeaders();
```
*Step 2: Get the token header value.*
To get the token header value, you can use the `getHeader()` method. This method takes the name of the header as a parameter and returns the value of the header.
```java
String tokenHeaderValue = headers.getHeader("Authorization");
```
**Step 3: Extract the token from the header value.**
The token header value is typically in the following format:
```
Bearer
```
To extract the token from the header value, you can use the `substring()` method. This method takes the start index and the end index as parameters and returns a substring of the string.
```java
String token = tokenHeaderValue.substring(7);
```
**Example:**
The following code shows how to fetch the token from the response headers in Rest Assured:
```java
import com.jayway.restassured.RestAssured;
import com.jayway.restassured.response.Headers;
import com.jayway.restassured.response.Response;
public class FetchTokenFromResponseHeaders {
public static void main(String[] args) {
// Make a GET request to the server.
Response response = RestAssured.get("example.com/api/token");
// Get the response headers.
Headers headers = response.getHeaders();
// Get the token header value.
String tokenHeaderValue = headers.getHeader("Authorization");
// Extract the token from the header value.
String token = tokenHeaderValue.substring(7);
// Print the token.
System.out.println(token);
}
}
```
This code will print the token to the console.
Excellent video thanks bro
Most welcome Kamal
Hi, I have used one json file for request body for my rest assured project. But I want pass some parameter from my framework into the json. Or r u have any other way to pass parameter to my request body. This is my project need. Can u plz suggest any idea.
Hi, you can pass it through script or a file
you will find some examples in the sessions
Hello, Raghav I am totoaly new in IT .I want to learn Automation tool so what can I do
and In REST Assured how can I know that how many Dependency we need ?
Plese advice me
Thank you
Hi, can check the tutorials here - automationstepbystep.com/
@@RaghavPal Thank you for your reply but I need to do all of this?
will try to add more
Hi Raghav Sir, one request to you . Can you please make one framework using Intellij, Gradle, Junit with BDD cucumber framework which is integrated with Jenkins and GIT. No video has been done and available in youtube with this combination
I will check on that Sathyavelu
Automation Step by Step - Raghav Pal I am waiting!!
Congrats for 400k subscribers sir🥳👍
thanks Dharani
I have payload
{ "authorized users":
[ {
" first name" :" john",
"last name":" kesly"
} ]
}
Map arr=new LinkedHashMap();
arr.put("first name","john");
arr.put("last name","kesly");
Map body=new LinkedHashMap();
body.put("authorized users",arr);
given().contentType("application/json").body(body);
When I hit this I am getting error
{
"reason": Invalid type: object (expected array)"
}
How to resolve this issue?
In this case how to convert map into array ?
How to write a code for this ?
Can you please help me on this ?
Not very sure, you will need to debug and check from which line exactly this is thrown and detailed logs
@@RaghavPal ok
are these tutorials enough to work in real time api rest assured project ?
Yes Anantha
If you follow these with hands-on, you can work on any Rest Assured project. There will be some new things you will face specific to your project needs as you will progress, but you will be able to handle with this foundation
@@RaghavPal Thank you , Is it same even with Performance testing tutorial ?
Let me know if you are referring to a specific series. For tools like JMeter, Gatling it will be the same
@@RaghavPal JMeter full course Masterclass
Yes, if you follow this one as well with hands-on, can work on any JMeter project
hey Raghav, getting below error
java.lang.SecurityException: class "org.hamcrest.Matchers"'s signer information does not match signer information of other classes in the same package
Hi Anurag, I found this online - The hamcrest.jar needs to go before the Junit library in the build path. You can check all options here
stackoverflow.com/questions/9651784/hamcrest-tests-always-fail
@@RaghavPal Hi Raghav I tried removing junit jar. .. it worked. But will it give any issues ?
If you are using testNg, removing JUnit should be fine
superb explained ....thanks a lot
You are most welcome
Thank you Raghav for the amazing video with good content.
Most welcome Abdul
Hi Raghav Sir, I need to learn REST API with JavaScript combination
it's my project requirement. could you please share if you have done?
Hi Venky, not exactly with API, you can use tools like Cypress
@@RaghavPal sure, Thank you so much
POSTMAN Beginner Tutorials - www.youtube.com/watch?v=juldr...
It's really good and helped me to understand the topic
Thanks again
@Raghav Pal : Thank you very much for the detailed explanation. Awesome explanation with details and short cuts. I want to learn all these shortcuts. Thanks
You are most welcome Krishna
Thanks Raghav for your nice presentation & good efforts to bring this up
Thanks a lot Chandra
sir, you made testing easy and really interesting
So nice of you Naincy