Testing Your Code as Part of an Industrial Grade Workflow

28
TESTING YOUR CODE As Part of An Industrial Grade Workflow

Transcript of Testing Your Code as Part of an Industrial Grade Workflow

Page 1: Testing Your Code as Part of an Industrial Grade Workflow

TESTING YOUR CODEAs Part of An Industrial Grade Workflow

Page 2: Testing Your Code as Part of an Industrial Grade Workflow

Pantheon.io 2

Let’s Get This Party StartedHere is the dance card for this presentation.

Workflow 101: Better Living through Version Control

Git Branches: Separate Branches, Separates Concerns

Cross Browser Testing: Make the Robots Use Internet Explorer

Visual Regression Testing: Compare Pixels, Find Problems

Performance Testing: Regular Testing is the Best Testing

Demo: Let’s See This All in Action!

Page 3: Testing Your Code as Part of an Industrial Grade Workflow

Pantheon.io 4

Workflow 101: Barebones

Development Testing Live

Page 4: Testing Your Code as Part of an Industrial Grade Workflow

Pantheon.io 5

Workflow 101: What and Why

• Provide a safe place to do development that won’t break anything.

• Allow testing of new code and configuration in a “production parity” test environment.

• Prevent code from being edited in the live environment full stop.

Page 5: Testing Your Code as Part of an Industrial Grade Workflow

Pantheon.io 6

Workflow 101: Fleshed Out

Page 6: Testing Your Code as Part of an Industrial Grade Workflow

Pantheon.io 7

Git Branches: Getting Started

• Git is a distributed version control system

• Git supports having many different separate feature branches

• Code is developed on feature branch & then merged into the master branch

• Code can be released by tagging & deploying a particular state of the code

Page 7: Testing Your Code as Part of an Industrial Grade Workflow

Pantheon.io 8

Git Branches: Feature Branching

Page 8: Testing Your Code as Part of an Industrial Grade Workflow

Pantheon.io 9

Use Git for All Of Your Projects

Page 9: Testing Your Code as Part of an Industrial Grade Workflow

Pantheon.io 10

Wait! What About Configuration?

Page 10: Testing Your Code as Part of an Industrial Grade Workflow

Pantheon.io 11

Hello WP-CFM!

https://wordpress.org/plugins/wp-cfm/

Page 11: Testing Your Code as Part of an Industrial Grade Workflow

Pantheon.io 12

WP-CFM GUI

Page 12: Testing Your Code as Part of an Industrial Grade Workflow

Pantheon.io 13

WP-CFM CLI

Page 13: Testing Your Code as Part of an Industrial Grade Workflow

LET’S GET TESTING

Page 14: Testing Your Code as Part of an Industrial Grade Workflow
Page 15: Testing Your Code as Part of an Industrial Grade Workflow

Pantheon.io 16

Cross Browser Testing

• If there is one thing the robots should do, it is help with cross browser testing.

• This is a tremendously tedious process that requires a variety of different devices and operating systems.

• But it is very important! If your client using an old version of IE…

Page 16: Testing Your Code as Part of an Industrial Grade Workflow

Pantheon.io 17

Cross Browser Testing As a Service

https://www.browserstack.com/automate

Page 17: Testing Your Code as Part of an Industrial Grade Workflow

Pantheon.io 18

Performance Testing

• Performance testing can be one of the hardest things to properly test.

• It takes awhile to do a proper performance test and its hard to tell what is causing the error.

• But performance matters a great deal and we all want our sites to be SUPER FAST.

Page 18: Testing Your Code as Part of an Industrial Grade Workflow

Pantheon.io 19

Performance Testing As a Service

https://loadimpact.com/

Page 19: Testing Your Code as Part of an Industrial Grade Workflow

Pantheon.io 20

Visual Regression Testing

• Visual Regression isn’t as popular as other testing, but its super cool

• Visual Regression does a visual compression between two images to show you what pixels changed.

• This helps to identify areas where the design changed and lets you focus your QA.

Page 20: Testing Your Code as Part of an Industrial Grade Workflow

Pantheon.io 21

Visual Regression Testing As a Service

https://backtrac.io

Page 21: Testing Your Code as Part of an Industrial Grade Workflow

LET’S GET THE DEMO READY

Page 22: Testing Your Code as Part of an Industrial Grade Workflow

DEMO MAGIC INGREDIENT ONEA Website

https://www.scalewp.io/

Page 23: Testing Your Code as Part of an Industrial Grade Workflow

DEMO MAGIC INGREDIENT TWOA Website Management Platform

https://pantheon.io/

Page 24: Testing Your Code as Part of an Industrial Grade Workflow

DEMO MAGIC INGREDIENT THREESystem for Platform Hooks

https://pantheon.io/docs/quicksilver/

Page 25: Testing Your Code as Part of an Industrial Grade Workflow

DEMO MAGIC INGREDIENT FOURSpecific Platform Hooks

Page 26: Testing Your Code as Part of an Industrial Grade Workflow

DEMO MAGIC INGREDIENT FIVEThird Party Testing Tools

Page 27: Testing Your Code as Part of an Industrial Grade Workflow

LET’S GET DEMOING

Page 28: Testing Your Code as Part of an Industrial Grade Workflow

THANK YOU