API Testing Interview Questions and Answers| 3+ YOE

Поділитися
Вставка
  • Опубліковано 6 вер 2024

КОМЕНТАРІ • 40

  • @HimaBinduT-pv6bz
    @HimaBinduT-pv6bz 4 місяці тому +6

    POST is used to create new reource in the server. For your question, If we hit the same request 10 times, first time the reource will get create with an id. next time onwards , it throws 422 status- Unprocessed entity. Message says like , "The reource has already been taken". because we are sending the request with same payload everytime.

    • @futurewriter63
      @futurewriter63 13 годин тому

      Hi hima bindu do you have linkdin ,i have some doubts in api please could you give it

  • @991tanmay
    @991tanmay Рік тому +10

    Hello Sir, Your videos are really helpful Thanks a lot for that. For the question you asked what if we hit POST multiple times with same data(body). The ans is it will create 10 requests and it will give different "id" each time.

  • @shilpamishra3889
    @shilpamishra3889 4 місяці тому +1

    post- it is used to create/add new resource.
    put - it is used to update the existing resource.
    if we hit same post request multiple times, it will show "429 too many requests" status.

  • @ishuishu3149
    @ishuishu3149 7 місяців тому +3

    What is collection
    What is payload
    Validation in postman
    Http code 404 not found
    Integration with Jenkins
    IllegalstateException
    Different variables

  • @vijaypote9621
    @vijaypote9621 Рік тому +1

    hitting post request in concurrent manner post creat resource every time
    put not create resource everytime
    post used for insert data & put is used to update data or if not data is there then create one data

  • @shanukhan-ud9gg
    @shanukhan-ud9gg Рік тому +6

    Post is non-idempotent, it means, even if we send the request with the same data, it'll create a new resource.
    While in case of put, it'll check if the resource is already created, then it'll not create the new one. if there is any change in the body, then it'll update

    • @jyothireddykonduru
      @jyothireddykonduru Рік тому

      what is the meaning of POST non-idempotent?
      And what about Other http methods?

    • @shanukhan-ud9gg
      @shanukhan-ud9gg Рік тому +4

      Idempotent means it’ll have no impact if with the same body, multiple requests are posted. Put is idempotent, it’ll update the data if there is any change in the body content.
      Whereas POST as the name suggest, post means after. So, it’ll keep on adding the new resource even if the body of the request remains similar

    • @anikaraisa1844
      @anikaraisa1844 Рік тому

      @@shanukhan-ud9gg so lets say the POST API is for creating new login credentials (uid and password), then how can it create same login multiple times with the
      same credentials? Can you please help?

    • @shanukhan-ud9gg
      @shanukhan-ud9gg Рік тому +2

      @@anikaraisa1844 yes, so the above which i've mentioned is in a generic context. while the behavior largely depends on the design and implementation of the API.
      Eg 1: Intentional Duplication -> based on the business requirement, the API might intentionally allow the creation of multiple user accounts with the same login credentials
      Eg 2: No Deduplication Logic: The API might not have a deduplication mechanism in place to prevent the creation of multiple accounts with the same credentials, even if the credentials are the same.

    • @shanukhan-ud9gg
      @shanukhan-ud9gg Рік тому +2

      @@anikaraisa1844 what i mean is, these are just the generic statements, the implementation is totally based on the business requirements and how the developer is implementing them

  • @GEETAMANUSMARE-c8i
    @GEETAMANUSMARE-c8i Місяць тому

    if we hit the post request 10 times then the created data will be be as it is same but id and time will change .

  • @Randomboy2394
    @Randomboy2394 Рік тому +3

    Hi sir..... whenever we get the GET request requirement and we are hitting the POST request instead of GET request the status code should be 405 ... In a video it's was showing 404 ..so that's wrong and it is defect....Sir please reply me whether this is correct or not..

    • @narjatechnologies
      @narjatechnologies Рік тому +6

      HTTP status code 405 is generally considered the best practice to indicate that a requested method is not allowed on an API endpoint. However, the specific handling of this scenario depends on the API developer's design and requirements.
      If you mistakenly use a POST request on an endpoint that should only accept GET requests, and you receive a 404 status code instead of 405, it may not be considered a best practice. In such cases, you can log a low-priority bug report to address this issue.

  • @sabkaBaap007
    @sabkaBaap007 Рік тому +2

    Sir close to three years of experience h industry me and I've worked in automation testing projects from the beginning, I've worked in ui testing automation projects, mobile application testing automation protect and currently in api testing automation project. I'm working in an MNC but I feel that my pay is less as per the market standards based on my contribution in the team and my knowledge.
    I'm trying for a swtich but I don't even get an opportunity for interviews. I don't know why. Can you let me know what can be done in this situation?

  • @hemantjadhav1176
    @hemantjadhav1176 5 місяців тому

    Hi sir,
    If we hit POST request on 10 times by usng diff test data we will get diff output

  • @philomanbabuperam
    @philomanbabuperam Рік тому +1

    Good Questions and Nice Answers.....:)

  • @testingic2141
    @testingic2141 Рік тому +1

    @RD Automation Learning Please provide answer to that question- " how do you validate test Coverage"?

  • @medhabhat1
    @medhabhat1 5 місяців тому +1

    POST is not impodent - it mean everytime i hit the request, new resource will be created but in case of PUT, its not same case

  • @GEETAMANUSMARE-c8i
    @GEETAMANUSMARE-c8i Місяць тому

    but when i replace get wioth post then send then result i am getting is 201 created...not 404

  • @ravindersanjay
    @ravindersanjay Рік тому +8

    When a POST request is triggered multiple times in Postman tool, the following things will happen:
    The request will be sent to the server multiple times.
    The server will process the request each time it is received.
    The server will return a response for each request.
    The responses will be stored in the Postman history.
    You can view the responses in the Postman history.
    If the request is successful, the response will have a status code of 200. If the request is unsuccessful, the response will have a different status code, such as 400, 401, or 403.
    You can also use Postman to set up a collection runner to run the request multiple times automatically. The collection runner will allow you to specify the number of times the request should be run, as well as the delay between each request.
    Here are some of the things to keep in mind when triggering a POST request multiple times in Postman:
    The server may have a limit on the number of requests that can be sent per second.
    The server may also have a limit on the number of requests that can be sent from the same IP address.
    If you are sending a lot of requests, you may need to throttle the requests to avoid overloading the server.

    • @Lokesh.Mittal
      @Lokesh.Mittal 8 місяців тому

      very well explained, thank you

    • @AbhishekChauhan-ux9yq
      @AbhishekChauhan-ux9yq 7 місяців тому

      Wow...well explained 🙌

    • @ishuishu3149
      @ishuishu3149 7 місяців тому

      It depends on how the server is designed to handle the post request. It may create new request, modifies the existing data or server may not create new data knowing it’s a duplicate request.

  • @user-de1we4bc4c
    @user-de1we4bc4c Рік тому +1

    because the get request data may be deleted because of that reason it gives this status 404

    • @beingkind3610
      @beingkind3610 Рік тому

      Yes, whenever the request made to database via server and if the data is deleted or not available then it throws 404.

  • @Forty3Stories
    @Forty3Stories Рік тому

    @5:53 wrong content type may return 4XX error code but will RestAssured throw an exception?

    • @venkeysamantula3365
      @venkeysamantula3365 Рік тому

      I think rest assured will throw exception as a status code of 500 it means server doesn't know how to handle the request.

    • @sabkaBaap007
      @sabkaBaap007 Рік тому +1

      It won't throw any exception and as you said the response would be 4xx and to be precise it would be 400 or 415

  • @SantoshKumar-ci6tl
    @SantoshKumar-ci6tl Рік тому

    IllegalStateException exception

  • @tejareddy5801
    @tejareddy5801 8 місяців тому

    Gitlab also best ci cd tool

  • @fitwithAnany
    @fitwithAnany 6 місяців тому

    Assertion Exception will through when we give the wrong content

  • @ravindersanjay
    @ravindersanjay Рік тому +4

    Rest Assured will throw an IllegalStateException exception when we pass a wrong content type. The error message will be:
    Cannot parse object because no supported Content-Type was specified in response. Content-Type was 'text/html;charset=ISO-8859-1'

  • @DhirajBhosale-yh2ko
    @DhirajBhosale-yh2ko 3 місяці тому

    415-Unsupported media type for wrong content type

  • @KRUSHNA637
    @KRUSHNA637 Місяць тому

    400 status code with bad request

  • @moodoffbhubaneswar5486
    @moodoffbhubaneswar5486 Рік тому

    noned