Run Postman Collections in Jenkins with Newman

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

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

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

    Want to have ME be your Postman teacher? 🤔
    Here's how: vdespa.com/courses/

  • @c-mnm
    @c-mnm 2 года назад +2

    This is amazing! Thank you so much Valentine for sharing your quality knowledge with us 🚀

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

      You are welcome. Thank you for leaving a comment.

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

    Really awesome video, was helpful. Valentin Despa Thanks for sharing.

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

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

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

    Great Video, Thanks for sharing.
    I am using both Environment and Collections. In Environment I am storing also some variable (like baseUrl).In this case, I still get similar to invalid URL (see in video 11:10)
    Could you please explain how to assign variable from environment when running newman, to be able to run successfully? - Thank you

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

    Fantastic... I found it so useful...

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

      Glad to hear that. I am glad that it was helpful.

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

      @@vdespa can you please make a video about using newman with a testing framework like xunit and Selenium? I tried using Edge.js to script nodejs from C# but it didn't work. I'm getting error due to newman script using spread operator.

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

      @@TarekFaham Not sure how to integrate that. Newman only works with Postman collections for testing.

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

    Very great video. Could be useful if you link it with deploy pipeline in Jenkins. I believe to automate the API test we should set the latest build for the environment

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

      Thanks for your thoughts. You are welcome. Thank you for leaving a comment.

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

    Thank you very much Valentin for all your clear explanations: I was interested in doing this in a docker container but i do not manage to create container with jenkins + newman, it fails. i have used the docker image weareathlon/jenkins: do you have an other docker image already build to advice ? I think you are doing this in your udemy course, but i am not sure. Do you give any personnal help for a french lady ?

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

      Try this image vdespa/newman

  • @MonishaVetrivel-ui3uk
    @MonishaVetrivel-ui3uk Год назад

    Hai this is very helpful how can i access the global variable and how can i access the run time collection setted collection variable to another api

  • @momc2011
    @momc2011 5 месяцев назад

    Could you share the collection please to practise

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

    If i want to pass multipartfile as parameter in request how to make sure that jenkins takes that file during build?

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

    Hi Valentin, Thanks for the tutorial. This is really helpful.
    If I want to run the Postman collection on some cloud based K8 setup through jenkins, the installation of newman and html report would be on my laptop or on the cloud setup? Also the collection has an environment (as a setup), how should I configure all this with jenkins. Please reply

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

      Everything that you need need to be available to your Jenkins installation where Jenkins is running. Having stuff installed on your computer would not make sense.

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

    Hi, Thanks for the tutorials, Its really helpful.
    I have 1 query. Is it possible to run a collection that has secret keys as variable in environment without exposing it from jenkins?
    We are planning to run postman collection file stored in bitbucket via jenkins but in that case I have to export password containing environmental variables too

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

      You can use secrets in Jenkins and pass them to Newman from the CLI. Would this help?

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

      @@vdespa Thanks for the reply but how to pass that in newman command any reference link you have? :)

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

    Hi despa when we run apis in postman it's working fine when I run apis in new man all apis got failed can u plz help me on this

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

    CreateProcess error=2, The system cannot find the file specified, now

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

    how to run multiple collections from newman? do we need to write a for loop that iterates through the folder containing the json files? if so , can you pls share that logic as well?

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

      Yes, you can write a loop that does that. It is not clear why you need this in the first place.

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

      @@vdespa simply to be able to run more of them without manually having to edit it each time! if you can help here that will be great!!
      thanks

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

    Hi Valentina Despa,
    If i have any external file which has request body for only one of the request in the collection and i need to run only that particular api request with external file and other api request in the collection with what ever request body which is specified in the request body, What should be the solution for the same?
    Thanks in Advance.

    • @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.

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

    i have client id and password which i am passing through environment.json and able to execute it through postman but my requirement is how to automate through jenkins pipeline without commiting my password to gihub and run through the pipeline?

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

      Is this issue resolved? I have similar issue

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

    The latest changes to Postman tests don't reflect in Newman?

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

      From where does Newman read the collection?

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

      @@vdespa I change a few things in the collection for example adding 1 request, then if I run Newman again, will the results update to the new change ?

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

      @@dailylife1504 Depends from where you are reading the collection.

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

    Спасибо

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

    Hi Valentine Despa,
    I'm getting the "Assertion error" when I run my script using newman, I also used environment for the same .
    │ executed │ failed │
    ├─────────────────────────┼─────────────────────┼─────────────────────┤
    │ iterations │ 1 │ 0 │
    ├─────────────────────────┼─────────────────────┼─────────────────────┤
    │ requests │ 12 │ 0 │
    ├─────────────────────────┼─────────────────────┼─────────────────────┤
    │ test-scripts │ 24 │ 1 │
    ├─────────────────────────┼─────────────────────┼─────────────────────┤
    │ prerequest-scripts │ 14 │ 0 │
    ├─────────────────────────┼─────────────────────┼─────────────────────┤
    │ assertions │ 42 │ 42 │

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

      You may need to generate the HTML report and see why the test fails.

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

    Hi @vdespa I'm getting this error
    error: EROFS: read-only file system, mkdir '/newman'

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

    newman run \users\projects\apitesting\api_testing.postman_collection.json -g \Users\projects\apitesting\Documentintake_sanbbox.postman_environment.json --global-var "Username={{Username}}" --global-var "Password={{Password}}" -- trying like this but somehow usename/password not getting and unable to generate secure token to hit the endpoint

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

    I am using this command ( "newman run $PostmanCollection -d $JsonBodyRequest.txt) and work successfully for the Post Requests and it worked very good. but since I need the response back, I want to use it with node, but I don't know how to send the file $JsonBodyRequst.txt to the same Collection? please help

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

      You need to look into how to read environment variables in a Node.js script.