Slide 1

Slide 1 text

Boost your testing: End to End with
 Docker & Geb 
 17.03.2018 Markus Schlichting

Slide 2

Slide 2 text

Markus Schlichting Senior Software Engineer Basel, Switzerland Hackergarten Basel [email protected] @madmas

Slide 3

Slide 3 text

End-to-End ?

Slide 4

Slide 4 text

User experience

Slide 5

Slide 5 text

Adopt legacy

Slide 6

Slide 6 text

maintain variants

Slide 7

Slide 7 text

Say hello to • Groovy DSL on top of Selenium/WebDriver • IDE support: syntax & debugging • PageObject, Modules

Slide 8

Slide 8 text

import geb.Browser Browser.drive { go "http://myapp.com/login" assert $("h1").text() == "Please Login" $("form.login").with { username = "admin" password = "password" login().click() } assert $("h1").text() == "Admin Section" }

Slide 9

Slide 9 text

Structure, Technical Details PageObject PageObject Spec Service Method

Slide 10

Slide 10 text

waitFor { }

Slide 11

Slide 11 text

waitFor { } package demo import geb.Browser Browser.drive { go "https://mynethome.de/animation.html" assert title == "Animation For Waitfor Example" $("div#app button").click() waitFor { !$("div.modal").hasClass("fade-enter-active") } $("div.modal button").click() waitFor { !$("div.modal").hasClass("fade-leave-active") } }

Slide 12

Slide 12 text

+ Spock

Slide 13

Slide 13 text

+ Spock

Slide 14

Slide 14 text

+ Spock 1 2

Slide 15

Slide 15 text

+ Spock

Slide 16

Slide 16 text

Write End-to-End tests with Geb Demo

Slide 17

Slide 17 text

Non-blocking tests?

Slide 18

Slide 18 text

Docker

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

• Docker WebDriver Selenium Container • Xvfb: X virtual frame-buffer • Chrome, Firefox • Video recording Docker

Slide 21

Slide 21 text

encapsulate 
 End-to-End tests Demo

Slide 22

Slide 22 text

http://nvie.com/posts/a-successful-git-branching-model/

Slide 23

Slide 23 text

Automation! Docker&Geb + CI Demo

Slide 24

Slide 24 text

No content

Slide 25

Slide 25 text

Unit Integration End to End

Slide 26

Slide 26 text


 • E2E do not replace other tests - they rather complete them • E2E should merely be seen as the final
 „does everything fit together“ • „Acceptance Tests“

Slide 27

Slide 27 text

The horizon • Living Documentation:
 Geb/Spock Specs + AsciiDoctor

Slide 28

Slide 28 text

Markus Schlichting [email protected] @madmas Happy with End-to-End testing =