Running Selenium Cucumber Tests in Jenkins

This article shows how to configure and run Selenium (+ Cucumber) Tests in Jenkins. Before we dive into more details we have to have Jenkins installed in a server. Here is a quick way to setup Jenkins in a linux server.

OK all done, lets go though with the steps,

Step 1
First you need to install google chrome. This is called as chrome in headless mode. Because you really can't see the chrome window when you are running tests in Jenkins.

 wget -qO - | sudo apt-key add -  
 sudo sh -c 'echo "deb stable main" >> /etc/apt/sources.list.d/google.list'  
 sudo apt-get update  
 sudo apt-get install google-chrome-stable  

Step 2
Then install xvfb. OK what is this xvfb ?
Based on Wikipedia,

Xvfb or X virtual framebuffer is a display server implementing the X11 display server protocol. In contrast to other display servers, Xvfb performs all graphical operations in memory without showing any screen output. From the point of view of the client, it acts exactly like any other X display server, serving requests and sending events and errors as appropriate. However, no output is shown. This virtual server does not require the computer it is running on to have a screen or any input device. Only a network layer is necessary.

 sudo apt-get install xvfb  

Then start xvfb
 Xvfb :1 -screen 5 1024x768x8 &  

Step 3
OK , server changes are done. Now its time to move into Jenkins configurations.

First Install this plugin, (Jenkins -> Manage Jenkins --> Manage Plugins)

Why do you we need this ?
This plugin allows Jenkins to show Selenium + cucumber results as a graph with screenshots.

