Interview questions for Jenkins

1. What is Jenkins?

Jenkins is a free open source Continuous Integration tool and automation server to monitor continuous integration and delivery. It is written in Java.
It is known as an automated Continuous Delivery tool that helps to build and test the software system with easy integration of changes to the system. Jenkins follows Groovy Scripting.
Also, it enables developers to continuously check in their code and also analyze the post-build actions. The automation testers can use to run their tests as soon as the new code is added or code is modified.

2. What are the features of Jenkins?

Jenkins comes with the following features:
1. Free open source.
2. Easy installation on various operating systems.
3. Build Pipeline Support.
4. Workflow Plugin.
5. Test harness built around JUnit.
6. Easy upgrades.
7. Rapid release cycle.
8. Easy configuration setup.
9. Extensible with the use of third-party plugins.

3. What are the advantages of Jenkins? Why we use Jenkins?

Jenkins is used to continuously monitor the large code base in real-time. It enables developers to find bugs in their code and fix them. Email notifications are made to the developers regarding their check-ins as a post-build action.
Advantages of Jenkins are as follows:
• Build failures are cached during the integration stage.
• Notifies the developers about build report status using LDAP (Lightweight Directory Access Protocol) mail server.
• Maven release project is automated with simple steps.
• Easy bug tracking.
• Automatic changes get updated in the build report with notification.
• Supports Continuous Integration in agile development and test-driven development.

4. Mention some of the important plugins in Jenkins?

Plugins in Jenkins includes:
• Gits
• Maven 2 Project
• HTML Publisher
• Copy Artcraft
• Join
• Green Balls
• Amazon EC2

5. What is Continuous Integration in Jenkins?

Continuous integration is the process of continuously checking-in the developer’s code into a version control system and triggering the build to check and identify bugs in the written code.
This is a very quick process and also gives them a chance to fix the bugs. Jenkins is one such continuous integration tool.
In software development, multiple developers work on different software modules. While performing integration testing all the modules are being integrated together. It is considered as the development practice to integrate the code into the source repository
Whenever the programmer/developer makes any change to the current code, then it automatically
gets integrated with the system running on the tester’s machine and makes the testing task easy and speedy for the system testers.
Continuous Integration comprises of:
• Development and Compilation
• Database Integration
• Unit Testing
• Production Deployment
• Code Labeling
• Functional Testing
• Generating and Analyzing Reports

6. What is the difference between Hudson and Jenkins?

There is no difference between Hudson and Jenkins. Hudson was the former name of Jenkins, after going through several issues the name was changed to Jenkins.

7. What is Groovy in Jenkins?

Groovy is the default scripting language that is being used in the development of JMeter Version 3.1.
Currently Apache Groovy is the dynamic object-oriented programming language that is used as a scripting language for the Java platform. Apache Groovy comes with some useful features such as Java Compatibility and Development Support.

8. What are the pre-requisites for using Jenkins?

The answer to this is pretty straightforward. To use Jenkins you require:
• A source code repository which is accessible, for instance, a Git repository.
• A working build script, e.g., a Maven script, checked into the repository.

9. What is the relation between Hudson and Jenkins?

You can just say Hudson was the earlier name and version of current Jenkins. After some issues, they renamed the project from Hudson to Jenkins.

10. Mention some of the useful plugins in Jenkins

Below I have mentioned some important Plugins:
• Maven 2 project
• Git
• Amazon EC2
• HTML publisher
• Copy artifact
• Join
• Green Balls

11. How do you install Jenkins?

To install Jenkins, you just need to follow these five steps:
1. Install Java Version 8 – Jenkins is a Java based application, hence Java is a must.
2. Install Apache Tomcat Version 9 – Tomcat is essential to deploy Jenkins war file.
3. Download Jenkins war File – This war is must to install Jenkins.
4. Deploy Jenkins war File – You deploy Jenkins war file using Tomcat to run Jenkins.
5. Install Suggested Plugins – Install a list of plugins suggested by Jenkins.
Once the installation is complete, you will be able to see the Jenkins dashboard.

12. What are the two components that you can integrate Jenkins with?

According to me, the integration of Jenkins is possible with the following:
• Version Control system like GIT, SVN.
• Build tools like Apache Maven.
If you have anything else in your mind then mention that as well but make sure you include the above two components in your answer.

13. What is Maven? What is the benefit of integrating Maven with Jenkins?

Maven is a build management tool. It uses a simple pom.xml to configure all the dependencies needed to build, test and run the code. Maven manages the full lifecycle of a test project. Once integrated with Jenkins, the maven Webdriver will build the project and execute all tests efficiently.

14. Which SCM tools Jenkins supports?

Here are some of the Source Code Management tools supported by Jenkins:
• AccuRev
• CVS
• Subversion
• Git
• Mercurial
• Perforce
• Clearcase
• RTC

15. What is a trigger? Give an example of how the repository is polled when a new commit is detected.

Triggers are used to define when and how pipelines should be executed.
When Jenkins is integrated with an SCM tool, for example, Git, the repository can be polled every time there is a commit.
• The Git plugin should be first installed and set up.
• After this, you can build a trigger that specifies when a new build should be started. For example, you can create a job that polls the repository and triggers a build when a change is committed.

16. How do you define parameters for a build in Jenkins?

A build can take several input parameters to execute. For example, if you have multiple test suites, but you want to run only one. You can set a parameter so that you are able to decide which one should be run. To have parameters in a job, you need to specify the same while defining the parameter. The parameter can be anything like a string, a file or a custom.
What are the ways to configure Jenkins node agent to communicate with

17. Jenkins master?

There are 2 ways to start the node agent
• Browser – if Jenkins node agent is launched from a browser, a JNLP (Java Web Start) file is downloaded. This file launches a new process on the client machine to run jobs.
• Command-line – to start the node agent using the command line, the client needs the executable agent.jar file. When this file is run, it simply launches a process on the client to communicate with the Jenkins master to run build jobs.

leave your comment


Your email address will not be published. Required fields are marked *