Web services | REST | 08 | Automation | API Testing | POST Request | JAVA HTTP URL CONNECTION |Tamil

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 เม.ย. 2019
  • Testing the APIs manually is an important skill to master but automating the API testing is more important than that. In this video, we will see how to automate API testing.
    We will learn,
    1) How to do POST request in JAVA?
    2) How to get the status code via java?
    3) How to get the response message via Java?
    4) fetching the response body.
    Links Explained in the video:
    dummy.restapiexample.com/
    Follow me on Instagram: bit.ly/2Ez36rH
    Facebook: bit.ly/2TqPlis
    #APITesting #Automation #REST #LearnAutomationOnline

ความคิดเห็น • 27

  • @selladuraib3865
    @selladuraib3865 2 ปีที่แล้ว

    Really thank you sir♥️☺️

  • @dvsrkumar13
    @dvsrkumar13 4 ปีที่แล้ว

    Hi, I have tried the post method as you have shown in the above video.
    I could see that the Response body returned with the data posted.
    However, when I do GET employees in postman, I couldn't retrieve the employee details, which I had posted. Is this API working?
    Could you please check and update the video accordingly.

  • @lightrock805
    @lightrock805 5 ปีที่แล้ว

    Thanks buddy. These Videos are excellent. Please mention how to add assertions for these responses

    • @LearnAutomationOnline
      @LearnAutomationOnline  5 ปีที่แล้ว +1

      Sorry light rock. Missed your comment. Just got notification for this. I have crossed, rest API, definitely I will add videos on asserting the response as well. Thanks a lot for the suggestion.

  • @sridevi2509
    @sridevi2509 3 ปีที่แล้ว

    Hi bro, i have tried POST method, it was created the ID (4177). But when checking it in postman, data field showing as null. only upto 24 id's only visible in postman

  • @sridevi2509
    @sridevi2509 3 ปีที่แล้ว

    When using PUT method, i have updated existing id(10) it was showing updated successfully in eclipse but it was not changed in postman.

  • @jaisri6430
    @jaisri6430 2 ปีที่แล้ว

    Bro I wanted to pass this json body string dynamically for each iteration, How to do it?

  • @renukarapolu7709
    @renukarapolu7709 ปีที่แล้ว

    Is their any full course in English language

  • @kaviarasusaravanan5313
    @kaviarasusaravanan5313 8 หลายเดือนก่อน

    Bro I have already connected error

  • @agiguna5600
    @agiguna5600 3 ปีที่แล้ว

    Bro pls upload api automation using rest assure

  • @rrohinidevi
    @rrohinidevi 3 ปีที่แล้ว

    Hi Arul, I am trying to make a POST request with Basic authentication, can you please help if you have any resources related to basic auth?

    • @LearnAutomationOnline
      @LearnAutomationOnline  3 ปีที่แล้ว

      Sorry for the delayed response. Could you pls let me know which library are you using?

    • @rrohinidevi
      @rrohinidevi 3 ปีที่แล้ว

      @@LearnAutomationOnline no problem.. I think I found one approach using java.util.Base64 . However, I am unable to proceed because I have a huge json payload to be sent with post request.
      I have my json payload stored in an external file.. I was able to read the file but I am not sure how to convert that to string with escape characters

    • @rrohinidevi
      @rrohinidevi 3 ปีที่แล้ว

      Is there any sample API with basic auth that i can use to test ? also I need help with sample json file that I can send as payload

  • @spmSelva
    @spmSelva 4 ปีที่แล้ว

    Nice teaching bro... out of topic, May i know who's photo in your desktop.. If not willing no need to give response bro. Nan etho oru videola ivara patha mathiri iruku?

    • @LearnAutomationOnline
      @LearnAutomationOnline  4 ปีที่แล้ว +1

      Karoly takacs. First shooter to win Olympic gold medals with just one hand. He is one of my inspirations.

    • @spmSelva
      @spmSelva 4 ปีที่แล้ว

      @@LearnAutomationOnline Thanks for sharing...Now you r the inspiration for present and future generations

    • @LearnAutomationOnline
      @LearnAutomationOnline  4 ปีที่แล้ว +1

      Glad to hear 😀

  • @LifeLessionsAcademy
    @LifeLessionsAcademy 2 ปีที่แล้ว

    itha api automationu solvangala thambi?

  • @sarathethiraj5275
    @sarathethiraj5275 5 ปีที่แล้ว

    Hi Bro,
    I have below clarification
    1) if I have 3 more headers like content-type. How to do it bro
    2) I have request in json file in some folder. How to use in the body
    3) If I have multiple test data, I want to edit the request with multiple test data . How to do it bro

    • @LearnAutomationOnline
      @LearnAutomationOnline  5 ปีที่แล้ว +2

      Hi Sarath,you can set as many headers as you want, just like you do it for content type, and accept header. Next, if you have a JSON file and if you are going to use it as a body, refer to this link and look for post multipart section. www.baeldung.com/httpclient-post-http-request . For testing the API with multiple data, keep the variables configurable and read the test data from a CSV or Excel file. If you are unsure on how to read from a CSV file, check data driven testing playlist in my channel. You will get an idea.

    • @sarathethiraj5275
      @sarathethiraj5275 5 ปีที่แล้ว

      Hi Bro,
      Thanks for your reply bro 😊😊
      Whether I can change the value of attribute in json directly from the body or I have to use some methods like using Json path .

    • @LearnAutomationOnline
      @LearnAutomationOnline  5 ปีที่แล้ว

      If you use JSON path it will be easier in my opinion. Because JSON path will help us to do lot of things with less line of codes

    • @sarathethiraj5275
      @sarathethiraj5275 5 ปีที่แล้ว

      Hi Bro,
      Kindly share steps / procedure bro how to edit the request using Json path for multiple test data.
      And also I need one more favor from you bro
      Kindly post some video for my above 3 clarification bro

    • @LearnAutomationOnline
      @LearnAutomationOnline  5 ปีที่แล้ว

      Hi Sarath, Kindly try the code and let me know where you are stuck up with. That's the best way to learn. I also, recommend you to make use of stackoverflow, coderanch, github. Because, in programming field, one must be very aware of these things to get things done.