Selenium Users Anonymous

41
selenium 34 Se Users Anonymous by Dave Haeffner

description

Presented at Agile 2012

Transcript of Selenium Users Anonymous

Page 1: Selenium Users Anonymous

selenium34

Se

Users Anonymous

by Dave Haeffner

Page 2: Selenium Users Anonymous
Page 3: Selenium Users Anonymous

Show of handsHow many of you are human?

100%How many of you use Selenium?

MostJust getting started in test automation?

40%Comfortable with test automation? Using it regularly?

50%Test automation guru's?

1-2 peopleDevelopment background

60%Tech proficient -- know enough to be dangerous?

15%Scared to death of tech?

Some smiles but no one raised their hand

Page 4: Selenium Users Anonymous
Page 5: Selenium Users Anonymous

Exercise 1What are your biggest pain points when it comes to using Selenium? Or Test Automation in general?

In 5 minutes, write them down

One issue per post-it

Keep it concise

Keep it to yourself

Page 6: Selenium Users Anonymous
Page 7: Selenium Users Anonymous

Evolutionary paths of Selenium Suites

Se-IDESimple tests captured that can grow into an albatross that is unmaintainable, brittle, and makes you spit nails. Most people (hopefully) realize this is not the way to go and export their tests into a real programming language

Se-RCWhat you used to export your Se-IDE tests into. But not anymore, it's reaching end-of-life.

Se-WebDriverBehold the future! Pure browser integration (read: fast and awesome)

Page 8: Selenium Users Anonymous

Entrees

Breaking/brittle/untrustworthy/unstable testsHard to decipher results

Hard to interpret what your tests testFalse positives

SlowToo many tests

OwnershipMaintenance

Out of band communicationWorks on my machine

Page 9: Selenium Users Anonymous

Desserts

Manual testing as a crutch

QA as a bottle neck

Defects caught late in the cycle

Page 10: Selenium Users Anonymous
Page 11: Selenium Users Anonymous

Exercise 2You have 5 minutes

Come to the front of the room with your post-its from Exercise 1

Post them on the wall

Group like with like

Page 12: Selenium Users Anonymous

12

Page 13: Selenium Users Anonymous

1 - Admit You Have a Problem

Page 14: Selenium Users Anonymous

It's not entirely your faultSelenium was Built by Developers for Developers. Some assembly required, oh, and RTFM.

Along the way someone built a Selenium IDE to make it easy for mere mortals to capture automated tests, while this got newcomers to use the tool, it reinforced some bad habits -- causing people to build painful and unmaintainable test suits

While there is a great community and good documentation, there is not a cohesive, standard "here you guy" guide... yet

It can be overwhelming for a newcomer. But most times you duct-tape together a solution to your problem with answers found in blog posts and stack overflow threads.

Page 15: Selenium Users Anonymous

2 - Take a deep breath

Page 16: Selenium Users Anonymous

It's Okay

Take into account that you are doing something difficult

And that you are outside of your comfort zone, and that will likely not change

But it's okay, people have gone before you

And you have to fail to learn

Page 17: Selenium Users Anonymous

3 - Try looking at things differently

Page 18: Selenium Users Anonymous

Try these on for size

ZoomingBe able to "zoom in" deal with the day to day details while also "zooming out" to see the big picture -- making sure that both the high and low level are aligned

Effectiveness = Quality x AcceptanceIt's much easier to improve quality than it is acceptance. Where are you spending your effort?

Personas & MotivationQA's are either very technical or very analytical. Engineers tend to want to solve problems. Understanding these things will help you unlock untapped potential.

Page 19: Selenium Users Anonymous

4 - Pump some Tech iron

Page 20: Selenium Users Anonymous

Pump you up

I've seen a lot of people who are fearful of technology but they play on the razor's edge of it. Weird.

Pump some iron. Learn to code. Or least, learn the broad strokes. It will help you with your "tech comfort".

Resources abound -- books, blogs, meetups, classes, conferences, etc.

Sharpen your tools

Page 21: Selenium Users Anonymous

