Jenkins not starting newman

Hi,

I am able to run newman successfully from command line and get the results.

I have created a new Job in Jenkins with build command as “newman run c:\auto\test_collection.json” and start the build, jenkins console shows the the result is successful, however I dont see test result in console.

Here is the console:

tarted by user Administrator Building in workspace C:\Users\ven.snarayana.jenkins\workspace\Jenkins_Newman_Test [Jenkins_Newman_Test] $ c:\windows\system32\cmd.exe -xe C:\Users\VEN~1.SNA\AppData\Local\Temp\jenkins5849775247078634500.sh Microsoft Windows [Version 6.1.7601] Copyright © 2009 Microsoft Corporation. All rights reserved. C:\Users\ven.snarayana.jenkins\workspace\Jenkins_Newman_Test>Finished: SUCCESS

please provide any inputs to resolve the issue

Regards,
Sateesh

Since your Newman test runs in a separate shell (cmd.exe -xe …) its output goes there. The shell is closed after the test is finished and Jenkins simply notes and displays the result.

Try redirecting the output of your Newman test into a file and dump its content after the test. Then you should see the test result in the Jenkins console.

PS: you might want to change the subject of your question because judging by the output you provided your test runs after all!

Thanks for the reply tkloeber.

I dont see newman starting in a seperate shell. As you suggested I tried to redirect the output to a file, I dont see any output file created , though the Console output in Jenkins shows as SUCCESS.

I have followed the steps mentioned in https://www.getpostman.com/docs/v6/postman/collection_runs/integration_with_jenkins

Only difference is in the post linux/mac is mentioned as OS, in my case it is Windows 7.

Can you show us your Jenkins configuration and what commands you’re executing.

Here is my Jenkins configuration:
General Description - Test Jenkins and Postman integration
Source Code Management - None
Build Triggers - Not selected any option
Build Environment

  • Execute Shell : newman run c:\learn\Loyalty.postman_collection.json

works fine for me on Linux…

Is there any other setting that we need to configure in Manage Jenkins-> Configure System.

Issue is resolved after changing the Build Environment from “Execute Shell” to “Execute Windows Batch Command”