So in order to generate graphs this plugin need the report.json file that generated from Selenium + cucumber.

 @Cucumber.Options(glue = {"classpath:com/rd/uat"}, strict = true, format = {  
     "pretty", "html:target/cukes", "json:target/cukes/report.json", "junit:target/cukes/junit.xml"})  
 public class RunCukes {  

Here is the plugin configuration in Jenkins.
Create Jenkins Job --> Then add this as "Post build Step"

Step 4
Add following environment variable to Jenkins. (Jenkins --> Manage Jenkins --> Configure System)


OK We just configure Jenkins to run selenium and Cucumber Tests.
Now run the Jenkins job and check the cucumber reports. :)
Here are some sample reports,


  1. In the provided information i agree our all information and really very nice all articles ,thanks for sharing in this post.
    I like in this post.
    php training in chennai

  2. Hai,

    Nicely written post. I am just about to start a new blog and there could not have been a better guide than this one for some good pointers. I am looking forward to starting a successful blog after reading this incredibly useful post of yours. Waiting for more such posts like this.

    Keep writing and sharing!

    – Rithika

    SEO Training in Chennai

  3. This information is impressive..I am inspired with your post writing style & how continuously you describe this topic. After reading your post,thanks for taking the time to discuss this, I feel happy about it and I love learning more about this topic..
    Peridot Systems Adyar Complaints

  4. the blog is very interesting and will be much useful for us. thank you for sharing the blog with us. please keep on updating.
    Informatica Training in Chennai Adyar

  5. this is really too useful and have more ideas from yours. keep sharing many techniques. eagerly waiting for your new blog and useful information. keep doing more.
    Digital Marketing Services in Chennai

  6. thank you for sharing such a great blog with us. expecting for your updation.
    Android training in chennai

  7. Superb. I really enjoyed very much with this article here. Really it is an amazing article I had ever read. I hope it will help a lot for all. Thank you so much for this amazing posts and please keep update like this excellent article.thank you for sharing such a great blog with us. expecting for your.
    Digital Marketing Company in India

  8. Thank you for sharing such a nice and interesting blog with us. Hope it might be much useful for us. keep on updating...!!
    seo company in india
    digital marketing company in india

  9. This is an awesome post.Really very informative and creative contents. These concept is a good way to enhance the knowledge.I like it and help me to development very well.Thank you for this brief explanation and very nice information.Well, got a good knowledge.
    Java Training in Chennai

  10. Interesting blog about running selenium cucumber test which attracted me more.Spend a worthful time.keep updating more.
    MSBI Training in Chennai

  11. Nice Information Regarding Selenium Cucumber Tests in Jenkins My sincere thanks for sharing this post Please Continue to share this post
    Selenium Training in Chennai

  12. Thanks Admin Amazing Post Keep UpDate.Thank You.

    Top 10 Most Popular Internet Marketing Tools,Black Hat Vip Seo Software,Website Seo Backlinks Software,Website Traffic Bot Software.Etc Free Download Online Please Visit Our Website

  13. The great service in this blog and the nice technology is visible in this blog. I am really very happy for the nice approach is visible in this blog and thank you very much for using the nice technology in this blog

    software testing training in chennai

  14. Nice post.Thank you so much for sharing.Yiioverflow is a web development company.We have well expert team in Angular JS, Ionic, Yii Framework, Node JS, Laravel, PHP, MySQL, and WordPress.If you want a developer visit..

  15. Thanks for your informative post. Selenium is the future of IT world to improve the quality of products.

    Selenium Training institute in Chennai
    Selenium Course in Chennai

  16. Nice blog. Thanks for sharing such great information. App in minute provides you the platform you seek for creating your online store. App in minute can develop your Android Application & Website for free and display your products or services to the world. Once you create your Application & Website people will be able to know about your products and services as everyone is searching 24 X 7 for something to buy on the internet. For more information

  17. This comment has been removed by the author.

  18. Thanks for such a great article here. I was searching for something like this for quite a long time and at last, I’ve found it on your blog. It was definitely interesting for me to read about their market situation nowadays. Well written article Thank You for Sharing with Us pmp training in chennai | pmp training class in chennai | pmp training near me | pmp training courses online | pmp training fee | project management training certification | project management training in chennai | project management certification online |

  19. I like your article very much. It has many useful ideas and suggestions. I thinks it will be more helpful for my research in an efficient manner. Please try to post some more topics as well as possible.
    Python Training Institute in Chennai
    Best Python Training in Chennai
    best german classes in chennai
    German language training in chennai
    Devops Training in Chennai
    RPA Training in Chennai

  20. Your blog was really nice about the spring security. Your blog always helps me a lot as i am associated with application support services in USA
    .So thank you very much and keep up the good work.


  21. cheapest dogs to buy cheap toy boxes subscription boxes to over five hundred,000 monthly subscribers. Deeper insights into BarkBox's rating

  22. It is very good and very informative. There is a useful information in it.Thanks for posting...

  23. Great efforts put to publish these kinds of articles that are very useful to know. I’m thoroughly enjoying your blog. And Good comments create great relations. You’re doing an excellent job. Keep it up.

    Magento Development Training Course in Chennai Zuan Education

    Selenium Training Course in Chennai Zuan Education

  24. Nice post. Thanks for sharing! I want people to know just how good this information is in your article. It’s interesting content and Great work.
    Digital Marketing Course In Kolkata
    Web Design Course In Kolkata

  25. This is a wonderful article, Given so much info in it, These type of articles keeps the users interest in the website, and keep on sharing more ... good luck.
    data analytics courses

  26. wonderful article. Very interesting to read this article.I would like to thank you for the efforts you had made for writing this awesome article. This article resolved my all queries. keep it up.
    data analytics course in Bangalore

  27. Hey, i liked reading your article. You may go through few of my creative works here

  28. Very interesting to read this article.I would like to thank you for the efforts you had made for writing this awesome article. This article inspired me to read more. keep it up.
    Correlation vs Covariance
    Simple linear regression
    data science interview questions

  29.  You are really performing grand work. I must articulate that you really have done a great research before writing. Keep up the good work!
    Data Science training in Mumbai
    Data Science course in Mumbai
    SAP training in Mumbai