Book Image

Learning Continuous Integration with Jenkins

By : Nikhil Pathania
Book Image

Learning Continuous Integration with Jenkins

By: Nikhil Pathania

Overview of this book

In past few years, Agile software development has seen tremendous growth across the world. There is huge demand for software delivery solutions that are fast yet flexible to frequent amendments. As a result, CI and continuous delivery methodologies are gaining popularity. Jenkins’ core functionality and flexibility allows it to fit in a variety of environments and can help streamline the development process for all stakeholders. This book starts off by explaining the concepts of CI and its significance in the Agile world with a whole chapter dedicated to it. Next, you’ll learn to configure and set up Jenkins. You’ll gain a foothold in implementing CI and continuous delivery methods. We dive into the various features offered by Jenkins one by one exploiting them for CI. After that, you’ll find out how to use the built-in pipeline feature of Jenkins. You’ll see how to integrate Jenkins with code analysis tools and test automation tools in order to achieve continuous delivery. Next, you’ll be introduced to continuous deployment and learn to achieve it using Jenkins. Through this book’s wealth of best practices and real-world tips, you'll discover how easy it is to implement a CI service with Jenkins.
Table of Contents (15 chapters)
Learning Continuous Integration with Jenkins
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Creating a simple user acceptance test using Selenium and TestNG


In order to perform a user acceptance test, we won't be installing any tool or software on the testing server nor anything on the Jenkins server or the developer's machine.

Tools such as Selenium and TestNG will be defined as part of the pom.xml file and everything will be done using Eclipse. The user acceptance test will be a part of the code, just like the unit test and the integration test.

Installing TestNG for Eclipse

To install TestNG, follow these steps:

  1. From the Eclipse IDE menu, go to Help | Eclipse Marketplace.

  2. In the window that opens, select the Search tab and look for Testng.

  3. Once you see TestNG for Eclipse, install it:

Modifying the index.jsp file

Our user acceptance test is going to be a simple example in which we will try to check the payslip page title. It should be PAY SLIP.

Following are the steps to modify the index.jsp file:

  1. Open index.jsp from the following path: /payslip/src/main/webapp/.

  2. Add the title PAY SLIP...