Build postman collection using newman in Jenkins - No Result in Console - jenkins

I am getting the Build: SUCCESS message on jenkins Console output, but not the detailed result like Iterations, executed vs failed etc.
i am using "newman run https://www.getpostman.com/collections/559ca99c65470714895de" as 'Execute Windows Batch Command'.
am i missing any plug-ins? please help?

The collection link you have provided is not valid.
Please make sure you have the following configurations before you run newman:
npm and node installed globally on jenkins.
If not refer to Node Installation
newman installed globally on the jenkins.
If not $ npm install -g newman
please execute the command on shell (not on Windows Batch Command)
Mention the cli reporter and exitCode to let jenkins know incase of any falure in the command as $ newman run <your collection goes here> -r cli --exitCode 1
Recommended: Create a node app and run your tests for advanced reporting and easy maintenance. Ex: Sample Newman Node Application with Custom Reporters

Related

Error "$ cmd /c call C:\Windows\TEMP\jenkins6446000872510816227.bat The syntax of the command is incorrect."

Error "$ cmd /c call C:\Windows\TEMP\jenkins6446000872510816227.bat The syntax of the command is incorrect." while executing job for running JMeter test in Jenkins
Going to TEMP folder there was no jenkins6446000872510816227.bat file error aswell. What could be teh issue and what is the solution for this?
Expecting my job build be SUCESS but it is a failure due to this error
Your question doesn't have sufficient amount of details so we cannot troubleshoot your issue.
It's possible to run JMeter script in command-line non-GUI mode like:
c:\apps\jmeter\bin\jmeter.bat -n -t test.jmx -l result.jtl
It's possible to run Windows batch scripts in Jenkins
If it doesn't work for you first check that you can run JMeter test without issues in command-line non-GUI mode on the Jenkins build agent and then double check the syntax of your "Execute Windows batch command" section of the job.
More information: The Complete Guide to Continuous Integration With Jenkins

Build Postman collection fails in Jenkins

Newman is installed on my machine and newman run "https://www.getpostman.com/collections/number" command run the collection on my machine. But when i type the same command to run it in jenkins Build fails. In the console output displayed strange letters.
Console Output screenshots are attached.
Thanks for ready to help me!
enter image description here

Unable to invoke Browser from Jenkins Job for Protractor Code (Note: Jenkins is set-up through Docker Image)

Mentioning the steps that I have followed and the problem that I am facing:
I have pulled jenkins image through below docker command
docker pull jenkins/jenkins:lts
Jenkins is up, Git integration also seems fine as it clones the git repo. The only folder which does not get cloned is webdriver-manager.
I have used below commands in the Jenkins Job 'Execute Shell' (Note I have tried both with g and without g)
npm install -g protractor
npm install -g chromedriver
webdriver-manager update
protractor conf.js
I get below message in the console
[08:31:26] I/update - chromedriver: unzipping chromedriver_88.0.4324.96.zip
[08:31:26] I/update - chromedriver: setting permissions to 0755 for /var/jenkins_home/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/NodeJS/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_88.0.4324.96
which shows that it has extracted chormedriver in this folder "node_modules/protractor/node_modules" but when I go there in workspace it is not present.
I get below console error after execution
protractor conf.js
[08:31:29] I/launcher - Running 1 instances of WebDriver
[08:31:29] I/direct - Using ChromeDriver directly...
[08:31:29] E/runner - Unable to start a WebDriver session.
[08:31:29] E/launcher - Error: Error: Server terminated early with status 127
at /var/jenkins_home/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/NodeJS/lib/node_modules/protractor/node_modules/selenium-webdriver/remote/index.js:252:52
at processTicksAndRejections (node:internal/process/task_queues:94:5)
[08:31:29] E/launcher - Process exited with error code 100
Build step 'Execute shell' marked build as failure
Problem statement Unable to invoke the browser so test execution gets failed.
Current Solutions that I have read - It suggests to run in headless mode, but I want to run it in browser where I can see the execution, I don't want to run headless
Please help, thanks

When deploying a job, is it possible that the command returns after the deployment is complete?

I'm using maven to deploy my jobs on Google Cloud Dataflow, with the folowing command :
mvn compile exec:java -Dexec.mainClass=org.beam.StreamerRunner --Dexec.args="\
...
--runner=DataflowRunner \
..."
It deploys successfully, and it is pulling the log from the dataflow job and printing them on the output. I'm wondering if it is possible to tell the deployment to not pull and just returns.
Indeed, my CI tool (TeamCity) I'm using to deploy my job, is also waiting never ending.
I obviously can run the maven command in a nohup, but maybe an option does exist to exit the command after the deploy is complete.
As Alex pointed out I was calling waitUntilFinish in my code, so it dit exactly what I asked it to do.
It was fixed as soon as I removed the calle to
waitUntilFinish()

Jenkins Startup a Command Line Executable

I'm new to Jenkins and i'm trying to setup a CI pipeline for a macOS Server / iOS environment. My environment integrates with Xcode server and one of the things I want to do is run a command line application that talks to Xcode server API and processes the last set of integrations. My command line application works properly when invoked in the terminal but I would like Jenkins to be able to invoke this as one of the build steps.
My execute shell build step looks like this:
export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer/
security unlock-keychain -p ${KEYCHAIN_PASSWORD} ${KEYCHAIN_PATH}
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k ${KEYCHAIN_PASSWORD} ${KEYCHAIN_PATH}
xcrun xcodebuild clean build CODE_SIGN_IDENTITY="${CODE_SIGNING_IDENTITY}" PROVISIONING_PROFILE=${PROVISIONING_PROFILE} OTHER_CODE_SIGN_FLAGS="--keychain ${KEYCHAIN_PATH}"
sh /usr/local/bin/my-command-line-app
The build is successful but fails when trying to invoke the command line app.
The error I get from the jenkins console is:
cannot execute binary file
Build step 'Execute shell' marked build as failure
Finished: FAILURE
Now I have placed this executable in 2 locations both of which failed.
1. sh /usr/local/bin/my-command-line-app
2. sh /Users/Shared/Jenkins/Home/workspace/my-command-line-app
I also tried chmod +x to the my-command-line-app to try and change the permissions but this still results in the same error.
If anyone has any tips on how to configure this, I would appreciate it.

Resources