Slide 1

Slide 1 text

Cypress VS Selenium Wrappers

Slide 2

Slide 2 text

Who me? AleksanderPopov aleksanderpopov Software Developer QA Engineer [email protected]
 aleksander_popov

Slide 3

Slide 3 text

What this all about?

Slide 4

Slide 4 text

What to compare? SelenideJS

Slide 5

Slide 5 text

Protractor Wrapper for WebdriverJS Built for testing Angular Framework

Slide 6

Slide 6 text

Cypress Selenium opposite Super Framework

Slide 7

Slide 7 text

WebdriverIO Non-official binding Has full mobile support Framework

Slide 8

Slide 8 text

SelenideJS Wrapper for WebdriverJS Port of Selenide/Selene Library

Slide 9

Slide 9 text

Three Elephants of Web UI Automation • Writing tests • Running tests • Supporting tests

Slide 10

Slide 10 text

Writing tests • Documentation • Elements location • Dynamic stuff • API overview

Slide 11

Slide 11 text

DOCUMENTATION

Slide 12

Slide 12 text

Protractor

Slide 13

Slide 13 text

• Tutorials Protractor

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

• Tutorials • API docs with description and examples Protractor

Slide 16

Slide 16 text

No content

Slide 17

Slide 17 text

• Tutorials • API docs with description and examples • Courses - not official (online, offline) Protractor

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

Cypress

Slide 20

Slide 20 text

• Tutorials, FAQ Cypress

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

• Tutorials, FAQ • API docs with description and examples Cypress

Slide 23

Slide 23 text

No content

Slide 24

Slide 24 text

• Tutorials, FAQ • API docs with description and examples • Developer blogs Cypress

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

• Tutorials, FAQ • API docs with description and examples • Developer blogs • Support - email (paid) Cypress

Slide 27

Slide 27 text

WebdriverIO

Slide 28

Slide 28 text

WebdriverIO • Tutorials

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

WebdriverIO • Tutorials • API docs with description and examples

Slide 31

Slide 31 text

No content

Slide 32

Slide 32 text

WebdriverIO • Tutorials • API docs with description and examples • Great online course (paid)

Slide 33

Slide 33 text

No content

Slide 34

Slide 34 text

SelenideJS

Slide 35

Slide 35 text

• Tutorials for JS and TS SelenideJS

Slide 36

Slide 36 text

No content

Slide 37

Slide 37 text

• Tutorials for JS and TS • API TS docs SelenideJS

Slide 38

Slide 38 text

No content

Slide 39

Slide 39 text

PROTRACTOR CYPRESS WEBDRIVERIO SELENIDES DOCUMENTATION 3 5 4 2

Slide 40

Slide 40 text

Location Elements

Slide 41

Slide 41 text

Protractor

Slide 42

Slide 42 text

• Inner search + lazy elements Protractor

Slide 43

Slide 43 text

No content

Slide 44

Slide 44 text

• Inner search + lazy elements • Filtering, but no built-in conditions for it Protractor

Slide 45

Slide 45 text

No content

Slide 46

Slide 46 text

Cypress

Slide 47

Slide 47 text

• Inner search with timeout Cypress

Slide 48

Slide 48 text

No content

Slide 49

Slide 49 text

• Inner search with timeout • No filtering Cypress

Slide 50

Slide 50 text

No content

Slide 51

Slide 51 text

WebdriverIO

Slide 52

Slide 52 text

• Inner search + element is lazy WebdriverIO

Slide 53

Slide 53 text

No content

Slide 54

Slide 54 text

• Inner search + element is lazy • No lazy Elements Collection and filtering WebdriverIO

Slide 55

Slide 55 text

WebdriverIO

Slide 56

Slide 56 text

SelenideJS

Slide 57

Slide 57 text

• Inner search + lazy elements SelenideJS

Slide 58

Slide 58 text

No content

Slide 59

Slide 59 text

• Inner search + lazy elements • Filtering + built-in conditions SelenideJS

Slide 60

Slide 60 text

No content

Slide 61

Slide 61 text

PROTRACTOR CYPRESS WEBDRIVERIO SELENIDES DOCUMENTATION 3 5 4 1 LOCATION ELEMENTS 4 3 2 5

Slide 62

Slide 62 text

