23
Jenkins a friend of every tester Quality Excites 2014 - Gliwice

Jenkins – przyjaciel każdego testera

Embed Size (px)

DESCRIPTION

Łukasz Pietrucha, Łukasz Jasiński - prezentacja z III edycji konferencji Quality Excites.

Citation preview

Page 1: Jenkins – przyjaciel każdego testera

Jenkins – a friend of every tester Quality Excites 2014 - Gliwice

Page 2: Jenkins – przyjaciel każdego testera

HELLO.

2

Page 3: Jenkins – przyjaciel każdego testera

About The Speakers

3

@alvarus

Test Automation Specialist www.alvarus.org

@lpietrucha

Senior Quality Assurance

Specialist

Page 4: Jenkins – przyjaciel każdego testera

4 4

AGENDA

1. Introduction

2. A few words about Jenkins

3. Project Pipeline

4. How it works in practice:

Main path

Additional Jobs

5. Job monitoring

Page 5: Jenkins – przyjaciel każdego testera

Quality Assurance Engineer

5

Test Engineer

vs

Page 6: Jenkins – przyjaciel każdego testera

6

Continuous Integration: • The practice

• Merging working copies several times a day + building

• To prevent integration problems

Continuous Testing: • The practice in combination with Continuous Integration

• Run automated tests on different levels for each build

• To provide a rapid feedback about the current build

Page 7: Jenkins – przyjaciel każdego testera

7

Continuous Delivery: • To ensure that application can be rapidly and safely

deployed to production by push of a one button

• Delivering every change to a production-like environment

• Run automated tests

Continuous Deployment: • The next step of Continuous Delivery

• Application passes the automated tests is deployed to

production by push of a one button

Page 8: Jenkins – przyjaciel każdego testera

Jenkins – Continuous Integration Tool

8

• Project started in 2004

• Free, open-source tool written in Java

• Support many Revision Control Systems

• Support Windows, Linux and Mac OS

• Easy installation and configuration

• Distributed builds

• Allows building/testing/deploying software

projects continuously

• Plenty of plugins

Page 9: Jenkins – przyjaciel każdego testera

Our Example Project

9

Commit Build Deploy Heartbeat Functional

Tests

Deploy Elsewhere

JavaScript Tests

Checkstyle

Deploy System Integration Tests

Java 8

Maven 3.2

Selenium 2.40.0

Karma 0.10

Page 10: Jenkins – przyjaciel każdego testera

HOW IT WORKS IN PRACTICE? Take a look at Jenkins and main jobs

10

Page 11: Jenkins – przyjaciel każdego testera

Job: Build

11

What for?

• Integrate the source code

• Run unit and integration unit tests

• Create a package with application for deployment

How?

• Git Plugin to fetch source code from repository

• Maven command to compile and run tests

• Shell script to create the package for deployment

What else?

• Triggers after every commit

• JUnit test report

Page 12: Jenkins – przyjaciel każdego testera

Job: Deploy

12

What for?

• Deploy the application on master CI server

How?

• Get artefacts from Build job

• Run shell script

What else?

• Triggers after Build Job

Page 13: Jenkins – przyjaciel każdego testera

Job: Heartbeat

13

What for?

• To ensure that the application was deployed

on server and is up and running

How?

• Very quick test based on shell script

What else?

• Triggers after Deploy Job

Page 14: Jenkins – przyjaciel każdego testera

Job: Selenium Tests

14

What for?

• Run functional tests on different browsers

• To check the application from user

perspective (GUI)

How?

• Selenium + Java + Maven

What else?

• Triggers after Heartbeat Job

• Gathers screenshots

• JUnit test report

Page 15: Jenkins – przyjaciel każdego testera

ADDITIONAL JOBS Important but not in main path

15

Page 16: Jenkins – przyjaciel każdego testera

Job: JavaScript Tests

16

What for?

• Run unit tests against JS code

How?

• Karma + Jasmine + PhantomJS

What else?

• Triggers after Build Job

• JUnit test report

• Code coverage

Page 17: Jenkins – przyjaciel każdego testera

Job: Static Analysis

17

What for?

• Check Java code with standards and

guidelines

How?

• Maven + PMD + Checkstyle + FindBugs

What else?

• Triggers after Build Job

• Reports

Page 18: Jenkins – przyjaciel każdego testera

Job: External Deploy

18

What for?

• Deploy the application on every server*

How?

• Run job with parameters (Build number,

server address, …)

• Run shell script

What else?

• Triggers on demand

Page 19: Jenkins – przyjaciel każdego testera

Job: Spell Checker

19

What for?

• Scan text displayed on web page and extract

those that may not be spelled correctly.

How?

• Selenium to get web sources

• Shell script + Aspell

What else?

• Archive log file

Page 20: Jenkins – przyjaciel każdego testera

RADIATOR - JOB MONITORING To immediately see what's happened

20

Page 21: Jenkins – przyjaciel każdego testera

Radiator – Jenkins Build Monitor

21

What for?

• To monitoring Job statuses in Real Time

How?

• Monitor in the team room

• Small Ruby script

What can the Radiator?

• Displaying jobs statuses

• Displaying last 10 build statuses

• Displaying test result: how many tests failed

• Collecting jobs in logical blocks

Page 23: Jenkins – przyjaciel każdego testera

THANK YOU GLIWICE! Any Questions?

23