Slide 1

Slide 1 text

Watai Web Application Testing Automation In!astructure 1 Matti Schneider @matti_sg

Slide 2

Slide 2 text

Testing 2

Slide 3

Slide 3 text

3

Slide 4

Slide 4 text

3 unit

Slide 5

Slide 5 text

4 unit

Slide 6

Slide 6 text

4 unit functional

Slide 7

Slide 7 text

5 unit functional

Slide 8

Slide 8 text

5 unit functional integration

Slide 9

Slide 9 text

6 unit functional integration

Slide 10

Slide 10 text

7

Slide 11

Slide 11 text

functionality 7

Slide 12

Slide 12 text

functionality 7 correctness

Slide 13

Slide 13 text

functionality 7 correctness consistency

Slide 14

Slide 14 text

Web Applications 8

Slide 15

Slide 15 text

9

Slide 16

Slide 16 text

Toto 9

Slide 17

Slide 17 text

Toto 10

Slide 18

Slide 18 text

Toto 10

Slide 19

Slide 19 text

11

Slide 20

Slide 20 text

11

Slide 21

Slide 21 text

12

Slide 22

Slide 22 text

12

Slide 23

Slide 23 text

12

Slide 24

Slide 24 text

12

Slide 25

Slide 25 text

12

Slide 26

Slide 26 text

13

Slide 27

Slide 27 text

13 Selenium

Slide 28

Slide 28 text

14 Selenium

Slide 29

Slide 29 text

WatiX 14 Selenium

Slide 30

Slide 30 text

15 Selenium WatiX

Slide 31

Slide 31 text

16 Selenium WatiX Cucumber

Slide 32

Slide 32 text

16 Selenium WatiX Cucumber • – • – • –

Slide 33

Slide 33 text

16 Selenium WatiX Cucumber • – • – • – not maintainable!

Slide 34

Slide 34 text

17 Watai

Slide 35

Slide 35 text

open-source declarative & DRY WebDriver Node.js Widget Feature Data 18 Watai

Slide 36

Slide 36 text

open-source declarative & DRY WebDriver Node.js Widget Feature Data 18 Watai

Slide 37

Slide 37 text

Widget Feature 19 • — • — • — • — Data

Slide 38

Slide 38 text

Widget Feature 20 • — • — • — • — Data

Slide 39

Slide 39 text

21

Slide 40

Slide 40 text

21

Slide 41

Slide 41 text

SearchBar 21

Slide 42

Slide 42 text

SearchBar field button 21

Slide 43

Slide 43 text

SearchBar field button Toto 21

Slide 44

Slide 44 text

SearchBar field button Toto search fill click 21

Slide 45

Slide 45 text

SearchBar field button search 22

Slide 46

Slide 46 text

SearchBar field button search 22

Slide 47

Slide 47 text

ZeroClick SearchBar field button search 22

Slide 48

Slide 48 text

header ZeroClick SearchBar field button search 22

Slide 49

Slide 49 text

header ZeroClick SearchBar field button search
22

Slide 50

Slide 50 text

header ZeroClick SearchBar field button search id : zero_click_heading
22

Slide 51

Slide 51 text

header ZeroClick SearchBar field button search id : zero_click_heading css : #zero_click_heading xpath : //div@id="zero_click_heading" ...
22

Slide 52

Slide 52 text

23 Widgets

Slide 53

Slide 53 text

SearchBar ZeroClick • component model 23 Widgets

Slide 54

Slide 54 text

SearchBar field button ZeroClick header • component model • elements list 23 Widgets

Slide 55

Slide 55 text

SearchBar field button ZeroClick header • component model • elements list • selectors map id : … name : … css : … 23 Widgets

Slide 56

Slide 56 text

SearchBar field button ZeroClick header search • component model • elements list • selectors map • semantic actions id : … name : … css : … fill, click… 23 Widgets

Slide 57

Slide 57 text

SearchBar field button ZeroClick header search • component model • elements list • selectors map • semantic actions • abstraction layer id : … name : … css : … fill, click… Watai Web Widget 23 Widgets

Slide 58

Slide 58 text