• Actions • Assertions Dynamic stuff

Slide 63

Slide 63 text

Protractor

Slide 64

Slide 64 text

• If Angular - you are fine (almost) • Else:

Slide 65

Slide 65 text

Cypress

Slide 66

Slide 66 text

• Wait for Actionability Cypress

Slide 67

Slide 67 text

No content

Slide 68

Slide 68 text

• Wait for Actionability • Built-in waiting asserts for elements and browser Cypress

Slide 69

Slide 69 text

No content

Slide 70

Slide 70 text

WebdriverIO

Slide 71

Slide 71 text

No content

Slide 72

Slide 72 text

SelenideJS

Slide 73

Slide 73 text

• Retry mechanism for actions SelenideJS

Slide 74

Slide 74 text

• Retry mechanism for actions • Built-in waiting asserts for elements and browser SelenideJS

Slide 75

Slide 75 text

No content

Slide 76

Slide 76 text

PROTRACTOR CYPRESS WEBDRIVERIO SELENIDES DOCUMENTATION 3 5 4 1 LOCATION ELEMENTS 4 3 2 5 DYNAMIC STUFF 2 5 0 5

Slide 77

Slide 77 text

• Test-oriented • Structure • Verbosity API Overview

Slide 78

Slide 78 text

Protractor

Slide 79

Slide 79 text

• Test-oriented - generally webdriver-like Protractor

Slide 80

Slide 80 text

No content

Slide 81

Slide 81 text

• Test-oriented - generally webdriver-like • Structure - fine, lot of Angular-related Protractor

Slide 82

Slide 82 text

No content

Slide 83

Slide 83 text

• Test-oriented - generally webdriver-like • Structure - fine, lot of Angular-related • Verbosity - if not Angular - fine for easy asserts Protractor

Slide 84

Slide 84 text

No content

Slide 85

Slide 85 text

Cypress

Slide 86

Slide 86 text

• Test-oriented - it is Cypress

Slide 87

Slide 87 text

No content

Slide 88

Slide 88 text

• Test-oriented - good • Structure - heap, danger and required to memorize Cypress

Slide 89

Slide 89 text

~80 methods

Slide 90

Slide 90 text

• Test-oriented - good • Structure - heap, danger and required to memorize • Verbosity - short and clear with ‘sync-mode’ Cypress

Slide 91

Slide 91 text

No content

Slide 92

Slide 92 text

WebdriverIO

Slide 93

Slide 93 text

• Test-oriented - webdriver-like with a few helpers WebdriverIO

Slide 94

Slide 94 text

No content

Slide 95

Slide 95 text

• Test-oriented - webdriver-like with a few helpers • Structure - ‘kucha mala’ WebdriverIO

Slide 96

Slide 96 text

No content

Slide 97

Slide 97 text

• Test-oriented - webdriver-like with a few helpers • Structure - ‘kucha mala’, but you don’t usually see it WebdriverIO

Slide 98

Slide 98 text

No content

Slide 99

Slide 99 text

• Test-oriented - webdriver-like with a few helpers • Structure - ‘kucha mala’, but you don’t usually see it • Verbosity - bulky cause of lack of power, even with ‘sync-mode’ WebdriverIO

Slide 100

Slide 100 text

No content

Slide 101

Slide 101 text

No content

Slide 102

Slide 102 text

SelenideJS

Slide 103

Slide 103 text

• Test-oriented - selenides built to provide it SelenideJS

Slide 104

Slide 104 text

No content

Slide 105

Slide 105 text

• Test-oriented - selenides built to provide it • Structure - placed to be easy to remember and use SelenideJS

Slide 106

Slide 106 text

No content

Slide 107

Slide 107 text

• Test-oriented - selenides built to provide it • Structure - placed to be easy to remember and use • Verbosity - not really SelenideJS

Slide 108

Slide 108 text

No content

Slide 109

Slide 109 text

PROTRACTOR CYPRESS WEBDRIVERIO SELENIDES DOCUMENTATION 3 5 4 1 LOCATION ELEMENTS 4 3 2 5 DYNAMIC STUFF 2 5 0 5 API OVERVIEW 3 4 2 5

Slide 110

Slide 110 text

Running tests • Different browsers • Different devices • Parallelization

Slide 111

Slide 111 text

