Enroll in Selenium Training

In the series of Postman Tutorial we have learnt about Postman & Newman and their features. For mastering completely in Postman we just need one more element to complete this course. This element is Jenkins. So in this tutorials we will be talking on Postman with Newman & Jenkins. Basically Postman is not just a software today. Now Postman is not Postman but a package of Postman, Newman and Jenkins. This package helps to complete the circle of automated testing and deliver good quality software. Since we have discussed the first two elements, we will be focusing on Jenkins on the next few tutorials, so that we understand the benefits of Postman with Newman & Jenkins. Let's start with getting you familiar with it.

jenkins_Main_Logo

What is Jenkins?

Jenkins is an open source automation server written in Java. Jenkins is used to build and test you project continuously and hence making the work of a developer and a tester easy for the software. To get it in familiar terms that we studied, Jenkins uses continuous integration and continuous development for the development and deployment of the software and all this makes the work of a developer easy. With Jenkins, organizations can accelerate the software development process through automation. Jenkins integrates development life-cycle processes of all kinds, including build, document, test, package, stage, deploy, static analysis and much more.

Remember in the last tutorial we studied about the continuous integration which in short means every time your code is pushed to the repository, some tests case are automatically executed on the code. This helps the developers check the build if it is correct or not. If we do not perform continuous integration "continuously" but occasionally we might not get in which build got failed and due to which issue. Jenkins does the same, it helps the developer and tester by continuous integration and continuously checking for the quality of the build. But we have not learnt about the second term (Continuous delivery) that we used above. So let's do that now.

What is Continuous Delivery?

Continuous Delivery is built on top of Continuous Integration, which means that Continuous Delivery (CD) is not possible if the Continuous Integration (CI) is not in place. Continuous delivery works as a next step of continuous integration. Continuous delivery is a DevOps software development practice where code changes are automatically built, tested (Unit Tests), and prepared for a release to an environment. This environment can be anything from staging, pre-production or production. In a way it expands upon continuous integration by deploying all code changes to a testing environment and/or a production environment after the build stage.

Continuous delivery lets developers automate testing beyond just unit tests so they can verify application updates across multiple dimensions before deploying to customers. These tests may include UI Tests, Performance Tests, Integration Tests, API Tests. As you know that UI or other tests needs an environment to run, hence continuous delivery actually deploys the application on the specified environment and where the other tests like API & UI will get executed. This helps developers more thoroughly validate updates and preemptively discover issues.

Hence, the developers are notified of the same and manually they push it in to the production environment from where the software is released to the customers/clients. Continuous delivery automates the entire software release process. Every revision that is committed triggers an automated flow that builds, tests, and then stages the update. The final decision to deploy to a live production environment is triggered by the developer.

What is Continuous Deployment?

The difference between continuous delivery and continuous deployment is the presence of a manual approval to update to production. With continuous deployment, production deployment happens automatically without explicit approval. Which means that In continuous deployment, the last step is also automated and the code is pushed automatically without any intervention of the developer.

We can also say that it is a step up from continuous delivery as it is fully automated. Since it is fully automated, it would be easier to guess that it requires very careful environment process and only few companies will be applying it. These careful precautions include having a highly developed monitoring culture and having the ability to recover quickly.

continuous-delivery-vs-continuous-deployment

So, Jenkins is a software that automates the tests and provides continuous integration and continuous delivery/continuous deployment. Continuing with the same, Jenkins gives us further advantages.

Advantages of Jenkins

Jenkins achieves continuous integration with the help of plug-in and there are literally thousands of plugins available for Jenkins. For every work you can find a plug-in for Jenkins and if not, it can be created. Plugin allows the integration of various DevOps stages. If you want to integrate a particular tool, you need to install the plugin for that tool. For example: Git, Maven 2 project, Amazon EC2, HTML publisher etc. Apart from plug-ins there are the following advantages of Jenkins

  • It is an open source tool with great community support
  • It is easy to install.
  • It is free of cost.
  • It is built with Java and hence, it is portable to all the major platforms.

These advantages are of huge importance for any developer or tester. And if anything you did not get we have summarized it in the next section.

Postman with Newman & Jenkins

Jenkins today is being used at a rate that the developer had never imagined. It is soon to become the engine for DevOps. There is no doubt that Jenkins' main source of power is it's plugins. There does not stand any other specific factor to use Jenkins with Postman. There are many alternatives that can be used with Postman but Jenkins is preferred and recommended (also on postman official website). So to say, we will be using Jenkins just because it has greater power than other software and is evolving too. The range of plugins in Jenkins makes it the first choice for anyone. If you want to check the alternatives you can learn about them through searching yourself. They are Atlassian Bamboo, CircleCI, JetBrains TeamCity, ThoughtWorks Snap to name a few.

As we discussed in the above section , continuous integration helps us to combine the different codes and execute tests continuously. This amalgam of tests and code is a success due to continuous integration, which in Postman is done by Newman and Jenkins. Postman Newman is built to easily integrate it with your build systems Jenkins. By this feature, developers get a  quick feedback on the performance of APIs after their code changes. As with the help of Newman, it gets integrated with Jenkins and thereafter if any change is pushed, Jenkins will run the postman collections with Newman.

Summary

Jenkins is a continuous integration server. In short, Jenkins acts as a middle man between your build code and the repository. If it finds any changes in the code, it gathers the code and send them to your build code where automated tests are done. If tests seem okay, one manual push will deliver the same code to the client in case of continuous delivery or else this process will be automated according to continuous deployment. So fast, easy and reliable. I hope you must have got now what is Jenkins and why do we use it. In the next tutorial we will install Jenkins and run some collections.

Newman Optional Parameters & Configurations
Newman Optional Parameters & Configurations
Previous Article
Configure Jenkins Job to Run Batch Command
Configure Jenkins Job to Run Batch Command
Next Article
Harish Rajora
I am a computer science engineer. I love to keep growing as the technological world grows. I feel there is no powerful tool than a computer to change the world in any way. Apart from my field of study, I like reading books a lot and developing new stuff.
Reviewers
Lakshay Sharma's Photo
Lakshay Sharma

Similar Articles

Feedback