API Testing Using Python - Requests Package

Sdílet
Vložit
  • čas přidán 2. 02. 2021
  • In this video, we will discuss how to automate API in Python using the requests package.
    What is API
    • How To Automate Rest A...
    Official Link
    requests.readthedocs.io/en/ma...
    Prerequisite - Python Basics
    • #1 What Is Python- Pyt...
    Selenium With Python Series
    • Selenium WebDriver Tut...
    Official Link
    selenium.dev/
    Connect with us:
    Linkedin- / mukesh-otwani-93631b99
    Instagram- / mukeshotwani
    Facebook Group- / 256655817858291
    Facebook Page- / seleniumwebdrivermukesh
    Twitter- / mukeshotwani
    Blog- learn-automation.com
  • Věda a technologie

Komentáře • 112

  • @virginiazambudio3606
    @virginiazambudio3606 Před 2 lety

    Excelent video to start doing api testing with python ! Thanks

  • @rameshbabu2104
    @rameshbabu2104 Před 3 lety

    Thank you Mukesh. Very easy and so clear.

  • @anilkumar-xp9et
    @anilkumar-xp9et Před 2 lety +1

    superb Explanation Mukesh.....

  • @bir_deb
    @bir_deb Před 3 lety

    Thank you for this tutorial Mukesh. It helps

  • @rahulpandey4304
    @rahulpandey4304 Před 2 lety

    Thanks Mukesh for this video, it's really helpful.

  • @bhaveshvaishnav633
    @bhaveshvaishnav633 Před rokem +3

    Humble request to please put a video on Request Library with Pytest Framework for API Automation.

  • @shashankjoshi9830
    @shashankjoshi9830 Před 2 lety

    Very easy to understand and useful.

  • @amanoj6396
    @amanoj6396 Před 3 lety

    Thanks for made a video on python API testing for us mukesh .. it's useful to us ..

  • @ahmadnasir8856
    @ahmadnasir8856 Před 2 lety

    Thank you, Mukesh

  • @dev__is__me
    @dev__is__me Před 2 lety

    Amazing video. Thanks

  • @herbertzhou2598
    @herbertzhou2598 Před 2 lety +1

    very helpful for the overview of request lib in automation

  • @JitendraKumar-lr3vq
    @JitendraKumar-lr3vq Před rokem

    Thanks Mukesh for making this video..it really helped me in understanding it ..if possible can you make on bearer token usage ..

  • @BHARGAVIBEVINMARAD
    @BHARGAVIBEVINMARAD Před 2 lety +1

    Thanks for this video. Very helpful to understand and get started

  • @umeshmore8251
    @umeshmore8251 Před 3 lety

    Nice tutorial. Thanks

  • @dilshodyuldashev3189
    @dilshodyuldashev3189 Před rokem +1

    Very easy to understand and useful. Thank you bro👍🔥🔥🔥

  • @kya-baat
    @kya-baat Před 2 lety +1

    Best explaination of API testing seen so far 👍👍
    Sir i need to do testing of api response with the data stored at DynamoDb. Can you help me in this or do you have any videos on this.

  • @balasubramanianv849
    @balasubramanianv849 Před 3 lety +2

    very clear explanation with examples .thank you

  • @surenderpython9150
    @surenderpython9150 Před rokem +1

    one of the best videos on Api testing 😃

  • @ANILkumar-bv2uj
    @ANILkumar-bv2uj Před rokem

    Good 👍 one... thankyou

  • @hmalintsyan6360
    @hmalintsyan6360 Před 2 lety

    Super Mukesh!!!

  • @rachnasingh239
    @rachnasingh239 Před 2 lety +1

    Mukesh,Can u please share the link where u have shown how to autoate with token based API

  • @chandanmaity
    @chandanmaity Před 10 měsíci

    Fantastic

  • @gauthamsakthiveeran7946

    nice one

  • @Sagar_Tachtode_777
    @Sagar_Tachtode_777 Před 2 lety

    Great stuff 👏👏, have you made any videos for error handling like connection error, new connection error ?

  • @mohamadkhateb6508
    @mohamadkhateb6508 Před rokem

    thank you very much

  • @akashkrkashyap
    @akashkrkashyap Před 3 lety +1

    Really helpful. Continue the great work.

  • @GG-hk5iz
    @GG-hk5iz Před 3 lety

    Hi Mukesh , Thanks a lot for your video . Can you please tell if we can use rest assured in python ?

  • @dipendra54
    @dipendra54 Před 2 lety

    Great Stuff :)

  • @mohammedrafi-cr1go
    @mohammedrafi-cr1go Před 3 lety

    Thanks Mukesh, this vedio was really helpfull.. Just have one question in validating JSON suppose i want to validate a response JSON which has student details and student id being primary key of tht data set. How can i make sure the each student id in JSON is unique ?? Right now i am converting the response JSON into dataframe and checking the uniqueness of student id column .. But is there a way to check the uniqueness of the student id at JSON level ??

  • @rohitkapade1130
    @rohitkapade1130 Před 5 měsíci

    What about code coverage for by those API calls. How do i do that coz request are hitting on another machine.

  • @nagapriyan8303
    @nagapriyan8303 Před 2 lety +1

    Hi sir, i have some doubts i am beginner to python automation testing, using python security, performance,load, stress, regression, smoke how to do?

  • @yerdos1633
    @yerdos1633 Před rokem +1

    Great video, thanks a lot sir!

  • @igpYT
    @igpYT Před rokem

    Mukesh, some apis have authorisation how can I auth them so that “token is missing” error not show.

  • @castellano100
    @castellano100 Před rokem

    Thanks for sharing your knowledge.
    I would like to know how to create a random data in this file json.
    In your example, we can have:
    "name":"XXXX"
    "JOB:"random number - My question is here. How can we do it?

  • @healthwithbhavesh6030
    @healthwithbhavesh6030 Před 2 lety +1

    nice video ...easy and simple way

  • @prasannamundinkeri5153
    @prasannamundinkeri5153 Před rokem +2

    Thank you so much 👍

  • @sathya-enjoy_lifetothefullest

    Hi Mukesh, I want to get the entire information of the first 10 index in the response data not just json_response["data"][0]["email"] , how to get it

  • @khazitabrez2629
    @khazitabrez2629 Před 3 lety

    Hi Mukesh, can you please suggest me how to start with rest api automation testing? Which programming language should I learn? I just know bit about programming and I have interest in api automation as i can apply this my current job.
    Please help me out, awaiting for your respond

  • @vij9218
    @vij9218 Před 3 lety

    Should we learn API testing with python or with java? Currently I am learning Selenium with python, I want to learn API testing but I am not able to decide which one I should learn? Can you please suggest me.

  • @KhalilYasser
    @KhalilYasser Před 3 lety +2

    Thank you very much for this awesome tutorial. Do you have a written explanation for that tutorial?

    • @Mukeshotwani
      @Mukeshotwani  Před 3 lety

      Hi Yaseer Not yet! as of now I have only in video format.

  • @svmanka
    @svmanka Před 3 lety

    Thanks

  • @MalegaonDiary
    @MalegaonDiary Před rokem +2

    Thanks for very clear explanation ... 33.50 how to test with multiple set of data in json, is it same way ?

  • @123466000
    @123466000 Před 2 lety +2

    Hi Mukesh,
    Please also explain the design pattern and framework using pytest and python for API automation where u can demonstrate integration tests and also mock some services. Need to learn this real thing.

    • @Mukeshotwani
      @Mukeshotwani  Před 2 lety +1

      Sure Arti, will do that. Glad to see your comment after long time.

    • @123466000
      @123466000 Před 2 lety

      Glad to see your reply. Currently I have got a project to work on api automation testing for integration tests. And the company uses tox library to mock. But I do not know ABC of this part. I have learnt a lot from ur framework videos and I would like to learn this as well from your tutorials.

  • @lavanya91sweety
    @lavanya91sweety Před 3 lety +1

    This info is helpful.. thank you so much..
    I have putty/super putty logs validation most of the time in my testing.. can we automate that using this

    • @Mukeshotwani
      @Mukeshotwani  Před 3 lety

      Hi Lavanya, if you can get this logs via API then you can use requests which I used in video. In case you have logs independent as file then in python you can use open method to read logs too. Here is the video
      czcams.com/video/Pj2YDQw10k8/video.html

  • @harshbedi7486
    @harshbedi7486 Před 2 lety

    Can you please share a example of sending xml as data in POST request.

  • @girishkokadwar3948
    @girishkokadwar3948 Před 3 lety +2

    Hi Mukesh ..... developer add there dummy projects on link din and showing there work ,As automation tester ...what we do to engage our link-din network and show or project skill to recruiter

    • @Mukeshotwani
      @Mukeshotwani  Před 3 lety +1

      Hi Girish, We cant do anything here much but yes I noticed the same on Linkedin. We can focus more on our technical skills only and prove ourself in interviews.

  • @nehajulha2422
    @nehajulha2422 Před rokem

    how to add pre-request script of postman in python requests

  • @sapspeks1
    @sapspeks1 Před 2 lety

    Please help me in configuring maven like build tool in python

  • @vivekcv9480
    @vivekcv9480 Před 3 lety +2

    Excellent knowledge sharing video... Earlier I used postman test assertion. R & D using python is helpful. Can we use pytest framework for automating APIs?

    • @Mukeshotwani
      @Mukeshotwani  Před 3 lety +3

      Yes PyTest is test framework and can be used with API, Web or any kind of test. Next video I will change them to Pytest.

    • @vivekcv9480
      @vivekcv9480 Před 3 lety

      @@Mukeshotwani Thanks

    • @amitagrawal4317
      @amitagrawal4317 Před 3 lety

      @@Mukeshotwani eagerly waiting for this. And a big hug and thank you for making automation easy🤗 Learnt alot from you and Naveen.
      Guys hit like,share & subscribe to their channels.

  • @organizera9716
    @organizera9716 Před 2 lety +1

    Hi Mukesh, Can you please make a video of API testing in PyTest Framework? Thanks in advance

    • @Mukeshotwani
      @Mukeshotwani  Před 2 lety

      Here is the video czcams.com/video/snDSB9b8v_E/video.html

  • @MsWorkd
    @MsWorkd Před 2 lety +1

    Hi please upload a detailed video how can we send authentication headers with our api call and how can we save our credentials in an encoded format

    • @Mukeshotwani
      @Mukeshotwani  Před 2 lety

      Hi Pulkit, Sure I will try cover in part 2 of this video.

  • @sssaamm29988
    @sssaamm29988 Před 2 lety +1

    Hi Mukesh, thanks for the video. How can we achieve the same using pytest?

    • @Mukeshotwani
      @Mukeshotwani  Před 2 lety

      Hi Sampath, inside method you can have anything I mean API test, web test, mobile test etc.

  • @AnujArya89
    @AnujArya89 Před 2 lety +1

    If PUT is creating a non-existent record. Then in response we'll get createdAt or updatedAt ?

    • @Mukeshotwani
      @Mukeshotwani  Před 2 lety

      If not exist then created at and if already present then updated at.

    • @AnujArya89
      @AnujArya89 Před 2 lety

      @@Mukeshotwani TnX

  • @rahulkatlaparthi354
    @rahulkatlaparthi354 Před 2 lety

    How can I update dummy data in post request and the dummy not to be stored in database ?

  • @anpadjahil9711
    @anpadjahil9711 Před 2 lety +1

    Can RestAssured library be used with Python?

    • @Mukeshotwani
      @Mukeshotwani  Před 2 lety +1

      RestAssured is for Java. For python user its request module.

  • @preetygupta9655
    @preetygupta9655 Před 2 lety +1

    How can I implement OAuth 2 in python?

    • @Mukeshotwani
      @Mukeshotwani  Před 2 lety

      Hi Preety check this www.devonblog.com/test-automation/api-testing-using-robot-framework/

  • @IamBhushu
    @IamBhushu Před rokem

    Is this one video is enough for fresher who wants to learn api testing with python

  • @lakshmikanthcherukuri1321

    Hi Sir can do video how to send payload as pojo like rest assured in python

  • @bharatpotle5996
    @bharatpotle5996 Před rokem

    Hello Sir, Is there any contact details to place our queries

  • @seemamotwani8451
    @seemamotwani8451 Před 3 lety +1

    Could you please share karate framework for api testing

    • @Mukeshotwani
      @Mukeshotwani  Před 3 lety

      Hi Seema, I don't have much experience with the Karate framework. I used for POC only.

    • @seemamotwani8451
      @seemamotwani8451 Před 3 lety

      @@Mukeshotwani Thanks Mukesh for response. Can you suggest some easy material or tutorial for reference

  • @AT-zr5nf
    @AT-zr5nf Před 3 lety +1

    Sir, I am stuck in the first line. my pip is not getting installed. I cant even see api project written on my terminal.

    • @Mukeshotwani
      @Mukeshotwani  Před 3 lety

      Hi mate is python configuration is done ?

    • @Mukeshotwani
      @Mukeshotwani  Před 3 lety +1

      Follow below video to get started with python n pip czcams.com/video/6xClFPoh3ts/video.html

    • @AT-zr5nf
      @AT-zr5nf Před 3 lety

      @@Mukeshotwani Thank you so much for the prompt reply. i will check

    • @AT-zr5nf
      @AT-zr5nf Před 3 lety

      @@Mukeshotwani Mukesh, I have mac. this is error i am getting on terminal: ImportError: No module named typing

    • @AT-zr5nf
      @AT-zr5nf Před 3 lety

      Thanks Mukesh.. Its done now!!

  • @shafatmasood5773
    @shafatmasood5773 Před 2 lety

    Why should we prefer api Testing with pytest.

  • @parmindersingh6267
    @parmindersingh6267 Před 3 lety +3

    Really Great !!! Can we compare our json response with DB in python...

  • @roja8512
    @roja8512 Před 2 lety

    How to pass the headers?

  • @xumanen6282
    @xumanen6282 Před rokem

    SSL: CERTIFICATE_VERIFY_FAILED. Followed all your steps still this error.