Protractor WebdriverIO

Slide 112

Slide 112 text

Protractor WebdriverIO • Different browsers - yes

Slide 113

Slide 113 text

Protractor WebdriverIO • Different browsers - yes • Different devices - yes

Slide 114

Slide 114 text

Protractor WebdriverIO • Different browsers - yes • Different devices - yes • Parallelization - poor, but yes

Slide 115

Slide 115 text

Cypress

Slide 116

Slide 116 text

• Different browsers - no (only chrome) Cypress

Slide 117

Slide 117 text

• Different browsers - no (only chrome) • Different devices - no Cypress

Slide 118

Slide 118 text

• Different browsers - no (only chrome) • Different devices - no • Parallelization Cypress

Slide 119

Slide 119 text

• Different browsers - no (only chrome) • Different devices - no • Parallelization • Poor, but yes Cypress

Slide 120

Slide 120 text

• Different browsers - no (only chrome) • Different devices - no • Parallelization • Poor, but yes • Paid, or free using plugins Cypress

Slide 121

Slide 121 text

• Different browsers - no (only chrome) • Different devices - no • Parallelization • Poor, but yes • Paid, or free using plugins • “Only for CI” Cypress

Slide 122

Slide 122 text

SelenideJS

Slide 123

Slide 123 text

SelenideJS • Different browsers - yes

Slide 124

Slide 124 text

SelenideJS • Different browsers - yes • Different devices - yes

Slide 125

Slide 125 text

SelenideJS • Different browsers - yes • Different devices - yes • Parallelization - best in js :)

Slide 126

Slide 126 text

PROTRACTOR CYPRESS WEBDRIVERIO SELENIDES DOCUMENTATION 3 5 4 1 LOCATION ELEMENTS 4 3 2 5 DYNAMIC STUFF 2 5 0 5 API OVERVIEW 3 4 2 5 RUNNING TESTS 3 2 4 5

Slide 127

Slide 127 text

Supporting tests

Slide 128

Slide 128 text

Protractor WebdriverIO

Slide 129

Slide 129 text

No content

Slide 130

Slide 130 text

• No built-in error message, only static Protractor WebdriverIO

Slide 131

Slide 131 text

• No built-in error message, only static • Screenshot + Video with Selenoid Protractor WebdriverIO

Slide 132

Slide 132 text

SelenideJS

Slide 133

Slide 133 text

SelenideJS

Slide 134

Slide 134 text

• Readable and precise error message SelenideJS

Slide 135

Slide 135 text

• Readable and precise error message • Screenshot + Video with Selenoid SelenideJS

Slide 136

Slide 136 text

Cypress

Slide 137

Slide 137 text

PROTRACTOR CYPRESS WEBDRIVERIO SELENIDES DOCUMENTATION 3 5 4 1 LOCATION ELEMENTS 4 3 2 5 DYNAMIC STUFF 2 5 0 5 API OVERVIEW 3 4 2 5 RUNNING TESTS 3 2 4 5 DEBUG 1 5 1 2

Slide 138

Slide 138 text

If calculate results…

Slide 139

Slide 139 text

1. Cypress - 24 2. SelenideJS - 23 3. Protractor - 16 4. WebdriverIO - 13 Will have this

Slide 140

Slide 140 text

There is no best solution There is best solution in context

Slide 141

Slide 141 text

Final thoughts

Slide 142

Slide 142 text

• Protractor - no

Slide 143

Slide 143 text

• Protractor - no • Cypress • If you are ok with all its restrictions (chrome, parallelization, tabs, etc.) - best

Slide 144

Slide 144 text

• Protractor - no • Cypress • If you are ok with all its restrictions (chrome, parallelization, tabs, etc.) - best • WebdriverIO • Mobile • When you need ‘sync-mode’ or plugins

Slide 145

Slide 145 text

• Protractor - no • Cypress • If you are ok with all its restrictions (chrome, parallelization, tabs, etc.) - best • WebdriverIO • Mobile • When you need ‘sync-mode’ or plugins • SelenideJS • Can be used with modern test-runners and achieve best efficiency • Can be used with Protractor, WebdriverJS, WebdriverIO

Slide 146

Slide 146 text

Thank you AleksanderPopov aleksanderpopov [email protected]
 aleksander_popov