Data-driven testing with different data sets for each request

Поделиться
HTML-код
  • Опубликовано: 26 ноя 2024

Комментарии • 41

  • @vdespa
    @vdespa  3 года назад

    👉 Want to learn more about Postman? Check my complete Postman online course.
    vdespa.com/courses/?q=RUclips

    • @vijayalakshminaik6050
      @vijayalakshminaik6050 2 года назад

      Hi i am getting typeerror: Cannot read property 'filter'of undefined for pre requisite code can you please suggest

  • @sparknoid
    @sparknoid 2 года назад +3

    Loved your videos valentine with data driven testing heavily used in my company I was able to create collection and automate sanity suites for myself in testing .... It was amazing !!! Reduced manual effort tremendously. .looking forward to these kinds of more videos

    • @vdespa
      @vdespa  2 года назад

      Thanks for letting me know. Please email me at valentin@vdespa.com - I would love to hear more about your use-case.

    • @sparknoid
      @sparknoid 2 года назад

      @@vdespa what more concepts are there to master this tool ?

  • @prateektomar4874
    @prateektomar4874 Год назад +1

    This video is really very interesting.
    Love from India :)

    • @vdespa
      @vdespa  Год назад

      Glad you enjoyed it! You are welcome. Thank you for leaving a comment.

  • @pankajkukkar3849
    @pankajkukkar3849 Год назад

    Thank you Valentin for creating such informative video on Postman. It really helped me to resolve the issue i was facing.
    I have another requirement to generate html report along with junit or json report for the same run. could you please help me to generate all the possible reports for each runs performed from Postman instead of only html or only json report.

  • @harishkce1989
    @harishkce1989 Год назад

    Hello Valentin - thanks for sharing the java script file -
    just a quick question for clarification - does the script stop logically if the imported file is not valid or no data found ? and sequential steps are not executed ?
    ex : you have if (requestdata.length==0
    console.log) {
    console.log ("No data found");
    return;
    }

  • @aakashjain4437
    @aakashjain4437 3 года назад

    Please create a video based on the E2E testing flow with MySQL DB connection setup along with complex queries. Btw your all content are awesome.

  • @perrucheval
    @perrucheval Год назад

    Is there a way to modify this so that it is possible to start the data loop at a folder level instead?
    Ex: folder 'User' contains 2 folders containing each a flow of requests. 1 flow is not data-driven and 1 is.
    If executing manually from Postman, I would start the run of the datadriven folder adding the dataset at that level and not the request.
    I want to be able to start my full collection adding the dataset at the collection level but only have it applied for its designated folder.
    ps. the data file would contain different datasets for different folders too

  • @vibhorsharma2436
    @vibhorsharma2436 3 года назад +1

    Thanks @Valentin, it is awesome video, it helps lot.
    I have an query, let suppose i have two Post Request in the collection and i have created one .csv/.json file but for the first request i have 3 data set and for 2nd I have four data set. When i run the collection then at the four iteration first request fail because of no data, there is any way when runner is running that time first request should not be run for forth iteration.

  • @vitav2009
    @vitav2009 7 месяцев назад +1

    hi where is the pre-request code form your video available?

    • @vdespa
      @vdespa  7 месяцев назад

      Did you check the description? It contains a link to the collection.

  • @shrutigoyal7666
    @shrutigoyal7666 Год назад +1

    Hey Valentin just loved your tutorial. Its super useful. But i need one help. am stuck at 1 place. the data set which i am sending to my request has different response status codes and not just 200 OK so i want to pass the code value as well from the file. SO this is how am giving the value in my json {
    "id1":"b36059d1-f323-4f6b-aaad-a5f863e94304",
    "id2":"bc",
    "status":"200"
    } , So now in my test i want to assert with this status code and am finding it difficult to read status value and compare for each data or iteration . Is this possible? I could do it with single request data file but with the above data file am finding it difficult

    • @vdespa
      @vdespa  Год назад

      Thanks for your kind words. It is hard to answer this with the given information. Consider posting your question in the Postman community (community.postman.com/) and share what you have tried so far and where did you get stuck. Include screenshots and as many details as possible. Feel free to tag me with @vdespa. Thanks!

  • @mogliff3414
    @mogliff3414 3 года назад

    This is wonderful I wanted to hide pre- request logs from console is there anyway ?

  • @YoursKSMahesh
    @YoursKSMahesh 2 года назад

    Hi Valentin, great job, thank you.
    But there is a problem with your pre-request script. I'm driving the data from JSON where I'm asserting actual and expected. On doing so, I'm getting undefined for pm.variables.set(key, value). Until previous step, I'm able to fetch the data.
    Your guidance is appreciated in resolving this issues as its solves much effort.
    Thanks,
    Mahesh

    • @vdespa
      @vdespa  2 года назад +1

      You can't fetch data you set. Use get.

    • @YoursKSMahesh
      @YoursKSMahesh 2 года назад

      @@vdespa Thanks for the response. Let me check

  • @cht7162
    @cht7162 2 года назад

    Hi Valentin, is it possible to use a dynamic data from a website and then use it as a value of a variable?

    • @vdespa
      @vdespa  2 года назад

      Theoretically yes, but you need to parse the website to extract that value. So things could get ugly.

  • @Lucajeck
    @Lucajeck 3 года назад

    Hi, thank you very much for your videos, I have been an analyst tester for a short time and I have learned a lot thanks to you.
    I need a little advice.
    Is there any way or tool to compare the output of one set of APIs with the output of another set of APIs automatically? I would like to understand if the new APIs developed by the developers have the same output as the old ones with the same input.
    Thank you very much.

    • @vdespa
      @vdespa  3 года назад

      Thanks, Claudio! Have you seen this tutorial: ruclips.net/video/9IgvFkKhJbk/видео.html

  • @arpitasuhagiya9629
    @arpitasuhagiya9629 2 года назад

    Hiii valentin.. I'm getting "Can not reas properties of undefined (reading 'iterationData') " I have tried same pre-request script as your for my 2 post api and when i try to run collection getting this error.
    While i hve provided json file already.. Can you help me out... Thank you for this video..

    • @vdespa
      @vdespa  2 года назад

      It is hard to answer this with the given information. Consider posting your question in the Postman community (community.postman.com/) and share what you have tried so far and where did you get stuck. Include screenshots and as many details as possible. Feel free to tag me with @vdespa. Thanks!

  • @harutyunharutyunyan790
    @harutyunharutyunyan790 2 года назад

    Hi Valentin, great job, thank you.
    But there is a problem with your pre-request script. Before running collection when Iterations are set more than one, an error occures on a second iteration - "TypeError: Cannot convert undefined or null to object"

    • @vdespa
      @vdespa  2 года назад

      Does one iteration work?

    • @harutyunharutyunyan790
      @harutyunharutyunyan790 2 года назад

      @@vdespa yes

    • @vdespa
      @vdespa  2 года назад

      @@harutyunharutyunyan790 Well, why do you need two iterations?

    • @harutyunharutyunyan790
      @harutyunharutyunyan790 2 года назад

      @@vdespa I tried to do load test)

    • @vdespa
      @vdespa  2 года назад

      @@harutyunharutyunyan790 Postman is not a load testing tool. Check my channel, I did a video about this.

  • @krishnakiranvajha3175
    @krishnakiranvajha3175 3 года назад

    Hi valentin ... I have a scenario : Request A should be executed only once and it’s o/p I have to use in request B ... And request B should be executed multiple times with different data from csv.
    Data I am loading from csv to request B. Req A o/p I saved in env variable and passed to req B . While running through runner how to limit req A to only one iteration ?? Pls help !!

    • @vdespa
      @vdespa  3 года назад

      Once you understand the main concepts around variables, some JavaScript and the content of this tutorial, it should not be difficult to implement your use-case.

  • @rajashreekale3894
    @rajashreekale3894 2 года назад

    I have 6 requests in my collection and every request need different set of data and number of data sets for every request is different. I want to run 1st requests for 50 data sets and 2nd with 89 data sets(Iterations) and remaining requests only once. Can I achieve this using csv?

    • @venkataammanabrolu3736
      @venkataammanabrolu3736 2 года назад

      Any update on this?

    • @vdespa
      @vdespa  2 года назад

      It is hard to answer this with the given information. Join the Discord community (see link in the description) and ask your question there. Consider adding more details, including screenshots. Thanks for understanding.

  • @zafarTAG
    @zafarTAG 3 года назад

    How did you load data in Postman from that json file

    • @vdespa
      @vdespa  3 года назад +1

      You use the collection runner or newman.