SearchBar field button search name: … css: … fill, click… Watai Web { Widget 24 Widgets

Slide 59

Slide 59 text

SearchBar field button search name: … css: … fill, click… Watai Web { elements: { Widget 24 Widgets

Slide 60

Slide 60 text

SearchBar search fill, click… Watai Web { elements: { field: { name: 'q' }, button:{ css: input[type=submit] } }, Widget 24 Widgets

Slide 61

Slide 61 text

SearchBar fill, click… Watai Web { elements: { field: { name: 'q' }, button:{ css: input[type=submit] } }, search: function(term) { Widget 24 Widgets

Slide 62

Slide 62 text

SearchBar Watai Web { elements: { field: { name: 'q' }, button:{ css: input[type=submit] } }, search: function(term) { this.field = term; this.field.submit(); } } Widget 24 Widgets

Slide 63

Slide 63 text

{ elements: { field: { name: 'q' }, button:{ css: input[type=submit] } }, search: function(term) { this.field = term; this.field.submit(); } } { elements: { field: { name: 'q' }, button: { css: input [type=submit] }, search: function(term) { this.field = term; return this.field.submit(); } } SearchBarWidget.js 25 Widgets

Slide 64

Slide 64 text

Widget Feature 26 • — • — • — • — Data

Slide 65

Slide 65 text

Feature 27 • — • — • — • — Widget Data

Slide 66

Slide 66 text

SearchBar 28

Slide 67

Slide 67 text

SearchBar Toto search 28

Slide 68

Slide 68 text

29

Slide 69

Slide 69 text

header ZeroClick 29

Slide 70

Slide 70 text

__ = Toto ? header ZeroClick 29

Slide 71

Slide 71 text

30 Features

Slide 72

Slide 72 text

• expected behaviour “Looking up an ambiguous term should make a Zero Click Info box appear.” 30 Features

Slide 73

Slide 73 text

SearchBar search • expected behaviour • sequence of actions Toto “Looking up an ambiguous term should make a Zero Click Info box appear.” 30 Features

Slide 74

Slide 74 text

SearchBar search • expected behaviour • sequence of actions • implicit waits Toto “Looking up an ambiguous term should make a Zero Click Info box appear.” 30 Features

Slide 75

Slide 75 text

SearchBar search • expected behaviour • sequence of actions • implicit waits • expected state descriptions Toto header ZeroClick “Meanings of Toto” “Looking up an ambiguous term should make a Zero Click Info box appear.” 30 Features

Slide 76

Slide 76 text

SearchBar search Toto header ZeroClick “Meanings of Toto” “Looking up an ambiguous term should make a Zero Click Info box appear.” 31 Features

Slide 77

Slide 77 text

SearchBar search Toto header ZeroClick “Meanings of Toto” “Looking up an ambiguous term should make a Zero Click Info box appear.” { 32 Features

Slide 78

Slide 78 text

SearchBar search Toto header ZeroClick “Meanings of Toto” “Looking up an ambiguous term should make a Zero Click Info box appear.” { description: 32 Features

Slide 79

Slide 79 text

SearchBar search Toto header ZeroClick “Meanings of Toto” { description: "Looking up an ambiguous term should make a Zero Click Info box appear.", 32 Features

Slide 80

Slide 80 text

SearchBar search Toto header ZeroClick “Meanings of Toto” { description: "Looking up an ambiguous term should make a Zero Click Info box appear.", scenario: [ 32 Features

Slide 81

Slide 81 text

header ZeroClick “Meanings of Toto” { description: "Looking up an ambiguous term should make a Zero Click Info box appear.", scenario: [ SearchBarWidget.search, "Toto", 32 Features

Slide 82

Slide 82 text

header ZeroClick “Meanings of Toto” { description: "Looking up an ambiguous term should make a Zero Click Info box appear.", scenario: [ SearchBarWidget.search, "Toto", 32 Features

Slide 83

Slide 83 text

header ZeroClick “Meanings of Toto” { description: "Looking up an ambiguous term should make a Zero Click Info box appear.", scenario: [ SearchBarWidget.search, "Toto", { 32 Features

Slide 84

Slide 84 text

“Meanings of Toto” { description: "Looking up an ambiguous term should make a Zero Click Info box appear.", scenario: [ SearchBarWidget.search, "Toto", { 'ZeroClickWidget.header': 32 Features

Slide 85

Slide 85 text

{ description: "Looking up an ambiguous term should make a Zero Click Info box appear.", scenario: [ SearchBarWidget.search, "Toto", { 'ZeroClickWidget.header': "Meanings of Toto" 32 Features

Slide 86

Slide 86 text

{ description: "Looking up an ambiguous term should make a Zero Click Info box appear.", scenario: [ SearchBarWidget.search, "Toto", { 'ZeroClickWidget.header': "Meanings of Toto" } ] } 32 Features

Slide 87

Slide 87 text

{ description: "Looking up an ambiguous term should make a Zero Click Info box appear.", scenario: [ SearchBarWidget.search, "Toto", { 'ZeroClickWidget.header': "Meanings of Toto" } ] } { description: "Chercher un mot ambigu devrait ouvrir une boîte zero- click", scenario: [ SearchBarWidget.search, "Toto", { 'ZeroClickWidget.header': "Meanings of Toto" } ] } SearchBarFeature.js 33 Features

Slide 88

Slide 88 text

Feature 34 • — • — • — • — Widget Data

Slide 89

Slide 89 text

Data 35 • — • — • — • — Feature Widget

Slide 90

Slide 90 text

Data 36

Slide 91

Slide 91 text

SearchBar search Data Toto header ZeroClick “Meanings of Toto” 36

Slide 92

Slide 92 text

SearchBar search Data Toto header ZeroClick “Meanings of ” Toto 37

Slide 93

Slide 93 text

SearchBar search Data Toto header ZeroClick “Meanings of ” Toto 37

Slide 94

Slide 94 text

SearchBar search Data header ZeroClick “Meanings of ” term = "Toto" term term 37

Slide 95

Slide 95 text

SearchBar search Data header ZeroClick “Meanings of ” term = "Toto" term term • factorizes values 37

Slide 96

Slide 96 text

SearchBar search Data header ZeroClick “Meanings of ” term = "Toto" term term • factorizes values • increases maintainability 37

Slide 97

Slide 97 text

SearchBar search Data header ZeroClick “Meanings of ” term = "Toto" term term • factorizes values • increases maintainability • allows for import 37

Slide 98

Slide 98 text

term = "Toto" SearchBar search term header ZeroClick “Meanings of term” 38 Data

Slide 99

Slide 99 text

SearchBar search term header ZeroClick “Meanings of term” term = "Toto" 38 Data

Slide 100

Slide 100 text

term = "Toto" term = "Toto" SearchBarData.js 39 Data

Slide 101

Slide 101 text

40 • — • — • — • — Feature Widget Data

Slide 102

Slide 102 text

41 • — • — • — • — Feature Widget Data

Slide 103

Slide 103 text

Feature Widget Data term = "Toto" SearchBarData.js { elements: { field: { name: 'q' }, button: { css: input [type=submit] }, search: function(term) { this.field = term; return this.field.submit(); } } SearchBarWidget.js { description: "Chercher un mot ambigu devrait ouvrir une boîte zero- click", scenario: [ SearchBarWidget.search, "Toto", { 'ZeroClickWidget.header': "Meanings of Toto" } ] } SearchBarFeature.js { elements: { field: { name: 'q' }, button: { css: input [type=submit] }, search: function(term) { this.field = term; return this.field.submit(); } } ZeroClickWidget.js 42

Slide 104

Slide 104 text

{ elements: { field: { name: 'q' }, button: { css: input [type=submit] }, search: function(term) { this.field = term; return this.field.submit(); } } { description: "Chercher un mot ambigu devrait ouvrir une boîte zero- click", scenario: [ SearchBarWidget.search, "Toto", { 'ZeroClickWidget.header': "Meanings of Toto" } ] } term = "Toto" { elements: { field: { name: 'q' }, button: { css: input [type=submit] }, search: function(term) { this.field = term; return this.field.submit(); } } DuckDuckGo 43

Slide 105

Slide 105 text

{ elements: { field: { name: 'q' }, button: { css: input [type=submit] }, search: function(term) { this.field = term; return this.field.submit(); } } { description: "Chercher un mot ambigu devrait ouvrir une boîte zero- click", scenario: [ SearchBarWidget.search, "Toto", { 'ZeroClickWidget.header': "Meanings of Toto" } ] } term = "Toto" { elements: { field: { name: 'q' }, button: { css: input [type=submit] }, search: function(term) { this.field = term; return this.field.submit(); } } DuckDuckGo https://duckduckgo.com ? 43

Slide 106

Slide 106 text

{ elements: { field: { name: 'q' }, button: { css: input [type=submit] }, search: function(term) { this.field = term; return this.field.submit(); } } { description: "Chercher un mot ambigu devrait ouvrir une boîte zero- click", scenario: [ SearchBarWidget.search, "Toto", { 'ZeroClickWidget.header': "Meanings of Toto" } ] } term = "Toto" { elements: { field: { name: 'q' }, button: { css: input [type=submit] }, search: function(term) { this.field = term; return this.field.submit(); } } DuckDuckGo { baseURL: 'https:// duckduckgo.com/', // see all allowed values at http://code.google.com/p/ selenium/wiki/DesiredCapabilities driverCapabilities: { browserName: 'firefox' } } config.js https://duckduckgo.com 44 { baseURL:…, browser:… }

Slide 107

Slide 107 text

{ elements: { field: { name: 'q' }, button: { css: input [type=submit] }, search: function(term) { this.field = term; return this.field.submit(); } } { description: "Chercher un mot ambigu devrait ouvrir une boîte zero- click", scenario: [ SearchBarWidget.search, "Toto", { 'ZeroClickWidget.header': "Meanings of Toto" } ] } term = "Toto" { elements: { field: { name: 'q' }, button: { css: input [type=submit] }, search: function(term) { this.field = term; return this.field.submit(); } } DuckDuckGo { baseURL: 'https:// duckduckgo.com/', // see all allowed values at http://code.google.com/p/ selenium/wiki/DesiredCapabilities driverCapabilities: { browserName: 'firefox' } } config.js https://duckduckgo.com 44 { baseURL:…, browser:… }

Slide 108

Slide 108 text

DuckDuckGo { elements: { field: { name: 'q' }, button: { css: input [type=submit] }, search: function(term) { this.field = term; return this.field.submit(); } } { description: "Chercher un mot ambigu devrait ouvrir une boîte zero- click", scenario: [ SearchBarWidget.search, "Toto", { 'ZeroClickWidget.header': "Meanings of Toto" } ] } term = "Toto" { elements: { field: { name: 'q' }, button: { css: input [type=submit] }, search: function(term) { this.field = term; return this.field.submit(); } } { baseURL: 'https:// duckduckgo.com/', // see all allowed values at http://code.google.com/p/ selenium/wiki/DesiredCapabilities driverCapabilities: { browserName: 'firefox' } } config.js DuckDuckGo 45

Slide 109

Slide 109 text

DuckDuckGo 46 Test suite

Slide 110

Slide 110 text

• plaintext files DuckDuckGo 46 Test suite

Slide 111

Slide 111 text

• plaintext files • easy to version & share DuckDuckGo 46 Test suite

Slide 112

Slide 112 text

• plaintext files • easy to version & share • interpreted by Watai DuckDuckGo 46 Test suite

Slide 113

Slide 113 text

Demo 47

Slide 114

Slide 114 text

48 Installing

Slide 115

Slide 115 text

• Selenium 48 Installing

Slide 116

Slide 116 text

• Selenium • Node.js > npm install watai > npm install watai 48 Installing

Slide 117

Slide 117 text

• Selenium • Node.js • Watai 48 Installing

Slide 118

Slide 118 text

49 Documentation

Slide 119

Slide 119 text

• installation • troubleshooting • walkthrough • reference 49 Documentation

Slide 120

Slide 120 text

• installation • troubleshooting • walkthrough • reference 49 Documentation

Slide 121

Slide 121 text

bit.ly/watai 50

Slide 122

Slide 122 text

(homemade) build automation 79% code coverage Promises/A bit.ly/watai 50

Slide 123

Slide 123 text

Thanks! Questions? • Image credits • From The Noun Project • Code: d • Gear: Johan H. W. Basberg • Cursor: Yellow • Desktop computer: The Noun Project • Server: Daniel Campos • Folder, document: Apple • All software icons © their respective owners • DuckDuckGo logo © DuckDuckGo • Thanks • Fabien Massol • Laurent Basset • Caroline Demoulin • Muriel Janel • Hillel Nabedrick • Anouchka Labonne • Nicolas Dupont • Santiago Suarez Ordoñez • SauceLabs 51 Matti Schneider — @matti_sg