Continuous Integration with Selenium and Jenkins

Similar documents
Continuous Integration (CI) with Jenkins

Getting the files for the first time...2. Making Changes, Commiting them and Pull Requests:...5. Update your repository from the upstream master...

QMetry Test Managment Plugin

FAQ Q: Where/in which branch do I create new code/modify existing code? A: Q: How do I commit new changes? A:

Using the SQL CI TeamCity plugin in SQL Automation Pack

Continuous Integration with PowerBuilder

G, H I, J K, L. Git distributed version control system, 67 repository, 67 TFS, 68 GitFlow, 76 77

Version Control System GIT

Anchore Container Image Scanner Plugin

Jenkins: AMPLab s Friendly Butler. He will build your projects so you don t have to!

Test Automation Integration with Test Management QAComplete

Distributed CI: Scaling Jenkins on Mesos and Marathon. Roger Ignazio Puppet Labs, Inc. MesosCon 2015 Seattle, WA

Selenium Training. Training Topics

We are ready to serve Latest Testing Trends, Are you ready to learn?? New Batches Info

Selenium Testing Course Content

Index. Chaminda Chandrasekara 2017 C. Chandrasekara, Beginning Build and Release Management with TFS 2017 and VSTS, DOI /

Bitte decken Sie die schraffierte Fläche mit einem Bild ab. Please cover the shaded area with a picture. (24,4 x 7,6 cm)

SELENIUM TRAINING COURSE CONTENT

Chapter 1 - Continuous Delivery and the Jenkins Pipeline

Continuous Integration, Continuous Deployment and Continuous Testing by HP Codar using ALM and Jenkins

Getting Started with the Ed-Fi ODS and Ed-Fi ODS API

Selenium Course Content

Lab Objective. Lab Assignment. Downloads and Installation

CS314 Software Engineering Configuration Management

SELENIUM. SELENIUM COMPONENTS Selenium IDE Selenium RC Selenium Web Driver Selenium Grid

Index. Wouter de Kort 2016 W. de Kort, DevOps on the Microsoft Stack, DOI /


NetApp Jenkins Plugin Documentation

Tools for the programming mid-semester projects

TM DevOps Use Case TechMinfy All Rights Reserved

Sample Spark Web-App. Overview. Prerequisites

Test Automation Integration with Test Management QAComplete

TM DevOps Use Case. 2017TechMinfy All Rights Reserved

How to set up SQL Source Control The short guide for evaluators

DITA Gradle and Git. DITA-OT day Rotterdam

Github/Git Primer. Tyler Hague

Snapshot Best Practices: Continuous Integration

Object Oriented Programming. Week 1 Part 2 Git and egit

Creating pipelines that build, test and deploy containerized artifacts Slides: Tom Adams

USING GIT FOR AUTOMATION AND COLLABORATION JUSTIN ELLIOTT - MATT HANSEN PENN STATE UNIVERSITY

Watir-Webdriver Cucumber Automation Framework Setup Guide

Version Control with Git ME 461 Fall 2018

Intro to Github. Jessica Young

Introduction: Manual Testing :

