Run Postman / Newman Tests in TeamCity CI/CD

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 ม.ค. 2025

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

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

    Really good. Concise, comprehensive, and well-organized.

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

    Implemented this into my project - you are code-god

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

    Your videos are awesome boss ! Please do this for jenkins!

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

    Thanks for the help, recommend!!!

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

    Really good session, I have one question here, can we attach that report to an email and send that email to our teams over outlook , please let me know

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

    great video, do you have similar article or video for running and reporting on vsts/tfs builds with junit reporter

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

    Hi Despa. It is avery clear and informative video. I tried using the teamcity reporter in newman as a npm library i.e. I am running test from a js file. It is not publishing the report. Any idea if this is supported?

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

    Hi, I liked your tutorial very straightforward but I am getting an error while I am trying to run postman tests on Teamcity server. Although I have installed node, npm and newman -g. When I run from TeamCity Command line build step it doesn't recognize newman command
    when I run these all three commands on teamcity server command prompt I get this:
    node -v
    v12.14.0
    npm --version
    6.13.4
    newman --version
    4.5.7
    In the TeamCity build step, under Check requirements step, it works for node -v and npm -v but for newman --version ,but it is exited with code 0. Probably, it is not able to find where newman is installed? I also tried this $setx /M PATH %AppData%
    pm but still doesn't work
    I also tried running running newman by actually from the directory where my tests are located it shows 'node' is not recognized. However, I tried running the tests on my local desktop, I can run the tests from tests directory but that approach wouldn't work in TeamCity since it shouldn't be absolute path for location of the tests.
    I have provided screenshots on stackoverflow post stackoverflow.com/questions/60330443/teamcity-newman-is-not-recognized-as-an-internal-or-external-command
    Any help would be very appreciated.

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

      Hi, thank you for your appreciation. The most common cause for this error is having newman executed under a different user. The path to newman / node should be in the system path variable so that all users have access to it. Hope this helps.

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

      @@vdespa Thank you for your response. Yes, I tried that too. I added under both User variables and System variables like this
      %USERPROFILE%\AppData\Roaming
      pm
      It doesn't work, any other clue?

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

      @@vdespa Never mind, I figured, I had to install the npm globally by grabbing the actual path teamcity build server was using. Initially it had installed globally just for my profile on that machine. Thanks for all the help.

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

      Thank you for posting this I really appreciate your comment

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

      @@vdespa Sorry to bother you again after I installed newman reported I had to restart the server but after the teamcity server restarted, newman stopped working. I have tried different ways by uninstalling and installing it again but it doesn't work for some reason. It works locally or with other user on the server.
      I ran this command as build step "npm prefix -g" and it returned following:
      C:\Windows\System32\config\systemprofile\AppData
      pm
      So knowing that build agent has access to this path I installed newman at that location and added this path under system variables
      but I still get "newman is not recognized" error.
      Another solution I tried by directly initializing newman.cmd by specifying absolute path
      "C:\Windows\System32\config\systemprofile\AppData
      pm
      ewman.cmd" newman -v
      which returns the version 4.6.0
      but newman run command doesn't work
      e.g. "C:\Windows\System32\config\systemprofile\AppData
      pm
      ewman.cmd" newman run -h
      results in error: invalid command newman,run
      any help would be great.

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

    Hey, I installed newman using npm install -g newman, it installed successfully but teamcity can't recognize the newman when trying to run or check version. Any help please?

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

      Join the Facebook community (see link in the description) and ask your question there. Consider adding more details, including screenshots. Thanks for understanding.