testing your app with selenium on travis ci

72
2014/8/23 @yando Testing your App with Selenium on Travis CI

Upload: yandod

Post on 13-Dec-2014

764 views

Category:

Technology


0 download

DESCRIPTION

Use Travis CI

TRANSCRIPT

Page 1: Testing your app with Selenium on Travis CI

2014/8/23@yando

Testing your Appwith Selenium on Travis CI

Page 2: Testing your app with Selenium on Travis CI

me

Yusuke Ando

2002

10~20 meetups / month

Engine Yard / Japan

Page 3: Testing your app with Selenium on Travis CI

mean while in Japan

Page 4: Testing your app with Selenium on Travis CI

yando

Page 5: Testing your app with Selenium on Travis CI

github.com/yandod

Page 6: Testing your app with Selenium on Travis CI

seene.co/u/yando

Page 7: Testing your app with Selenium on Travis CI
Page 8: Testing your app with Selenium on Travis CI

candycane

Page 9: Testing your app with Selenium on Travis CI
Page 10: Testing your app with Selenium on Travis CI
Page 11: Testing your app with Selenium on Travis CI

Agenda

Why Travis CI

Overview

Selenium on Travis CI

Page 12: Testing your app with Selenium on Travis CI

Why Travis CI?

Page 13: Testing your app with Selenium on Travis CI

Testing Era

Page 14: Testing your app with Selenium on Travis CI

Every

project

night

commit

Page 15: Testing your app with Selenium on Travis CI

Jenkins

Page 16: Testing your app with Selenium on Travis CI

HELL

Page 17: Testing your app with Selenium on Travis CI

on Jenkins

Application A

Application B

Application C

Page 18: Testing your app with Selenium on Travis CI
Page 19: Testing your app with Selenium on Travis CI

Yak Shaving

Page 20: Testing your app with Selenium on Travis CI

SAVE US

Page 21: Testing your app with Selenium on Travis CI

CI as a Service

February 2011 born in Berlin

Mathias Meyer & Josh Kalderimis

Open Source

Travis CI

Page 22: Testing your app with Selenium on Travis CI

Distributed

Disposable VM

parallel, multiple version

for library developer

Features

Page 23: Testing your app with Selenium on Travis CI
Page 24: Testing your app with Selenium on Travis CI

C C++ Clojure Erlang Go Groovy Haskell Java

JavaScript Objective-C Perl PHP Python Ruby Scala …

polyglot

Page 25: Testing your app with Selenium on Travis CI

Email IRC Campfire Flowdock

HipChat Sqwiggle Slack Webhook

Notification

Page 26: Testing your app with Selenium on Travis CI

Price

Page 27: Testing your app with Selenium on Travis CI

Getting Started

Page 28: Testing your app with Selenium on Travis CI

Ubuntu 12.04 LTS Server Edition 64bit

Mac OSX as option

Chef

VM

Page 29: Testing your app with Selenium on Travis CI
Page 30: Testing your app with Selenium on Travis CI

push to github

account registration

turn on

pre requirement

Page 31: Testing your app with Selenium on Travis CI
Page 32: Testing your app with Selenium on Travis CI

configuration file

language, version, scripts

encrypted key

.travis.yml

Page 33: Testing your app with Selenium on Travis CI

.travis.yml

Page 34: Testing your app with Selenium on Travis CI

php versions

Page 35: Testing your app with Selenium on Travis CI
Page 36: Testing your app with Selenium on Travis CI
Page 37: Testing your app with Selenium on Travis CI

badges

Page 38: Testing your app with Selenium on Travis CI

flexible

override default if necessary

phpunit or any commands

composer pyrus pear

pecl, apt-get, make

Page 39: Testing your app with Selenium on Travis CI

phalcon/cphalcon

Page 40: Testing your app with Selenium on Travis CI

Unity?

Page 41: Testing your app with Selenium on Travis CI

coverage report?

Page 42: Testing your app with Selenium on Travis CI

encryption

secret key, email address, endpoint

travis gem

secure: ‘aaabbbbccccdddeeeee’

will be decoded on travis vm

Page 43: Testing your app with Selenium on Travis CI

example

Page 44: Testing your app with Selenium on Travis CI

re-run

network timeout

api error?

stay calm, click a button

Page 45: Testing your app with Selenium on Travis CI
Page 46: Testing your app with Selenium on Travis CI

skip build?changing only README

put [ci skip] or [skip ci]

Page 47: Testing your app with Selenium on Travis CI

Mobile App

Page 48: Testing your app with Selenium on Travis CI
Page 49: Testing your app with Selenium on Travis CI
Page 50: Testing your app with Selenium on Travis CI

with just a yml file

easy of use

great of productivity

Page 51: Testing your app with Selenium on Travis CI

Travis CI for Unit Testing

Page 52: Testing your app with Selenium on Travis CI

Travis for Unit Testing

major use case

modern library might use Travis

CakePHP uses Travis

Page 53: Testing your app with Selenium on Travis CI
Page 54: Testing your app with Selenium on Travis CI
Page 55: Testing your app with Selenium on Travis CI
Page 56: Testing your app with Selenium on Travis CI

if you on cake way

app/Console/Cake test app All

call extra tests if necessary

just rewrite line of .travis.yml

Page 57: Testing your app with Selenium on Travis CI

Travis CI for App Testing

Page 58: Testing your app with Selenium on Travis CI

Seleniumcontrol browser remotely

tests entire app includes JavaScript,

pixel, click, etc..

WebDriver accepts call from PHPUnit

require java, x, firefox

Page 59: Testing your app with Selenium on Travis CI

No..

Selenium RC

Selenium IDE

Phantom.js

Page 60: Testing your app with Selenium on Travis CI

Selenium on Travis

firefox, xVfb, java by default

selenium-server

phpunit-selenium

boot webserver by php -S or https

Page 61: Testing your app with Selenium on Travis CI

Travis CI VMxVfbfirefox

JavaSelenium

PHP

WebApp

phpunit

Page 62: Testing your app with Selenium on Travis CI
Page 63: Testing your app with Selenium on Travis CI
Page 64: Testing your app with Selenium on Travis CI

turn into phpunit

Page 65: Testing your app with Selenium on Travis CI
Page 66: Testing your app with Selenium on Travis CI
Page 67: Testing your app with Selenium on Travis CI
Page 68: Testing your app with Selenium on Travis CI
Page 69: Testing your app with Selenium on Travis CI

screenshot

Page 70: Testing your app with Selenium on Travis CI

DEMO?

Page 71: Testing your app with Selenium on Travis CI

Do you really keep DIY?

Page 72: Testing your app with Selenium on Travis CI