How to automate testing network requests of current project build?

Hi all,

From what I understand, using Newman through Jenkins is for testing API calls on servers that are always running.

What I’m trying to achieve is to run automated Postman tests through Jenkins that check my own project’s back-end server responses. Normally I would manually run my server through IntelliJ and then run the Postman collections myself. Is there a way to tell Jenkins to automatically run the server locally and then send some GET requests to it through Newman?

We already use Selenium which runs the server before automating some UI tests, but the problem is Selenium can’t read network requests/responses.

Hi @veely1,

Welcome to the Postman community! There are some options available in the configure section for a Jenkins project which may assist you in achieving your use case. After creating a Jenkins project, if you click on Configure, you have an option to execute shell commands in the ‘Build’ section where you can add the requisite commands to run the server locally as well as run collections using Newman as shown here:

If you have a Makefile stored in the Github repository, you can add the specific Github repository to the Source Code Management section and type in ‘make’ in the Execute Shell space to run the commands in the Makefile which is stored in the Github repository.

The following thread maybe helpful to you as well: Is it possible to execute an external program from Postman?