+ All Categories
Home > Documents > The Testable Web

The Testable Web

Date post: 08-May-2015
Category:
Upload: dave-haeffner
View: 763 times
Download: 0 times
Share this document with a friend
Description:
This talk was prepared for and presented to the NYC Web Design Meetup. It covers how to do identify core app functionality, an approach acceptance testing, and some ways the UI can be built more intelligently.
85
The Testable Web by Dave Haener Prepared for the NYC Web Design Meetup March 11, 2013 Saturday, March 16, 13
Transcript
Page 1: The Testable Web

The Testable Web

by Dave HaeffnerPrepared for the NYC Web Design MeetupMarch 11, 2013

Saturday, March 16, 13

Page 2: The Testable Web

The Motley Fool

To Educate, Amuse, and Enrich

Saturday, March 16, 13

Page 3: The Testable Web

Arrgyle

Navigate The High Tech Seas

Saturday, March 16, 13

Page 4: The Testable Web

Saturday, March 16, 13

Page 5: The Testable Web

Saturday, March 16, 13

Page 6: The Testable Web

Saturday, March 16, 13

Page 7: The Testable Web

How many of you work on web things?(e.g. websites, web applications, mobile apps)

Saturday, March 16, 13

Page 8: The Testable Web

How many of you test what you build?(or have someone on your team who does)

Saturday, March 16, 13

Page 9: The Testable Web

How many of you primarily test manually?

Saturday, March 16, 13

Page 10: The Testable Web

How many of you primarily with automation?

Saturday, March 16, 13

Page 11: The Testable Web

How many of you test with a mix of both?

Saturday, March 16, 13

Page 12: The Testable Web

How many of you don’t test?

Saturday, March 16, 13

Page 13: The Testable Web

Show of hands if any of these are true for you:

Save testing for the end of the cycleFeel like there isn’t enough time to adequately testFeel unnerved when it’s time to releaseFind issues in production

Saturday, March 16, 13

Page 14: The Testable Web

The Dirty Little Secrets of Testing

Saturday, March 16, 13

Page 15: The Testable Web

#1: You don’t have to test everything

Saturday, March 16, 13

Page 16: The Testable Web

Pareto Analysis

Saturday, March 16, 13

Page 17: The Testable Web

Saturday, March 16, 13

Page 18: The Testable Web

#2: Everything You Need to know about testing,you learned in Kindegarten.

Saturday, March 16, 13

Page 19: The Testable Web

Finding the Glitter Glue Path

Saturday, March 16, 13

Page 20: The Testable Web

Saturday, March 16, 13

Page 21: The Testable Web

Questions worth asking, to help you find your glitter glue path

Saturday, March 16, 13

Page 22: The Testable Web

How does your business* make make money/deliver value?

* the business you are building software forSaturday, March 16, 13

Page 23: The Testable Web

How do the users actually use it?

Saturday, March 16, 13

Page 24: The Testable Web

What are the prominent/relevant traits of your users(e.g. browser types, geographic location, etc.)?

Saturday, March 16, 13

Page 25: The Testable Web

What things have bitten you before?

Saturday, March 16, 13

Page 26: The Testable Web

“An example would be handy right about now”- Brian Marick

Saturday, March 16, 13

Page 27: The Testable Web

Saturday, March 16, 13

Page 28: The Testable Web

7 Automated Acceptance Tests*Successful platform upgrade

Saturday, March 16, 13

Page 29: The Testable Web

Saturday, March 16, 13

Page 30: The Testable Web

Saturday, March 16, 13

Page 31: The Testable Web

The Motley Fool

To Educate, Amuse, and Enrich

Saturday, March 16, 13

Page 32: The Testable Web

These things can take time.

You have my permission to try until you get it right.

Saturday, March 16, 13

Page 33: The Testable Web

ext

Saturday, March 16, 13

Page 34: The Testable Web

When To Automate?Questions worth asking

Saturday, March 16, 13

Page 35: The Testable Web

How long will it take to test manually?

Saturday, March 16, 13

Page 36: The Testable Web

How long will it take to test manually?

This will help you get a baseline before answering the following questions.

Saturday, March 16, 13

Page 37: The Testable Web

How often will this functionality need to be checked?

Saturday, March 16, 13

Page 38: The Testable Web

How often will this functionality need to be checked?

If often, then it is likely a good candidate for automation.

Saturday, March 16, 13

Page 39: The Testable Web

Is it valuable (e.g. core functionality, used heavily, a legal or political requirement)?

Saturday, March 16, 13

Page 40: The Testable Web

Is it valuable (e.g. core functionality, used heavily, a legal or political requirement)?

If yes, then it is very likely a candidate for automation.

Saturday, March 16, 13

Page 41: The Testable Web

How risky is the feature (e.g. fundamental changes, complex architecture, large user facing impact)?

Saturday, March 16, 13

Page 42: The Testable Web

How risky is the feature (e.g. fundamental changes, complex architecture, large user facing impact)?

High? Medium? Or Low?

If Medium to High, then maybe.

Saturday, March 16, 13

Page 43: The Testable Web

What is the level of effort to automate?

Saturday, March 16, 13

Page 44: The Testable Web

What is the level of effort to automate?

T-shirt sizing will help you here:Small: 0-2 hours

Medium: 1-2 daysLarge: 2-4 days

X-Large >= 1 week

If large or higher, probably not

But it really depends on what other work you have committed to

