visual regression testing

24
Visual regression testing Apache learning session 02/02/2016 26/05/22 VISUAL REGRESSION TESTING Some tips for this, don’t make the title too long If you have a single word wrapping around add your own returns to make it look right There is a secondary title to use if you need it

Upload: daniel-furze

Post on 11-Apr-2017

210 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Visual Regression Testing

3 MAY 2023VISUAL REGRESSION TESTING

Visual regression testingApache learning session 02/02/2016

• Some tips for this, don’t make the title too long

• If you have a single word wrapping around add your own returns to make it look right

• There is a secondary title to use if you need it

Page 2: Visual Regression Testing

2VISUAL REGRESSION TESTING

What?

Page 3: Visual Regression Testing

3 MAY 2023VISUAL REGRESSION TESTING 3

“Automating visual regression testing takes away the pain of having to manually check every page or component after modifying CSS that could globally affect a website, catching errors quickly.”

- ME, 2016

Page 4: Visual Regression Testing

4VISUAL REGRESSION TESTING

Why?

Page 5: Visual Regression Testing

3 MAY 2023VISUAL REGRESSION TESTING 5

Page 6: Visual Regression Testing
Page 7: Visual Regression Testing
Page 8: Visual Regression Testing
Page 9: Visual Regression Testing

3 MAY 2023VISUAL REGRESSION TESTING 9

Why use it

• Test at a component level• See global changes quickly• Automate monotonous task• Reduce human erorr

Page 10: Visual Regression Testing

10VISUAL REGRESSION TESTING

How?

Page 11: Visual Regression Testing

11VISUAL REGRESSION TESTING 11

BackstopJS

Page 12: Visual Regression Testing

3 MAY 2023VISUAL REGRESSION TESTING 12

How to use it

• npm install backstopjs --save-dev

• cd node_modules/backstopjs

• npm install

• gulp genConfig

Page 13: Visual Regression Testing

3 MAY 2023VISUAL REGRESSION TESTING 13

How to use it

• Modify backstop.json config file• Add the task(s) to gulpfile.js• Generate base screenshots• Make changes• Test(!)

Page 14: Visual Regression Testing

14VISUAL REGRESSION TESTING

Live demo FTW!

Page 15: Visual Regression Testing

Page level test

Page 16: Visual Regression Testing

Component level test

Page 17: Visual Regression Testing

17VISUAL REGRESSION TESTING

Caveats

Page 18: Visual Regression Testing

3 MAY 2023VISUAL REGRESSION TESTING 18

Caveats

• Currently working on how to script page interaction

• Fail threshold may be unreliable• CMS-entered content can change• Need a robust styleguide• Human erorr(!)

Page 19: Visual Regression Testing

19VISUAL REGRESSION TESTING

When?[discuss with audience]

Page 20: Visual Regression Testing

3 MAY 2023VISUAL REGRESSION TESTING 20

When to use it

• During automated build process?• Whilst developing?• Pre-commit hook?• Be vigilant!

Page 21: Visual Regression Testing

21VISUAL REGRESSION TESTING

Who?[argue with audience]

Page 22: Visual Regression Testing

3 MAY 2023VISUAL REGRESSION TESTING 22

Who should use it

• Front-end developers?• All developers?• Internal test team?• Client test team? Maybe…

Page 23: Visual Regression Testing

23VISUAL REGRESSION TESTING 23

ALL OF US!

Page 24: Visual Regression Testing

3 MAY 2023VISUAL REGRESSION TESTING

Merci.