5

Find Your Inner

Napoleon,

Develop A Strategy

Page 22: Selenium Users Anonymous

It's less about the tool and more about the people

Think big, keep it simple, capture value

Envision the future and build a roadmap to it

Some example questions to askType of app?Data heavy?Rich UI?How does the business makes money?Available Usage metrics?Browsers you care about?Current S/W dev workflow? Release cycle?Resources available?QA Team make-up? Dev Team make-up?Top-down support?Bottom-up interest?

Page 23: Selenium Users Anonymous

6

Break Down The Wall

Page 24: Selenium Users Anonymous

Make friends with the Developers -- work together!

Choose a technology stack for building a framework that makes sense for you and your team -- this is a topic in and of itself

To start, focus on you and your team's context -- e.g. strengths, comfort, confidence, and excitement

Also consider your company's current tech stack

Put it to the team to try and decide

Also, have them give it a fun name -- this stuff matters!

Page 25: Selenium Users Anonymous

7 - L

earn

the

terrain

Page 26: Selenium Users Anonymous

Try stuff

Commit and make progress

Learn what you need along the way to become effective

Fill in your knowledge gaps as you go

And don't be afraid to ask questions

Page 27: Selenium Users Anonymous

8 - Test Less

Page 28: Selenium Users Anonymous

Perform a Pareto analysis. It posits that 80% of the value comes from 20% of the inputs -- and it's correct. Consider this a power law.

A good heuristic to follow for this -- 3 buckets.

There are 3 things you should care about when it comes to testing: Table Stakes, Money Makers, Back Breakers● Table Stakes: The simple things that should just work● Money Makers: How does your business make

money/generate value? ● What is risky, prone to breakage, overly complicated?

If you get these right, then you are on to something great

This requires tight collaboration with business and tech

Page 29: Selenium Users Anonymous

9 - Test Well

Page 30: Selenium Users Anonymous

Grow a framework that can be used by the whole team

Proper abstraction -- e.g. Page Object Pattern

Single Responsibility Principle -- do one thing and do it well

Atomic testing -- each test should be able to run and be understood independently

Test under the hood -- you can verify important business logic against the underlying API/WebServices

Parallelize -- e.g. SauceLabs, DIY w/ SeleniumGrid -- SeleniumHQ has a list of all of the players out there

Provide timely, valuable feedback for both Tech & Biz -- e.g. Use CI & sexy reporting

Remember that manual/exploratory testing has its place

Page 31: Selenium Users Anonymous

10

Keep It Lean & Optimize

Page 32: Selenium Users Anonymous

This is a good way to gauge your success and mine for ways to improve

Continually assess how you're doing

Are you solving problems or just testing for testing sake?

Make changes, try, observe, make changes, try, observe… you get the idea!

Once you are doing things that are generating value, optimize them, not before

Page 33: Selenium Users Anonymous

11

Meetups

BlogsGoogle Groups

IRC

Mailing Lists

TwittersStack Overflow

Quora

Page 34: Selenium Users Anonymous

12

Page 35: Selenium Users Anonymous

Learn something that you had to cobble together? Write a blog post

See a question on Stack Overflow that you know the answer to?

Answer it

Have an idea worth sharing? Give a talk a local Selenium/Tech Meetup

No Local Selenium Meetup? Start one!Contact [email protected] to find out how

Page 36: Selenium Users Anonymous

Assess reality, always start with why, be strategic, test smarter, pay attention, you've always got a friend, pay it forward

This can be a linear progression, but it shouldn't beYou can practice any of these steps individually. In fact, I encourage you toYou don't need to be an expert to pay it forwardYou become an expert by paying it forwardIf you have a strategy and it doesn't seem to be working, be lean and revisit thingsAlways be learning and pumping your tech ironAnd don't forget to breath

But most importantly, and I hope this has been readily apparent. It's less about the tool than you think.

12 Steps Recap

Page 37: Selenium Users Anonymous

@TourDeDave

[email protected]

Page 38: Selenium Users Anonymous

AppendixRecommendations