Setting Up CI/CD in Robot Framework
Uncategorized
Ansu June 22, 2018

Continuous Integration (CI) and Continuous Delivery (CD) are two main DevOps Software Development practices that help organizations to deliver applications in a faster and reliable way. In Continuous Integration, developers regularly merge their code changes into a central repository, after which automated builds and tests are run. Thus developers can find and locate errors quickly, hence improving software quality.

To deliver software updates to the customers faster and frequently with high quality, organizations should include automated software testing into a continuous delivery pipeline. This is the only way to ensure that quality assurance is continuous, agile, and reliable as the rest of the DevOps operation. If automation testing is not part of the continuous delivery pipeline, the code changes that developers write cannot be tested regularly.

ccid

CI/CD Pipeline Consists Of The Following Steps :

  • Commit: When a developer finishes coding, he will commit the source code to a central repository.
  • Build: The change is pulled out from the repository like Git and the software is built using some build tools, so that it can be run by a computer.
  • Automated tests: Develop a test script for testing the built version. The change is tested to ensure whether the feature will work and also verifies that it doesn’t break anything else.
  • Deploy: The built version is deployed to production.

Why Automated Testing is Essential in CI/CD?

Automated Tests have a good role in CI/CD.

Without proper automated tests that run fast, have good coverage, and no erroneous results, there can be no successful CI/CD pipeline.

  • Automated Testing Means Faster Tests

Automation will produce faster results than a human could produce manually. Through automation, we can run tests in parallel, which speeds the testing process even more. Speed and the avoidance of delays are essential in order to deliver software continuously.

  • Automated Testing Is More Consistent Than Manual Testing

A software should be consistent. Consistency means that software behaves as expected at every stage of the delivery chain. Test automation helps to achieve consistency by avoiding the chance of human error while testing the application

  • Automated Testing Will Empower Agility

In CI/CD, sometimes we need to adjust to tools and frameworks rapidly when better or more advanced technology arrives. If we have automated tests, then all configurations are done automatically. So that we can migrate to a new technology easily.

CI/CD with Jenkins

Jenkins is a popular open source tool used to achieve continuous integration and build automation. It will execute a predefined list of steps and will send notification in case of success or failure. Jenkins can be extended by adding additional plug-ins based on our need.

Benefits of using Jenkins in Automation Testing

How Jenkins automated testing will make the life of an automation tester easier?

  • Scheduled Run Of Test Script

Jenkins will allow the user to schedule a test automation script and run them at a specific time.

  • Test Result Trend Graph

Jenkins will display the test result trend graph. This graph will contain test failures from the previous build also.

  • Summary Of Test Result

Test Result will contain all information such as the total number of test cases that were executed, time taken to execute the script, passed test and failed test case.

  1. Test Failure Details

With the help of Jenkins, a tester can find details of test failure. It will display details like an error message and a stack trace.

  1. Jenkins Can Send An Email Notification

Jenkins will send test result emails after the execution of the test script. This can be achieved using the Email Notification feature in post-build action.

Integrating Git With Jenkins

The integration of GitHub with Jenkins will automate testing and improve software quality. We can integrate Jenkins with GitHub projects by using the GitHub plugin.

This plugin can schedule the build, pull code and data files from the GitHub repository to the Jenkins machine and automatically trigger each build on the Jenkins server.

Steps To Integrate GitHub With Jenkins

  1.      First Install GitHub Jenkins plugin.
  2.      Navigate to Manage Jenkins -> Manage Plugin->Search GitHub Plugin in the Available tab then click on Download now and install.

How To Create A Jenkins Job?

To create a new job in Jenkins, Click on New Item and then enter the Name for the New Job and choose the Freestyle project.

Create Jenkins Job

In the General section, you can give a project description and Configure Git in the Source Code Management Section. It will specify how the source code can be retrieved.

Source Code Management

If we are using Git for Source Code Management, we can enter the URL of Git Repository. If the repository is not public, we can add credentials to access it.

2

Build Triggers– We can configure when and how our build should be triggered.

Build Triggers

Build– Operations that we wish to perform can be configured in this section. Here I can give the command for executing the script.

Build

Post Build Actions- Here we can configure the actions to be performed after the completion of the build. Here I configure the email notification after every build.

Post Build Actions

Based on our configuration, our testing scripts will be taken from Git Repository and will be executed on a daily basis.

The importance of DevOps is visible with the rise of big players such as Amazon Web Services, Azure DevOps Services, or SouceLabs as a cloud testing platform. At ThinkPalm, our experts in DevOps can help your business adapt to the trend of moving complete CI/CD pipeline to the cloud, which results in affordable and reliable infrastructure, better metrics, and easy-to-use GUI with lots of documentation.


Get A Free Consultation With Our Experts In DevOps!



Get A Free Consultation With Our Experts In DevOps!