42. Share Data From One API To Another API In Rest Assured

Sdílet
Vložit
  • čas přidán 22. 08. 2024
  • Hey Guys,
    Sharing data among test methods and classes is a major part of test automation. Data generated by an API may be used for other APIs. For example - Created booking id needs to be used by update, delete booking APIs.
    We will see pure Java ways to share data among tests. The same can be used for Selenium or any other test automation framework.
    GIT Repo - bitbucket.org/...
    If you do not like my content please share your feedback so that I can improve myself.
    If you like my content then please like, subscribe, and share.
    Thanks
    Amod

Komentáře • 28

  • @sureshgarine
    @sureshgarine Před rokem +1

    "tools may outdated, but the core programming language is always the same, so be good at the language" --> this is 100 percent true.

  • @yaminisaravanan6714
    @yaminisaravanan6714 Před 10 měsíci +1

    Amod, Also much impressed when you say the declaration of Constructor so that no one create objects and also when you create interface, you said it is Public, static and final - You are clearly mentioning the properties of each concepts and the advantages too. Well done and Please continue this momentum with indepth concepts of Java. Thanks !

  • @aninditarudra1133
    @aninditarudra1133 Před rokem +1

    You explain the topic in a very easy way. Thanks for all the hard work and for helping the testing community.

  • @yaminisaravanan6714
    @yaminisaravanan6714 Před 10 měsíci +1

    Awesome training, Amod - Tons of Thanks to You. I have impressed your training only because you have driven this course through Java concepts which will be there till this world is Alive !
    Tools will not sustain for long term. Thank You again !

  • @hussamabdelfattah2400
    @hussamabdelfattah2400 Před rokem +1

    You're the best in restassurd 👏👏

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

    Awesome Amod. Data store as Map I learned today. Thanks a lot.

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

    Tq for the video

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

    Hi Amod,
    In your future video will u cover API automation framework?

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

    Hi Amod,
    Could you please create end to end framework using Restassured.

  • @bharathkoneru4008
    @bharathkoneru4008 Před rokem

    Hi Amod, these approaches are cool & loved them specially the 4th one.
    I have a doubt regarding limitation of 3rd approach, DataStore class - here we are storing all the common data that we want to share across other classes.
    //My understanding on limitation of 3rd approach is,//
    For the DATA to be SHARED across other classes, FIRST we need to CREATE the VARIABLES & store the DATA. then only we can use them in other classes. Right?
    This means, that there is a dependency on creation of variables first in order to share the data to other classes? Right Amod?

  • @itsSwamyJ
    @itsSwamyJ Před 3 lety

    int id =(int) DataStoreMap.getValue("bookingid"); --- got class cost exception
    worked with below :
    Object id = DataStoreMap.getValue("bookingid");

    • @RetargetCommon
      @RetargetCommon  Před 3 lety

      Check the type of bookingid you are using to store value. Casting to Object is not solution.

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

    Sir,
    Excellent teaching ...please can you uploads on basic auth, auth 0.1 and auth 2.0

  • @Bell4Fun
    @Bell4Fun Před 2 lety

    Subscribed

  • @ShoeibShargo
    @ShoeibShargo Před rokem +1

    Hi, thank you for your detailed explaination. Can we use config.properties file instead of DataStore class? Would that be good practice or would it become messy?

    • @RetargetCommon
      @RetargetCommon  Před rokem +1

      You can use but Reading and writing in properties file will be headache. You can also use Map so store any value.

  • @user-fi5pz8mk3z
    @user-fi5pz8mk3z Před 8 měsíci

    Declaring booking id as static will not create any problem when you run in parallel ?

  • @SURAJSALUNKHES
    @SURAJSALUNKHES Před 2 lety

    what if an object or list of arrays comes in response? how can I store and access in next API calls?

  • @Febiustube
    @Febiustube Před rokem

    It's not a good idea to have dependency across tests. What if test#1 failed or was removed or smth?

    • @RetargetCommon
      @RetargetCommon  Před rokem

      Yes it is not good practice of not creating dependent tests but if we create we need to have some handling of negative scenarios in dependent tests.

  • @dsyoutube-q8w
    @dsyoutube-q8w Před 3 lety

    Will it be more memory efficient to use datastore as a singleton instead of using it as a static class?

    • @RetargetCommon
      @RetargetCommon  Před 3 lety

      I am restricting creation of object of that data store class. You can use the same thing using singleton class as well.

  • @johnwalter7492
    @johnwalter7492 Před 2 lety

    need help with multiple auth

  • @souravpatel9793
    @souravpatel9793 Před 2 lety

    But how to pass first name , could you please explain that one also