opentuesday: agile testautomatisierung und continuous integration
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.TRANSCRIPT
GRIDFUSION Software Solutions 5. November 2013
OPEN TUESDAY Agile Testautomatisierung und Continuous Integration mit Selenium, Maven, Git, Jenkins
1
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
Maven
Git / Github
Jenkins
Selenium
3
WHAT WE BUILD TODAY
4
ECLIPSE (Java Code) Maven
APP / JAR
GIT
GITHUB
JENKINS (CI)
SELENIUM GRID
SELENIUM NODE
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
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
CREATE THE PROJECT
7
mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
POM.XML
8
CHANGE TO JUNIT 4.10
9
WRITE SOME (UNIT) TESTS
10
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
WHAT WE BUILD TODAY
12
ECLIPSE (Java Code) Maven
APP / JAR
GIT
GITHUB
JENKINS (CI)
SELENIUM GRID
SELENIUM NODE
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
WHAT WE BUILD TODAY
14
ECLIPSE (Java Code) Maven
APP / JAR
GIT
GITHUB
JENKINS (CI)
SELENIUM GRID
SELENIUM NODE
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
WHAT WE BUILD TODAY
16
ECLIPSE (Java Code) Maven
APP / JAR
GIT
GITHUB
JENKINS (CI)
SELENIUM GRID
SELENIUM NODE
CONTINUOUS INTEGRATION - JENKINS
Download at http://jenkins-ci.org/
Configure / connect to Github
Build your project
17
CHANGE YOUR CODE
Change some code
Build locally: mvn clean, mvn test, mvn package
Push to Github: git push origin master
Watch Jenkins….
18
WHAT WE BUILD TODAY
19
ECLIPSE (Java Code) Maven
APP / JAR
GIT
GITHUB
JENKINS (CI)
SELENIUM GRID
SELENIUM NODE
E2E / UAT AUTOMATION WITH SELENIUM
20
CLIENT
SERVER JSON Wire Protocol
BROWSER
SELENIUM GRID
21
WHAT WE BUILD TODAY
22
ECLIPSE (Java Code) Maven
APP / JAR
GIT
GITHUB
JENKINS (CI)
SELENIUM GRID
SELENIUM NODE