Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Jenkins 2.x Continuous Integration Cookbook

You're reading from   Jenkins 2.x Continuous Integration Cookbook Over 90 recipes to produce great results using pro-level practices, techniques, and solutions

Arrow left icon
Product type Paperback
Published in Oct 2017
Publisher Packt
ISBN-13 9781788297943
Length 438 pages
Edition 3rd Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Mitesh Soni Mitesh Soni
Author Profile Icon Mitesh Soni
Mitesh Soni
 Berg Berg
Author Profile Icon Berg
Berg
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

Title Page
Credits
Foreword
About the Authors
About the Reviewers
www.PacktPub.com
Customer Feedback
Dedication
Preface
1. Getting Started with Jenkins FREE CHAPTER 2. Management and Monitoring of Jenkins 3. Managing Security 4. Improving Code Quality 5. Building Applications in Jenkins 6. Continuous Delivery 7. Continuous Testing 8. Orchestration 9. Jenkins UI Customization 10. Processes that Improve Quality

Integrating Jenkins and Selenium for functional testing


In recipe, we write a sample functional test Selenium.

Getting ready

Install the TestNG Results Plugin:

Create a new project or build job in Jenkins.

How to do it...

Now let's try to execute the from Jenkins:

  1. Check in the Test Project in Repository. Create a PetClinic-FuncTest freestyle job in Jenkins.
  1. In the Build section, provide the Root POM location and Goals and options to execute:
  1. Save the build job and click on Build now.
  2. Verify the execution of the build job in the Console Output.
  1. It will open a Mozilla Firefox window and open a URL that is given in the code. This requires our PetClinic application to be deployed in a web server and running without any issues:

  1. Go to Post-build Actions and select Publish TestNG Results:
  1. Provide the TestNG XML report pattern:
  1. Click on Build now:

We have now seen how to execute Selenium-based test cases in Jenkins.

There's more

Go to the project dashboard and verify the graphs for TestNG results:

In the section...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime
Visually different images