Robot Framework Jenkins

Jenkins offers a simple way to set up continuous integration and continuous delivery environment for almost any combination of languages and source code repositories. Today Jenkins is the leading open-source automation server with some 1,400 plugins to support the automation of all kinds of development tasks.

Continuous integration and continuous delivery of Java code (i.e., building projects, running tests, doing static code analysis, and deploying) are only one of many processes that people automate with Jenkins.

Continues Integration of Jenkins

The goal of Continues integration is to increase the bottom line in case of money and decreases the time and headache.


Jenkins is available as a Java 8 WAR archive and installer packages for the major operating systems, as source code and the source code is mostly Java. You can run the Jenkins WAR standalone or as a servlet in a Java application server such as Tomcat. In either case, it produces a web user interface and accepts calls to its REST API.

When you run Jenkins for the first time, it creates an administrative user with a long random password, which you can paste into its initial webpage to unlock the installation.

Web Elements of Robot Framework

Steps to Install Jenkins in Robot Framework

Before installing Jenkins war file first we need to install Java in our system. Navigate to Install Java Once you click on this link, you will be directed to the Java SE Development Kit 8 Downloads website. Under this website, you have Java SE Development Kit 8u231, While installing this software accept the license agreement for Java Oracle SE.

Depends on your windows configuration, download the file, I have windows 64 bit, so I am downloading the file. Once you have downloaded the .exe file, make everything as default while installing.

Once you click on the download button, the website asks you to Sign in to the Oracle account. If you don't have it, create an account by giving a valid username and password and verify your email id and then log in to the account and download the file.

Run the .exe file and click Next, so it will take a few minutes to install on your system.


Once you click on Next the Java software starts installing


After installing you can verify, the java will be installed in the C drive under program files

java-is-downloaded-in-the c-drive

In order to verify whether the java is installed in your system or not, go to the command prompt and type Java versionIf it is installed successfully, the below message will be displayed.


If your system is not identifying the java version, then go to the system variables under environmental variables and add a new system variable. First copy the address of the java.exe file


Go to the system variable(This PC-->propeties-->advance system settings-->Environmental variables-->system variable-->New-->enter new variable name-->click ok) and set variable name as JAVA_HOME and variable value as C:Program FilesJavajdk1.8.0_231 and click on ok


After this, if you run the command java -version in the command prompt, it will show the version

User Defined Keywords Using Python in Robot Framework

Installation of Jenkins War File in Robot Framework

The Web application ARchive (WAR) file version of Jenkins can be installed on any operating system or platform that supports Java. To download and run the WAR file version of Jenkins: Download the latest stable Jenkins WAR file to an appropriate directory on your machine.

Navigate to the Jenkins War File website, and you will find the different versions of the Jenkins war file, I am going to download the latest version of the war file which is present first in the list.


Navigate to the location where Jenkins.war file has been downloaded and copies the address of the file, open the command prompt and navigate to the file location and run the below command to configure

Java  -jar “name of Jenkins.war” –httpPort=8086


When you run Jenkins for the first time, it creates an administrative user with a long random password, which you can paste into its initial webpage to unlock the installation, copy the below password as shown below.


Next step is, open the browser and navigate to the localhost:8086When I try to open the localhost:8086, the browser is not able to open it, so try with the localhost:8080, it will work.

The Unlock Jenkin page will be displayed as shown below


Enter the password and click on Continue, the customize Jenkins page will be displayed, as shown below.


You have two options in the customize Jenkins, click on install suggested plugins and once you click on Install suggested plugins, it will start installing all the plugins


Sometimes all the plugins have not installed, click on Retry to install all the plugins


Once all the plugins have been installed, click on continue, Create First admin user page will open, enter required credentials and click on Save and Continue


If the configuration is successful, then you can see the below message and then click on Save and Finish


Now the Jenkin is ready to use


Web Services Automation in Robot Framework

Configuration of JDK with Jenkins in Robot Framework

You have successfully created the Jenkins, Click on start using Jenkins, the Jenkins Dashboard will be displayed, as shown below.


Click on Manage Jenkins and select Global Tool Configuration, click on Add JDK and enter the System variable name and the java file location as shown in the below image and then click on Save


Again Go to Global Tool Configuration page and add Git, To find the git.exe file location, go to the program file and click on Git folder and then open bin, you will find the git.exe file, you can copy the file location and enter the global tool configuration as shown below.


Now, add the name as Default and the file location as shown below and then click on Apply and Save


We have successfully set up JDK and Git, and the next step is to set up Python. To set up python, select Configure System under Manage Jenkins.

To set up python, go to the environmental variable and click on path and then select edit you will find the python27 and python scriptslocation, copy the address path and save in the notepad.


Now, go to the configure system and scroll down and click on Environmental variable under Global Properties and click on add, the Name, and value as shown below


We have successfully set up Git, JDK, and Python; next, we have to install the Plugin.

Manual Testing Tools for API in Robot Framework

Creating Job in Jenkins with Robot Framework

We have successfully configured Jenkins, and now we have to create a Job, Open the Jenkins Dashboard and click on New Item.


Enter the Item Name RobotFrameworkwithGit and select Freestyle project shown below and then click on ok button.


Once you click ok, you are on the configuration pagefor this job. We have General, Sourcecode Management, Build Triggers, Build Environment, Build, and Post Build Actions. Enter the Description in the General as shown below.


Go to Source Code Management and select Git and then enter the URL of the Repository(Go to the Github account and open your Repository, you will get the URL of the repository)



Select the Credentials below the Repository URL and select your credentials, which will be reflecting in the drop-down menu; if it is not reflecting, then click on Add and enter your Jenkins Username and password, as shown below.


Once you click on Add in the credentials page, now it will be reflected in the drop-down menu, now select Ngendigital


Now scroll down and click on Save and Apply.

Now, click on, it will go to my GitHub and get my Repository. Click on Build #1 and select Console output.


You can see that It has successfully gone to our GitHub and cloned our repository.


Click on configure under RobotFrameworkwithGit and then go to the Build. Select the Execute Windows batch command.I will ask us to enter the command to be executed. The command is present in the RobotFramworkwithGit in the C drive C:UsersUser.jenkinsworkspaceRobotFrameworkwithGit copy this link and pastes it in the command, as shown below.


Now enter the command to run through Jenkins, the command is a robot -t test_case_name test_suite


Before running the test case, go to Build Environment and select Delete workspace before build starts and then click on Apply and Save and then select Build Now, the test case will start executing. So this is how we are going to execute the test case without writing any codes over here.

Automation of REST API in Robot Framework

Installation of Robot Framework Jenkins

Till now, we have worked on the default plugins, which are present in the Jenkins, now let us install the robot framework plugins. Select Manage Plugins under Manage Jenkins


If you click on available under manage plugins, you can see all the pluginsNow go back to the Jenkins and then select configure. Now select Post-build Actions and select Publish Robot Framework Test Results


We have to add the directory of the robot output, go to the RobotframeworkwithGit folder, you will find the log.html and XML files, so copy the address and paste it as shown below.


Click on Save and Apply and then select Build Now, this will run the test case and verify it.

Installation of Selenium Library in Robot Framework

Comment / Suggestion Section
Point our Mistakes and Post Your Suggestions