How to run Postman API Tests with Newman in Gitlab CI

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 ธ.ค. 2024

ความคิดเห็น • 79

  • @vdespa
    @vdespa  4 ปีที่แล้ว +3

    💥 Want to learn more about Postman or GitLab CI? Check my online courses.
    vdespa.com/courses/?q=TH-cam

  • @ashimov1970
    @ashimov1970 3 ปีที่แล้ว +1

    Thumbs up... Perfect points perfectly delivered. Greetings from Kazakhstan

    • @vdespa
      @vdespa  3 ปีที่แล้ว +1

      Thanks!

  • @jazzlevit
    @jazzlevit 4 ปีที่แล้ว +3

    Watching you from Ukraine, great explanation. Many things is new for me

    • @vdespa
      @vdespa  4 ปีที่แล้ว +1

      Great to hear it is helpful 👍 Thanks, Aleksey!

  • @OmarSyd
    @OmarSyd 5 ปีที่แล้ว

    Awesome! I was able to setup my postman pipelines in no time using your tutorial. Worked for me in one attempt. Thank you :)

  • @timurkhasanov5978
    @timurkhasanov5978 3 ปีที่แล้ว +1

    Thanks bro! Really cool and simple explanation

    • @vdespa
      @vdespa  3 ปีที่แล้ว

      I am glad it helped 🤠

  • @HendrixRoa
    @HendrixRoa 6 ปีที่แล้ว +1

    Excellent job, very clear. I like the classic music too.

  • @theresacourage3237
    @theresacourage3237 4 ปีที่แล้ว +1

    Thanks so much for the Udemy training and resources. They are clear and concise!

    • @vdespa
      @vdespa  4 ปีที่แล้ว

      You are welcome, Theresa! I am glad I could help.

  • @luizmeier
    @luizmeier 6 ปีที่แล้ว +1

    I liked it a lot. More Gitlab videos would be awesome. Thank you.

    • @luizmeier
      @luizmeier 6 ปีที่แล้ว

      @@vdespa Laravel 5.7 with nGinx, mySQL 8.0+ would be great. Also, in my system, I'm using VueJS (comes with Laravel) with Vuetify (Google Material). It's easy to set up some Dockers, however, this is my first time with all this process and pipelines. Thank you!

  • @AbhishekPandey-lb6bk
    @AbhishekPandey-lb6bk 3 ปีที่แล้ว

    You are superb in your explanations !

    • @vdespa
      @vdespa  3 ปีที่แล้ว +1

      Thanks. I am glad this helped.

    • @AbhishekPandey-lb6bk
      @AbhishekPandey-lb6bk 3 ปีที่แล้ว

      @@vdespa thank you Valentin, can you please help why I am getting the following error
      1. JSONError
      No data, empty input at 1:1
      ^
      at test-script

    • @vdespa
      @vdespa  3 ปีที่แล้ว +1

      @@AbhishekPandey-lb6bk Sure. The response body is empty and you are trying to parse it as JSON.

  • @2809vivek
    @2809vivek 10 หลายเดือนก่อน

    Clear and crisp! brilliant

    • @vdespa
      @vdespa  10 หลายเดือนก่อน

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

    • @deepakrajpal1922
      @deepakrajpal1922 8 หลายเดือนก่อน

      is this tutorial still valid?

  • @yermekdevops1163
    @yermekdevops1163 3 ปีที่แล้ว +1

    Thanks a lot for the video!

    • @vdespa
      @vdespa  3 ปีที่แล้ว

      You are welcome

  • @abdelaziznassif3845
    @abdelaziznassif3845 2 ปีที่แล้ว +1

    amazing tutorial

    • @vdespa
      @vdespa  2 ปีที่แล้ว

      Thank you! I am glad that you liked it.

  • @manpt123
    @manpt123 2 ปีที่แล้ว +1

    Hi, thank you so much for the video.

    • @vdespa
      @vdespa  2 ปีที่แล้ว

      Glad that you liked it. You are welcome. Thank you for leaving a comment.

  • @Dudarinho
    @Dudarinho 5 ปีที่แล้ว +1

    thank you for tutorial, great explanation!

  • @maheshjoshi4160
    @maheshjoshi4160 6 ปีที่แล้ว +1

    Awesome job!

  • @jakub3412
    @jakub3412 6 ปีที่แล้ว

    Amazing tutorial, thank you very much. :)

  • @kamilabeshirova7130
    @kamilabeshirova7130 5 ปีที่แล้ว +1

    Great, thank you very much

    • @vdespa
      @vdespa  5 ปีที่แล้ว

      Thank you for watching!

  • @aherasplay
    @aherasplay 3 ปีที่แล้ว

    can you say in what video are you explaining how to show html report inside gitlab without downloading, in this video is you mention it at 8:30

  • @rusynvasyl
    @rusynvasyl 4 ปีที่แล้ว +1

    Thank you so much

    • @vdespa
      @vdespa  4 ปีที่แล้ว

      No problem

  • @resident77777
    @resident77777 3 ปีที่แล้ว

    Thank you!

    • @vdespa
      @vdespa  3 ปีที่แล้ว

      You're welcome!

  • @pratishpatel5364
    @pratishpatel5364 2 ปีที่แล้ว

    how to run multiple postman collection file in giltab pipeline which can automatically get picked up as it added into gitlab repo?

  • @ВадимРебриков-ф2м
    @ВадимРебриков-ф2м 8 หลายเดือนก่อน

    Hi Valentin. Could you please answer, what Postman plan(professional or Interprise) allows Postman CI/CD integration in Gitlab?

    • @vdespa
      @vdespa  8 หลายเดือนก่อน +1

      You can use any plan, including the free plan.

  • @kulfie
    @kulfie 5 ปีที่แล้ว

    Could you tell us how to generate reports for a c++ program?

  • @vipul338
    @vipul338 5 ปีที่แล้ว +2

    It's explained so very well. Thank you so much. One quick help, how can we send these reports as email attachment after pipeline execution completed? Thanks in advance.

    • @vdespa
      @vdespa  4 ปีที่แล้ว +1

      Thank you for your comment. Gitlab does not have a built-in email possibly. If you require this, you will need to use a 3rd party email provider to send the reports.

    • @vipul338
      @vipul338 4 ปีที่แล้ว +1

      @@vdespa Can you share across the 3rd party providers supported by Gitlab to send emails? Thanks

    • @vdespa
      @vdespa  4 ปีที่แล้ว +1

      @@vipul338 As this is a script / API, you can use any provider you like. It seems that there is no 3rd party integration that allows this. I am written a blog post that I think can help you: medium.com/@vdespa/send-gitlab-ci-reports-artifacts-via-e-mail-86bc96e66511

    • @vipul338
      @vipul338 4 ปีที่แล้ว

      @@vdespa Thank you so much, appreciate it.

    • @vdespa
      @vdespa  4 ปีที่แล้ว

      @@vipul338 You are welcome!

  • @pvsharinath
    @pvsharinath 5 ปีที่แล้ว

    @Valentin Despa
    Getting error as "This GitLab CI configuration is invalid: root config contains unknown keys: postman_tests". Can you please help

  • @ambioriscid9600
    @ambioriscid9600 ปีที่แล้ว

    Excelente video, pudiera hacer eso mismo pero en Github?

  • @jafarili
    @jafarili 6 ปีที่แล้ว

    I liked it, thanks

  • @soniapascal760
    @soniapascal760 2 ปีที่แล้ว +1

    Hi valentin, thank you very much, i watch, rewatch and rerewatch your videos as they are very complete and clear ! I may dream of them but today i ¨face an issue that i can't solve with 'npm install -g newman-reporter-htmlextra', i got the error 'could not get uid/gid' . Do you have any idea ? i tried several config as 'set unsafe-perm true' but it doesn't change the error ! thanks

    • @vdespa
      @vdespa  2 ปีที่แล้ว

      Hey Sonia thank you for watching my videos and I'm very sorry for the late reply. Please check your Node.js version and make sure that you are using LTS.

    • @vdespa
      @vdespa  2 ปีที่แล้ว

      Hey Sonia thank you for watching my videos and I'm very sorry for the late reply. Please check your Node.js version and make sure that you are using LTS.

  • @syedjunaid123
    @syedjunaid123 5 ปีที่แล้ว

    @Valentin Despa: The newman job which I run in Gitlab - CI, never ends.
    I also came across the issue raised GitLab. i.e. gitlab.com/gitlab-org/gitlab-runner/issues/3038,
    but I couldn't find the resolution to solve this.

  • @ikromnurrohim
    @ikromnurrohim 3 ปีที่แล้ว

    how to configure?, if an API protect with VPN to request ? I have the problem. help me please

    • @vdespa
      @vdespa  3 ปีที่แล้ว +1

      See the video description the link for the Postman community. Ask your question there, provide more details.

    • @ikromnurrohim
      @ikromnurrohim 3 ปีที่แล้ว

      @@vdespa thanks🙏

  • @iltibas
    @iltibas 3 ปีที่แล้ว

    Is there an option to automatically push your collection to Gitlab without exporting the collection to a folder?
    I tried an API integration with Gitlab on a custom domain but it failed.

    • @vdespa
      @vdespa  3 ปีที่แล้ว +1

      Yes. From a team workspace, you can sync to GitLab. Also you can use the Postman API to fetch the collection.

    • @iltibas
      @iltibas 3 ปีที่แล้ว

      @@vdespa Thanks for your reply. Do I need to have pro version for both options?

    • @vdespa
      @vdespa  3 ปีที่แล้ว +1

      @@iltibas as far as i recall, if you team size is below 5, you don't need pro.

    • @iltibas
      @iltibas 3 ปีที่แล้ว

      @@vdespa Good to hear. Can you shortly explain how to activatie the sync to gitlab since I am not able to integrate by API.

  • @Nei月牙天衝-y7u
    @Nei月牙天衝-y7u 2 ปีที่แล้ว

    It is not clear if you need to have your application running. In the case of gitlab ci, I can't afford to have my docker container up or a dotnet run while running newman because the image differs. I put me swagger.json on artifacts and used it in a job with newman, but I get no API calls on the report.

    • @vdespa
      @vdespa  2 ปีที่แล้ว

      The application exposing the API that you are testing needs to run somewhere for Postman to be able to reach it.

  • @BrunoPulis
    @BrunoPulis 5 ปีที่แล้ว

    Hi guys in this tutorial the image was deprecated, the correct image to use is "postman/newman:alpine "

    • @BrunoPulis
      @BrunoPulis 5 ปีที่แล้ว

      @@vdespa by the way, thanks for your awesome tutorials. I have a question, how can I configure the newman-reporter-htmlextra on my Gitlab CI?

    • @BrunoPulis
      @BrunoPulis 5 ปีที่แล้ว

      @@vdespa I will try, thanks for the support. I bought your course from Postman and I show it to QA Team. They're enjoyed so much.

  • @abderhafy2101
    @abderhafy2101 5 ปีที่แล้ว

    i don't know why i find my report html empty

  • @doghosuedean
    @doghosuedean 5 ปีที่แล้ว

    Excellent tutorial Valentin, just what I needed. I have a flask application and wondered if you know of a way to test it using gitlab CICD?
    Is it possible to deploy the flask app then use newman to test it all in the same .gitlab-ci.yml?

  • @satishkurakula
    @satishkurakula 4 ปีที่แล้ว

    how to go to command cli in gitlab 8:03

    • @vdespa
      @vdespa  4 ปีที่แล้ว

      Click on the job name. See th-cam.com/video/Jav4vbUrqII/w-d-xo.html

    • @satishkurakula
      @satishkurakula 4 ปีที่แล้ว

      @@vdespa hi Valentin I have locally the test coverage of 58% locally but was not getting the same in gitlab coverage like 39% why is it like that? Do I need to change yml file or should I have to improve test using test scripts locally. Could you please give me reply as soon as possible? Your reply will be helpful to looking for your reply.

    • @vdespa
      @vdespa  4 ปีที่แล้ว

      @@satishkurakula i am sorry but I am not sure if this has anything to do with Gitlab. Double-check the config with the tool responsible for code coverage.

    • @satishkurakula
      @satishkurakula 4 ปีที่แล้ว

      @@vdespa it's Django and python web app and pytest

  • @somaghosh-kj1bf
    @somaghosh-kj1bf 4 ปีที่แล้ว +1

    Hello Valentine , I have been following you quite some time and learnt a lot. Followed you in Udemy and done the course as well. I have come across an issue while integrating my postman collections to Gitlab CI/CD. I am just stuck if you could please help me in this. Getting an error in Report :
    $ npm install -g newman-reporter-htmlextra
    npm WARN deprecated gulp-header@1.8.12: Removed event-stream from gulp-header
    npm WARN deprecated urix@0.1.0: Please see github.com/lydell/urix#deprecated
    npm WARN deprecated resolve-url@0.2.1: github.com/lydell/resolve-url#deprecated
    npm WARN deprecated core-js@2.3.0: core-js@ core-js@3.6.5 postinstall /usr/local/lib/node_modules/newman-reporter-htmlextra/node_modules/core-js
    > node -e "try{require('./postinstall')}catch(e){}"
    npm WARN newman-reporter-htmlextra@1.15.1 requires a peer of newman@>=4 but none is installed. You must install peer dependencies yourself.
    + newman-reporter-htmlextra@1.15.1
    added 574 packages from 738 contributors in 26.607s and the Report which is generated is failed and says " connect ECONNREFUSED 127.0.0.1:8443 ..."
    I have tried finding out the solutions but unable to . Please help me urgently. Please let me know if I can reach out to you by any means email or call. Thanks

    • @vdespa
      @vdespa  4 ปีที่แล้ว

      Hi Soma, I am sorry this is not working. Try sending me a message on Udemy or post in the Q&A section a few screenshots and additional details.

  • @SoniaSonia-ku9fy
    @SoniaSonia-ku9fy 2 ปีที่แล้ว

    Hi Valentine, thanks for recording this session. I have few doubts. If you could help
    GITLab is installed on separate machine and GITRunner installed on separate machine.
    Getting below error:
    $ newman --version
    newman : The term 'newman' is not recognized as the name of a cmdlet,
    function, script file, or operable program. Check the spelling of the name, or
    if a path was included, verify that the path is correct and try again.
    At C:\windows\TEMP\build_script3208335063\script.ps1:229 char:1
    + newman --version
    + ~~~~~~
    + CategoryInfo : ObjectNotFound: (newman:String) [], CommandNotFo
    undException
    + FullyQualifiedErrorId : CommandNotFoundException
    This is my .yml file:
    stages:
    - test
    newman_tests:
    stage: test
    tags:
    - ci
    - ssh
    image:
    name: postman/newman
    entrypoint: [""]
    script:
    - newman --version
    - newman run ./Postman_Collections/INT0204_CreateUpdateCustomer.json

    • @vdespa
      @vdespa  2 ปีที่แล้ว

      It seems that your GitLab Runner does not have the Docker executor. You are using a shell executor, which would explain the problem.