How to run Postman API Tests with Newman in Gitlab CI

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

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

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

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

  • @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 :)

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

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

    Thanks bro! Really cool and simple explanation

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

      I am glad it helped 🤠

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

  • @HendrixRoa
    @HendrixRoa 6 лет назад +1

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

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

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

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

  • @Dudarinho
    @Dudarinho 5 лет назад +1

    thank you for tutorial, great explanation!

  • @maheshjoshi4160
    @maheshjoshi4160 6 лет назад +1

    Awesome job!

  • @kamilabeshirova7130
    @kamilabeshirova7130 5 лет назад +1

    Great, thank you very much

    • @vdespa
      @vdespa  5 лет назад

      Thank you for watching!

  • @jakub3412
    @jakub3412 6 лет назад

    Amazing tutorial, thank you very much. :)

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

  • @ВадимРебриков-ф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.

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

  • @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  5 лет назад +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 5 лет назад +1

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

    • @vdespa
      @vdespa  5 лет назад +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 5 лет назад

      @@vdespa Thank you so much, appreciate it.

    • @vdespa
      @vdespa  5 лет назад

      @@vipul338 You are welcome!

  • @rusynvasyl
    @rusynvasyl 4 года назад +1

    Thank you so much

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

      No problem

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

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

  • @kulfie
    @kulfie 5 лет назад

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

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

    Thank you!

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

      You're welcome!

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

    Excelente video, pudiera hacer eso mismo pero en Github?

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

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

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

  • @jafarili
    @jafarili 6 лет назад

    I liked it, thanks

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

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

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

  • @satishkurakula
    @satishkurakula 4 года назад

    how to go to command cli in gitlab 8:03

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

      Click on the job name. See ruclips.net/video/Jav4vbUrqII/видео.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.