1. Which of these Git client commands creates a copy of the repository and a working directory in the client s workspace. (Choose one.

Using GitHub and SourceTree to work with DITA TC repositories

The Actual Real World at EclipseCon/ALM

Continuous Integration and Deployment (CI/CD)

Syllabus Technosoft Academy. Course Syllabus. 1 P a g e

CSE 332: Data Structures and Parallelism Winter 2019 Setting Up Your CSE 332 Environment

TM DevOps Use Case. 2017TechMinfy All Rights Reserved

Using SQLCover with SQL Release PowerShell cmdlets

Seven Habits of Highly Effective Jenkins Users

Lab 01 How to Survive & Introduction to Git. Web Programming DataLab, CS, NTHU

Lab 5 Exercise Build and continuous integration tools

Visualizing Git Workflows. A visual guide to 539 workflows

Configuration Management

Revision Control. How can 4. Slides #4 CMPT 276 Dr. B. Fraser. Local Topology Simplified. Git Basics. Revision Control:

Basics of Git GitHub

Version control system (VCS)

TangeloHub Documentation

Tips on how to set up a GitHub account:

CONTINUOUS INTEGRATION; TIPS & TRICKS

Unit 8. Continuous Integration

Setting up GitHub Version Control with Qt Creator*

b. Developing multiple versions of a software project in parallel

Lab 03 Finish and Deploy an Application. Lab 3-1: Add DELETE to the Spring Boot REST Application

Enforcing Jenkins Best Practices. David Hinske. Jenkins World. #JenkinsWorld

Click Studios. Passwordstate. Remote Session Launcher. Installation Instructions

Mono Development for Wine. A Cry for Help

Koenig Solutions Pvt. Ltd. Selenium with C#

Grading Rubric Homework 1

BUILD AND DEPLOY ORACLE SERVICE BUS PROJECTS FROM ORACLE DEVELOPER CLOUD SERVICE TO ORACLE SOA CLOUD SERVICE USING THE ORACLE SERVICE BUS PLUG-IN

Platforms (Operating Systems)

Working with EGL and Subversion Using RDi with RBD

Git, the magical version control

Learning Objectives of CP-SAT v 1.31 (C#)

Optimizing your CodeReady Toolchain resource usage. Red Hat Developers Documentation Team :07:31 UTC

Tools. SWE 432, Fall Design and Implementation of Software for the Web

GIT. A free and open source distributed version control system. User Guide. January, Department of Computer Science and Engineering

BUILD AND DEPLOY SOA PROJECTS FROM DEVELOPER CLOUD SERVICE TO ORACLE SOA CLOUD SERVICE

24 th Annual Research Review

Installing Eclipse (C++/Java)

Full Stack boot camp

Turbo boost your digital app test automation with Jenkins

Continuous integration for databases using Red Gate tools

Git Tutorial. André Sailer. ILD Technical Meeting April 24, 2017 CERN-EP-LCD. ILD Technical Meeting, Apr 24, 2017 A. Sailer: Git Tutorial 1/36

Leveraging the OO Jenkins Plugin in DevOps scenarios

Software Engineering

#25. Use Source Control in a Single- Developer Environment

Versioning with git. Moritz August Git/Bash/Python-Course for MPE. Moritz August Versioning with Git

Qlikview and TFS integration

Tutorial 2 GitHub Tutorial

Git version control with Eclipse (EGit) Tutorial

School of Computing Science Gitlab Platform - User Notes

Use git rm to remove files from workspace

Installation and Upgrade Guide Zend Studio 9.x

The Old World. Have you ever had to collaborate on a project by

KERNEL C.I. USING LINARO S AUTOMATED VALIDATION ARCHITECTURE. Wednesday, September 11, 13

Accelerate at DevOps Speed With Openshift v3. Alessandro Vozza & Samuel Terburg Red Hat

Transcription:

Continuous Integration with Selenium and Jenkins

Continuous Integration Continuous Integration (CI) is a development practice that requires developers to integrate code into a shared repository several times a day. Each check-in is then verified by an automated build, and then automated testing allowing teams to detect problems early. So for example, if we are delivering.net applications and using WebDriver/NUnit to test them; the process maybe that the developer code is changed, this is committed to a Git Server. Then a C.I. tool such as Jenkins polls the Git server for changes, if detected, it compiles the new code, compiles our WebDriver tests, invokes the new version of the application, then executes our WebDriver Tests, and finally emails the test results to us. All unattended & automated.

Test Execution Machine NuGet.exe - Used to fetch your VS Project dependencies MSBuild.exe - Used to Compile your VS Project Nunit3-console.exe - Used to execute your Tests Jenkins Workspace Folder - where all of the Project files & output will occur

Download NuGet.exe and add to your System path NuGet.exe Download NuGet.exe and add this to your system path https://www.nuget.org/downloads

NUnit Console Download and Install the NUnit Console https://github.com/nunit/nunit-console/releases Download NUnit Console msi installer, and install the package. Ensure that the path to nunit3-console.exe is added to your system path

NUnit Console Runner Add the NUnit.Console Assembly to your Project There are two options for Assemblies through NuGet that allow us powerful command line execution: NUnit.Console NUnit.ConsoleRunner Either option will work with Jenkins, however Console comes with many useful extra tools for reporting formats So install NUnit.Console NuGet package to your VS Project. 6

MSBuild.exe Search for MSBuild.exe on your machine and make a note of the path If you have VS installed then one way to find out where MSBuild.exe is installed on your machine is to click the Windows Start button and type developer command prompt And look at the path it is set to. The path for.net framework installation is usually C:\Windows\Microsoft.NET\Framework[64 or empty][framework_version] The path when Visual Studio is installed is C:\Program Files (x86)\microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin Again you could add this to your system path if you want

Part 2 JENKINS INTEGRATION

C.I. Job Process Step 1 Step 2 Step 3 Step 4 Step 5 Step 6 Poll GitHub for WD Project Changes Pull the WD Project to Jenkins Workspace Pull all required project dependencies Build the WD Project Execute the Tests Publish the Test Results in Jenkins In this example we are going to create a Jenkins Job that performs a number of steps.

GitHub.com wd_github_repo WebDriver Jenkins Node Jenkins Master wd_github_job wd_git_proj Jenkins Workspace Build wd_git_proj Execute wd_git_proj Publish NUnit Results Email Results Return NUnit results 1. Push your WebDriver Project up to GitHub 2. Jenkins Polls the GitHub Repo for changes 3. If there is a change, then Jenkins Pulls the Project from GitHub down to the local Jenkins Workspace, Our Jenkins Job then performs the build steps: 1. Build the.net project in the Jenkins Workspace using MSBuild.exe 2. Execute the Compiled Project using NUnit.Console 3. return the NUnit Test Results to Jenkins 4. Jenkins Publishes the Test Results, and Emails them to interested parties

Jenkins Requirements Git & GitHub Jenkins Plugins MSBuild Plugin NUnit Plugin HTML Publisher Plugin Install all of the Jenkins Plugins above. To do this in Jenkins go to Manage Jenkins->Manage Plugins, click on the available tab, and then search for the names of the plugins to install. Select them and click install without restart

MSBuild.exe Config Add an MSBuild instance in Jenkins to use Manage Jenkins->Global Tool Configuration You need to tell Jenkins where MSBuild.exe is on the Test machine. You can then override this for each Node, by going into the Node configuration, checking the Tool Locations checkbox, from the drop-down that then appears, choose MSBuild and then set the path to MSBuild.exe for that particular Node

Create a Freestyle Job in Jenkins Now configure a new Freestyle Job in Jenkins,.

Set GitHub Project Path Provide the Git Hub repository URL that we wish to monitor (if local then use file protocol: file:///c:/my/path/to/project) This will automatically pull the GitHub repository to your Jenkins workspace

Build Trigger Set a build trigger if required In the example above, this tells Jenkins to Poll the GitHub Repository every 5 minutes for changes

NuGet.exe Used to pull down all the required dependencies into the Workspace Ensure that NuGet.exe is installed on the build machine. This is used to download and.net project dependencies required for the project into the Jenkins Workspace, so we can then build the Project successfully

Build Solution Use MSBuild.exe to Build the Solution Now we use MSBuild.exe to build our Visual Studio Project

Execute Project Use nunit3-console.exe We then use nunit3-console.exe to execute the Test Suite. When we built the project, the output was a.dll assembly which we pass to MSBuild.exe

Add Post-build step Add a Post-build action - Publish NUnit test result report Finally add a Post-build step - Publish NUnit test result report and put the name of the Test Results.xml file (TestResult.xml is the default) The Publish NUnit test result report will only appear in the actions drop-down if you have correctly installed the NUnit Jenkins plugin. 19

Optional - Extent Report Add HTML Report Post-Build Step for Extent Report If you are using Extent Reports to create HTML results, then as long as you have installed the Jenkins HTML Publisher plug-in, you can publish your extent report. NOTE: Due to security in Jenkins, if html reports are not showing up, try this fix: To view html results you need to override a security setting in Jenkins. To do this, go to Manage Jenkins->Script console and type in the following command: System.setProperty("hudson.model.DirectoryBrowserSupport.CSP", "") And click run

Execute the Jenkins Job Save the Jenkins Job, and click the Build Now button to test the job. Once executed, from the Build History, click the last results link and there should be an option - Test Result Select this to view the published NUnit results. 21

Results The Test Results will be displayed, and you can click the links to drill down through the report! 22