Saturday, March 16, 13

Page 45: The Testable Web

Does it involve look and feel?

Saturday, March 16, 13

Page 46: The Testable Web

Does it involve look and feel?

If so, then it is likely a ripe candidate for manual testing.

Saturday, March 16, 13

Page 47: The Testable Web

How To Automate (strategy)?

Saturday, March 16, 13

Page 48: The Testable Web

http://martinfowler.com/bliki/TestPyramid.htmlSaturday, March 16, 13

Page 49: The Testable Web

Build a feedback loop

(Version Control are table stakes)

Saturday, March 16, 13

Page 50: The Testable Web

Version Control System (VCS)

Saturday, March 16, 13

Page 51: The Testable Web

Continuous Integration (CI)

Saturday, March 16, 13

Page 52: The Testable Web

How to Automate (tactics)?

Saturday, March 16, 13

Page 53: The Testable Web

Choose your weapon

Saturday, March 16, 13

Page 54: The Testable Web

Consider Your Current Tech Stack

Saturday, March 16, 13

Page 55: The Testable Web

Then Layer In Your Team’s Context(strengths, comfort, confidence, excitement/interest)

Saturday, March 16, 13

Page 56: The Testable Web

Programming Language?

Doesn’t have to be the same as what you develop in.

Saturday, March 16, 13

Page 57: The Testable Web

Who will own this?

Saturday, March 16, 13

Page 58: The Testable Web

Open Source Testing Tools

Saturday, March 16, 13

Page 59: The Testable Web

Agile Alliance Functional Testing Tool grouphttp://bit.ly/AgileTestTools

Saturday, March 16, 13

Page 60: The Testable Web

But let’s assume UI is involved.

In that case, something with WebDriver.

Saturday, March 16, 13

Page 61: The Testable Web

Full Disclosure: I have some opinions on this

Released an open-source web testing framework for Selenium WebDriver

http://arrgyle.com/blog/automated-web-testing-is-hard/

Saturday, March 16, 13

Page 62: The Testable Web

World’s Quickest Overview on how Selenium works

Saturday, March 16, 13

Page 63: The Testable Web

Selenium...

is a robot sent from the future to help us test web sites

uses locators (id, name, link, css, xpath, etc.) to interact with the html elements of the page (a.k.a ‘find by strategy’)

------

The simplest and most sustainable way is to use straight up CSS.

Saturday, March 16, 13

Page 64: The Testable Web

How to build UI tests so you won’t hate yourself

Saturday, March 16, 13

Page 65: The Testable Web

Santi says...

Saturday, March 16, 13

Page 66: The Testable Web

Record & Playback is merely a stepping stoneExport your tests

Treat them like codePage Object Pattern

Saturday, March 16, 13

Page 67: The Testable Web

He also says:Only use UI tests when you have to...

Saturday, March 16, 13

Page 68: The Testable Web

But won’t they be slow?

Saturday, March 16, 13

Page 69: The Testable Web

Saturday, March 16, 13

Page 70: The Testable Web

Saturday, March 16, 13

Page 71: The Testable Web

In Practice

Saturday, March 16, 13

Page 72: The Testable Web

VCS CI Test Pack 1Simple checks

Builds,Unit Tests

Local Dev

Test Pack 2Automated Acceptance

Tests

Saturday, March 16, 13

Page 73: The Testable Web

Garbage In, Garbage Out

Saturday, March 16, 13

Page 74: The Testable Web

A more testable UI

Saturday, March 16, 13

Page 75: The Testable Web

More semantic markup(e.g. unique and descriptive locators)

Saturday, March 16, 13

Page 76: The Testable Web

Inventory and consolidate your design patterns

Saturday, March 16, 13

Page 77: The Testable Web

But really, it’s about usability

Saturday, March 16, 13

Page 78: The Testable Web

“The more people think about usability, the more things tend to work out. It's a virtuous path.”

- Ken Pier, Senior Director of Product Quality, Socialtext

Saturday, March 16, 13

Page 79: The Testable Web

“It’s only words and photos on the internet.”

- John F. Croston III, Web Content Accessibility Manager for the United States Army (army.mil)

Saturday, March 16, 13

Page 80: The Testable Web

Outro

Saturday, March 16, 13

Page 81: The Testable Web

Recap

• You Don’t Have To Test Everything

• But do test, intelligently, asking yourself

• What matters?

• Should I automate this?

• Choose a toolchain that’s right for you and your team

• Build a feedback loop

• Build a more descriptive, usable, and testable web

Saturday, March 16, 13

Page 82: The Testable Web

I’m writing a book about this stuff!

arrgyle.com/book

@TourDeDave [email protected], March 16, 13

Page 83: The Testable Web

Appendix

Saturday, March 16, 13

Page 84: The Testable Web

• A practical guide to usability: http://jfciii.com/presentations/wasp/accessibility.html

• How to address risk in Agile (view it like an investment portfolio): http://arrgyle.com/blog/agile-accounting/

• Automated Web Testing Is Hard (Introducing ChemistryKit, an open source testing framework to make automated web testing easier): http://arrgyle.com/blog/automated-web-testing-is-hard/

• CSS Selectors in Selenium: http://sauceio.com/index.php/2010/01/selenium-totw-css-selectors-in-selenium-demystified/

• Locators in Selenium http://marakana.com/bookshelf/selenium_tutorial/locators.html

Saturday, March 16, 13


Recommended