- Installation and updates
- Sending your first request
- Creating the first collection
- Navigating Postman
- Keyboard Shortcuts
- Postman account
- New button
- Troubleshooting In-app Issues
- Customizing Postman
- Find and Replace
- Troubleshooting API requests
- Debugging and logs
- Authorizing requests
- Capturing HTTP requests
- Generate code snippets
- Making SOAP requests
- Working with Tabs
- Using GraphQL
- Visualize API responses
- Intro to collections
- Creating collections
- Sharing collections
- Managing collections
- Requesting access
- Using Markdown for descriptions
- Data formats
- Working with OpenAPI
- Commenting on collections
- Version Control for Collections
- Intro to scripts
- Pre-request scripts
- Test scripts
- Test examples
- Branching and looping
- Postman Sandbox
- Postman Sandbox API reference
- Intro to collection runs
- Starting a collection run
- Using environments in collection runs
- Working with data files
- Running multiple iterations
- Building workflows
- Sharing a collection run
- Debugging a collection run
- Command line integration with Newman
- Integration with Jenkins
- Integration with Travis CI
- Newman with Docker
- Documenting your API
- Viewing documentation
- Authoring your documentation
- Publishing your docs
- Custom documentation domains
- Intro to Monitoring
- Setting up a monitor
- Viewing monitor results
- Monitoring APIs and websites
- Set up integrations to receive alerts
- Pricing for monitors
- Troubleshooting monitors
- FAQs for monitors
- Intro to mock servers
- Setting up a mock server
- Mocking with examples
- Mocking with the Postman API
- Matching algorithm
- Introduction to APIs
- Managing APIs
- Sharing APIs and managing roles
- The API Workflow
- Validating Elements Against Schema
- Versioning APIs
- Reporting FAQs
- Viewing and analyzing APIs
- Intro to Workspaces
- Creating Workspaces
- Managing Workspaces
- Using Workspaces
- Sharing collections in Workspaces for version 5
- Viewing changelogs and restoring collections
- What is Postman Pro
- Purchasing Postman Pro
- Upgrading to Postman Pro from a trial team
- Team Settings
- Changing your plan
- Managing your team
- Migrating to Postman v7
- Roles and permissions
- Intro to Enterprise
- Purchasing Postman Enterprise
- Running Postman monitors using static IPs
- Intro to SSO
- Configuring SSO for a team
- Logging in to an SSO team
- Configuring Microsoft AD FS with Postman SSO
- Setting a custom SAML in Azure AD
- Setting up custom SAML in Duo
- Setting up custom SAML in GSuite
- Setting up custom SAML in Okta
- Setting up custom SAML in Onelogin
- Setting up custom SAML in Ping Identity
- Audit logs
- Publishing API documentation
Integration with Jenkins
Newman allows you to run and test a Postman Collection. Newman and Jenkins are a perfect match. Let's review these topics to set up this operation.
- Run a collection in Postman
- Run a collection using Newman
- Set up Jenkins
- Configure frequency of runs
Note: We are using Ubuntu as a target OS as in most cases your CI server would be running on a remote Linux machine.
Install NodeJS and npm. Newman is written in NodeJS and we distribute the official copy through npm. Install nodejs and npm for Linux.
Install Newman globally, to set up Newman as a command line tool in Ubuntu.
$ npm install -g newman
We assume you already have a Postman Collection with some tests. Run the collection in the Postman app. Here's an example of the output in Postman’s collection runner.
Some of the tests are failing intentionally in the screenshot so we can show you the instructions for troubleshooting.
Run this collection inside Newman, using the command below. If everything is set up nicely, you should see the output below.
Jenkins exposes an interface at
Create a new job by clicking on the “New Item” link on the left sidebar > Select a “Freestyle Project” from the options > Name your project.
Add a build step in the project. The build step executes a Shell command.
Here is the command:
$ newman jenkins_demo.postman_collection --exitCode 1
Note here that we are using the Newman command parameter “exitCode” with the value
1. This denotes that Newman is going to exit with this code that will tell Jenkins that everything did not go well.
Click the Save button to finish creating the project.
Run this build test manually by clicking on the “Build Now” link in the sidebar.
Jenkins indicates that the build has failed with a red dot in the title. We can check why with the console output from Newman.
Click the “Console Output” link in the sidebar to see what Newman returned.
Fix these tests inside Postman and then try again.
You can move on once you see green pass icons for all your tests like the screenshot above.
Jenkins indicates that the build succeeded with a blue ball.
To set up the frequency with which Jenkins runs Newman, click on “Configure project” in the main project window and then scroll down.=. The syntax for setting the frequency is
H/(30) * * * *.
Note: 30 can be replaced with another number.
Jenkins will now run Newman at your desired frequency and will tell you whether the build failed or succeeded. In a bigger setup, Newman will be part of your build process and probably not the entire process. You can set up notifications and customize Jenkins as per your needs.
You can use a wide variety of other configurations to make your collection more dynamic.
For more information about collection runs, see: