3/22/2019 about me spot the difference: how front-end and ...pain point #3 - slow dev feedback 29...

22
3/22/2019 1 Spot the Difference: How Front-end and UI Bugs are Hurting You, Your Team and Your Company Eran Barlev (@eranbarlev) March 2019 @giltayar About Me Software Engineer at heart with over 20 years of experience. Currently Technical Solution Engineer @ Applitools Founder of the Canadian Software Testing Board My true passion is automation and being able to automate visual testing of web, app and desktop application makes my current position at Applitools a dream job 1 2

Upload: others

Post on 24-Jun-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 3/22/2019 About Me Spot the Difference: How Front-end and ...Pain Point #3 - Slow Dev Feedback 29 Author new tests Execut etests Analyze failures Report bugs Fix broken tests Product

3/22/2019

1

Spot the Difference: How Front-end

and UI Bugs are Hurting You, Your

Team and Your Company

Eran Barlev (@eranbarlev)

March 2019

@giltayar

About Me ● Software Engineer at heart with over 20 years

of experience.

● Currently Technical Solution Engineer @

Applitools

● Founder of the Canadian Software Testing

Board

● My true passion is automation and being able

to automate visual testing of web, app and

desktop application makes my current position

at Applitools a dream job

1 2

Page 2: 3/22/2019 About Me Spot the Difference: How Front-end and ...Pain Point #3 - Slow Dev Feedback 29 Author new tests Execut etests Analyze failures Report bugs Fix broken tests Product

3/22/2019

2

What Are Functional

Tests?So many kinds of tests...

3 4

Page 3: 3/22/2019 About Me Spot the Difference: How Front-end and ...Pain Point #3 - Slow Dev Feedback 29 Author new tests Execut etests Analyze failures Report bugs Fix broken tests Product

3/22/2019

3

Tests, Tests, Glorious Tests!

● Unit

● Integration

● E2E

● Acceptance

● Visual

● Contract

● Browser

● Automation

● Functional

● And the list goes on…

Not to mention the

different

interpretations

5 6

Page 4: 3/22/2019 About Me Spot the Difference: How Front-end and ...Pain Point #3 - Slow Dev Feedback 29 Author new tests Execut etests Analyze failures Report bugs Fix broken tests Product

3/22/2019

4

Functional tests are

automation tests that automate the

browser in order to test the

functionality

of a web application*

* Or a mobile app

Functional tests are

automation tests that automate the

browser in order to test the

functionality

of a web application*

* Or a mobile app

7 8

Page 5: 3/22/2019 About Me Spot the Difference: How Front-end and ...Pain Point #3 - Slow Dev Feedback 29 Author new tests Execut etests Analyze failures Report bugs Fix broken tests Product

3/22/2019

5

Let’s write a Functional Test All Functional Tests are Stories

9 10

Page 6: 3/22/2019 About Me Spot the Difference: How Front-end and ...Pain Point #3 - Slow Dev Feedback 29 Author new tests Execut etests Analyze failures Report bugs Fix broken tests Product

3/22/2019

6

All Functional Tests Look Like This

● Action

● Action

● Validation

● Action

● Validation

● Action

● Action

● Action

● Validation

Problems with Actions

● Fragile Selectors

● Complex Code

● Solution: Page Objects

11 12

Page 7: 3/22/2019 About Me Spot the Difference: How Front-end and ...Pain Point #3 - Slow Dev Feedback 29 Author new tests Execut etests Analyze failures Report bugs Fix broken tests Product

3/22/2019

7

Problems with Validations

● Fragile Selectors

● Complex Code

● Too much to validate

● Only positive check○ We don’t validate what we don’t know about

● Solution: Page Objects, partially

Actions are Focused

Validations are should be Wholistic

13 14

Page 8: 3/22/2019 About Me Spot the Difference: How Front-end and ...Pain Point #3 - Slow Dev Feedback 29 Author new tests Execut etests Analyze failures Report bugs Fix broken tests Product

3/22/2019

8

Solving the Validation Problem

Visual Testing !

15 16

Page 9: 3/22/2019 About Me Spot the Difference: How Front-end and ...Pain Point #3 - Slow Dev Feedback 29 Author new tests Execut etests Analyze failures Report bugs Fix broken tests Product

3/22/2019

9

Spot The Difference Challenge

You have 1 minute to find 10 differences

17 18

Page 10: 3/22/2019 About Me Spot the Difference: How Front-end and ...Pain Point #3 - Slow Dev Feedback 29 Author new tests Execut etests Analyze failures Report bugs Fix broken tests Product

3/22/2019

10

State of Test Automation

19 20

Page 11: 3/22/2019 About Me Spot the Difference: How Front-end and ...Pain Point #3 - Slow Dev Feedback 29 Author new tests Execut etests Analyze failures Report bugs Fix broken tests Product

3/22/2019

11

Test Automation Workflow Today

Author new

tests

Execute tests

Analyze failures

Report bugs

Find cause

Fix broken

tests

Product change

Fix bugs

Applications Are Getting More Complex

OS Types Browser Versions Devices & Screen TypesMicroservices

21 22

Page 12: 3/22/2019 About Me Spot the Difference: How Front-end and ...Pain Point #3 - Slow Dev Feedback 29 Author new tests Execut etests Analyze failures Report bugs Fix broken tests Product

3/22/2019

12

Delivery Cycles Are Getting Faster

Every Page. Every Application.Hundreds Lines of Code.Changing Constantly.

23 24

Page 13: 3/22/2019 About Me Spot the Difference: How Front-end and ...Pain Point #3 - Slow Dev Feedback 29 Author new tests Execut etests Analyze failures Report bugs Fix broken tests Product

3/22/2019

13

Pain Point #1 - Low Test Coverage

Author

new

tests

Execute

tests

Analyze

failures

Report

bugsFind

cause

Fix

broken

tests

Product

change

Fix

bugs

40-70% OF TESTER

TIME IS SPENT HERE!

DeveloperTester

Analyzing test results

25 26

Page 14: 3/22/2019 About Me Spot the Difference: How Front-end and ...Pain Point #3 - Slow Dev Feedback 29 Author new tests Execut etests Analyze failures Report bugs Fix broken tests Product

3/22/2019

14

Is It Really Worth Automating?

27

•Every assertion increases the maintenance overhead

•Even if you manage to achieve 100% functional coverage, it does not

provide visual coverage

•We only catch expected bugs (e.g. what we assert)

•So...manual testing remains a vital technique

Pain Point #2 - Slow QA Feedback

Author new tests

Execute

tests

Find

cause

Fix broken tests

Product

change

Fix

bugs

DeveloperTester

FULLY

MANUALReport

bugs

Analyze

failures

27 28

Page 15: 3/22/2019 About Me Spot the Difference: How Front-end and ...Pain Point #3 - Slow Dev Feedback 29 Author new tests Execut etests Analyze failures Report bugs Fix broken tests Product

3/22/2019

15

Pain Point #3 - Slow Dev Feedback

29

Author new tests

Execut

e tests

Analyze

failures

Report

bugs

Fix broken tests

Product

change

Fix

bugsFind

cause

REPRODUCE & COMPARE WITH WORKINGCODE

DeveloperTester

Testing Is Seen as a BottleneckAccording to a recent survey conducted by CA

63%Believe QA is the

bottleneck in

DevOps

70%Of testing is still done manually

72%Agree continuous testing requires a major shift in culture

29 30

Page 16: 3/22/2019 About Me Spot the Difference: How Front-end and ...Pain Point #3 - Slow Dev Feedback 29 Author new tests Execut etests Analyze failures Report bugs Fix broken tests Product

3/22/2019

16

Testing is seen as a Bottleneck

31

Testing is vital...

● Protect quality

● Represent the end user

● Critical to business

success

But success for teams is challenging.

● Visual and functional bugs escape routinely

● Hard to keep up with R&D pace and complexity

● No obvious solution in sight

● Team morale can suffer

It HappenstoAmazon

32

31 32

Page 17: 3/22/2019 About Me Spot the Difference: How Front-end and ...Pain Point #3 - Slow Dev Feedback 29 Author new tests Execut etests Analyze failures Report bugs Fix broken tests Product

3/22/2019

17

It HappenstoMicrosoft

33

It HappenstoUPS

34

33 34

Page 18: 3/22/2019 About Me Spot the Difference: How Front-end and ...Pain Point #3 - Slow Dev Feedback 29 Author new tests Execut etests Analyze failures Report bugs Fix broken tests Product

3/22/2019

18

It happens to Twitter

35

It Happensto FinancialTimes

36

35 36

Page 19: 3/22/2019 About Me Spot the Difference: How Front-end and ...Pain Point #3 - Slow Dev Feedback 29 Author new tests Execut etests Analyze failures Report bugs Fix broken tests Product

3/22/2019

19

What Are Visual

Tests?Replace Humans with Image Diffing ?

37 38

Page 20: 3/22/2019 About Me Spot the Difference: How Front-end and ...Pain Point #3 - Slow Dev Feedback 29 Author new tests Execut etests Analyze failures Report bugs Fix broken tests Product

3/22/2019

20

Solutions to problems with validations

● Fragile Selectors

○ No more selectors

● Complex Code

○ Same code for all validations

● Too much to validate

○ We validate wholisticlly

● Only positive check

○ We validate things we didn’t even think of validating

Problems with Naive Image Diffing

● Small anti-aliasing differences

○ Mac vs. Linux vs.Windows

○ Different GPUs

● Date/time problems○ regions that are different from run to run

● Full screen vs. Viewport

● Comparing is a pain

● “Accepting” a new baseline is a pain

39 40

Page 21: 3/22/2019 About Me Spot the Difference: How Front-end and ...Pain Point #3 - Slow Dev Feedback 29 Author new tests Execut etests Analyze failures Report bugs Fix broken tests Product

3/22/2019

21

Cloud-Based Solutions

Cloud-based solution

● Visual diffing algorithms see like a human sees○ Ignoring the small differences

○ AI-level algorithms are now evolved and keep getting better

● Screenshot management tools are available, enabling you

to

○ See the diffs

○ Approve new baselines

○ Open bugs on diffs that are bugs

41 42

Page 22: 3/22/2019 About Me Spot the Difference: How Front-end and ...Pain Point #3 - Slow Dev Feedback 29 Author new tests Execut etests Analyze failures Report bugs Fix broken tests Product

3/22/2019

22

Let’s Run the Demo Thank YouEran Barlev (@eranbarlev)

43 44