22
GRIDFUSION Software Solutions 5. November 2013 OPEN TUESDAY Agile Testautomatisierung und Continuous Integration mit Selenium, Maven, Git, Jenkins 1

OpenTuesday: Agile Testautomatisierung und Continuous Integration

Embed Size (px)

DESCRIPTION

In seinem Referat zeigte Michael Palotas von Gridfusion Software Solution auf, wie die einzelnen Komponenten Selenium / Selenium Grid, Maven, Git / GitHub und Jenkins zusammenspielen und wie durch ein solches System agile Testautomatisierung und Continuous Integration mit relativ einfachen Mitteln ermöglicht wird.

Citation preview

Page 1: OpenTuesday: Agile Testautomatisierung und Continuous Integration

GRIDFUSION Software Solutions 5. November 2013

OPEN TUESDAY Agile Testautomatisierung und Continuous Integration mit Selenium, Maven, Git, Jenkins

1

Page 2: OpenTuesday: Agile Testautomatisierung und Continuous Integration

2

WHO AM I? Gridfusion Software Solutions Contact: Michael Palotas Gerbiweg 2 8853 Lachen SWITZERLAND Tel.: +41 79 6690708 Email: [email protected]

Head of Quality Engineering eBay

Founder / Principal Consultant Gridfusion Software Solutions

Page 3: OpenTuesday: Agile Testautomatisierung und Continuous Integration

Maven

Git / Github

Jenkins

Selenium

3

Page 4: OpenTuesday: Agile Testautomatisierung und Continuous Integration

WHAT WE BUILD TODAY

4

ECLIPSE (Java Code) Maven

APP / JAR

GIT

GITHUB

JENKINS (CI)

SELENIUM GRID

SELENIUM NODE

Page 5: OpenTuesday: Agile Testautomatisierung und Continuous Integration

MAVEN

5

Apache Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project's build, reporting and documentation from a central piece of information.

http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html

Page 6: OpenTuesday: Agile Testautomatisierung und Continuous Integration

POM.XML

The pom.xml file is the core of a project's configuration in Maven. It is a single

configuration file that contains the majority of information required to build a project in just

the way you want.

6

Page 7: OpenTuesday: Agile Testautomatisierung und Continuous Integration

CREATE THE PROJECT

7

mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false

Page 8: OpenTuesday: Agile Testautomatisierung und Continuous Integration

POM.XML

8

Page 9: OpenTuesday: Agile Testautomatisierung und Continuous Integration

CHANGE TO JUNIT 4.10

9

Page 10: OpenTuesday: Agile Testautomatisierung und Continuous Integration

WRITE SOME (UNIT) TESTS

10

Page 11: OpenTuesday: Agile Testautomatisierung und Continuous Integration

MAVEN TARGETS

validate: validate the project is correct and all necessary information is available

compile: compile the source code of the project

test: test the compiled source code using a suitable unit testing framework. These tests should not require the code be packaged or deployed

package: take the compiled code and package it in its distributable format, such as a JAR.

integration-test: process and deploy the package if necessary into an environment where integration tests can be run

verify: run any checks to verify the package is valid and meets quality criteria

install: install the package into the local repository, for use as a dependency in other projects locally

deploy: done in an integration or release environment, copies the final package to the remote repository for sharing with other developers and projects.

clean: cleans up artifacts created by prior builds

11

Page 12: OpenTuesday: Agile Testautomatisierung und Continuous Integration

WHAT WE BUILD TODAY

12

ECLIPSE (Java Code) Maven

APP / JAR

GIT

GITHUB

JENKINS (CI)

SELENIUM GRID

SELENIUM NODE

Page 13: OpenTuesday: Agile Testautomatisierung und Continuous Integration

VERSION CONTROL SYSTEM - GIT

Distributed / local

Download: http://git-scm.com/

Initialize directory: git init

Status: git status

Add files and directories to git: git add file1 dir2

Commit: git commit –am “commit message”

13

Page 14: OpenTuesday: Agile Testautomatisierung und Continuous Integration

WHAT WE BUILD TODAY

14

ECLIPSE (Java Code) Maven

APP / JAR

GIT

GITHUB

JENKINS (CI)

SELENIUM GRID

SELENIUM NODE

Page 15: OpenTuesday: Agile Testautomatisierung und Continuous Integration

SHARE YOUR CODE - GITHUB

Create repository on Github: https://github.com

Create remote: git remote add origin https://…

Push code to Github: git push origin master

Tag your code: git tag –a v0.1 –m “initial version”

Push tag to Github: git push origin v0.1

15

Page 16: OpenTuesday: Agile Testautomatisierung und Continuous Integration

WHAT WE BUILD TODAY

16

ECLIPSE (Java Code) Maven

APP / JAR

GIT

GITHUB

JENKINS (CI)

SELENIUM GRID

SELENIUM NODE

Page 17: OpenTuesday: Agile Testautomatisierung und Continuous Integration

CONTINUOUS INTEGRATION - JENKINS

Download at http://jenkins-ci.org/

Configure / connect to Github

Build your project

17

Page 18: OpenTuesday: Agile Testautomatisierung und Continuous Integration

CHANGE YOUR CODE

Change some code

Build locally: mvn clean, mvn test, mvn package

Push to Github: git push origin master

Watch Jenkins….

18

Page 19: OpenTuesday: Agile Testautomatisierung und Continuous Integration

WHAT WE BUILD TODAY

19

ECLIPSE (Java Code) Maven

APP / JAR

GIT

GITHUB

JENKINS (CI)

SELENIUM GRID

SELENIUM NODE

Page 20: OpenTuesday: Agile Testautomatisierung und Continuous Integration

E2E / UAT AUTOMATION WITH SELENIUM

20

CLIENT

SERVER JSON Wire Protocol

BROWSER

Page 21: OpenTuesday: Agile Testautomatisierung und Continuous Integration

SELENIUM GRID

21

Page 22: OpenTuesday: Agile Testautomatisierung und Continuous Integration

WHAT WE BUILD TODAY

22

ECLIPSE (Java Code) Maven

APP / JAR

GIT

GITHUB

JENKINS (CI)

SELENIUM GRID

SELENIUM NODE