you're doing it wrong

Post on 16-Jan-2015

4.036 Views

Category:

Documents

4 Downloads

Preview:

Click to see full reader

DESCRIPTION

Selenium anti-patterns and how to start to address them.

TRANSCRIPT

Selenium(You’re doing it wrong)

Adam Goucheradam@element34.ca

@adamgoucher

Thursday, April 7, 2011

General

Thursday, April 7, 2011

Thursday, April 7, 2011

I call my automation ‘tests’

Thursday, April 7, 2011

I call my automation ‘scripts’ or ‘checks’

I call my automation ‘tests’

Thursday, April 7, 2011

Thursday, April 7, 2011

My goal is to replace humans and push to production faster

Thursday, April 7, 2011

My goal is to let humans test higher quality builds with greater efficiency

My goal is to replace humans and push to production faster

Thursday, April 7, 2011

Se-IDE

Thursday, April 7, 2011

Thursday, April 7, 2011

I save my scripts recorded in Se-IDE

Thursday, April 7, 2011

I export my scripts recorded in Se-IDE

I save my scripts recorded in Se-IDE

Thursday, April 7, 2011

Thursday, April 7, 2011

I have locators in my scripts

Thursday, April 7, 2011

I have my locators in a user-extension

I have locators in my scripts

Thursday, April 7, 2011

Thursday, April 7, 2011

I use the default formatter

Thursday, April 7, 2011

I use a custom formatter

I use the default formatter

Thursday, April 7, 2011

Thursday, April 7, 2011

I email updates to formats and extensions

Thursday, April 7, 2011

I use a site-specific plugin

I email updates to formats and extensions

Thursday, April 7, 2011

Se-RC

Thursday, April 7, 2011

Thursday, April 7, 2011

My application is written in X so my scripts must be as well

Thursday, April 7, 2011

I write scripts the language that makes the most sense

My application is written in X so my scripts must be as well

Thursday, April 7, 2011

Thursday, April 7, 2011

I inherit from my framework’s TestCase class

Thursday, April 7, 2011

I have a custom class that my scripts inherit from (-- it inherits from my

framework’s TestCase class)

I inherit from my framework’s TestCase class

Thursday, April 7, 2011

Thursday, April 7, 2011

I have locators in my scripts

Thursday, April 7, 2011

I have my locators in a shared <thing>

I have locators in my scripts

Thursday, April 7, 2011

Thursday, April 7, 2011

I use ‘brittle’ locators

Thursday, April 7, 2011

I use good structural locators

I use ‘brittle’ locators

Thursday, April 7, 2011

Thursday, April 7, 2011

I have static data in my scripts

Thursday, April 7, 2011

I feed data externally into my scripts

I have static data in my scripts

Thursday, April 7, 2011

Thursday, April 7, 2011

Describing my scripts I use the word ‘and’

Thursday, April 7, 2011

Individual scripts do one thing only

Describing my scripts I use the word ‘and’

Thursday, April 7, 2011

Thursday, April 7, 2011

I use a ‘procedural’ scripting style

Thursday, April 7, 2011

Page Objects FTW!

I use a ‘procedural’ scripting style

Thursday, April 7, 2011

Thursday, April 7, 2011

I build suites of scripts

Thursday, April 7, 2011

I ‘tag’ my scripts and use my framework’s discovery methods

I build suites of scripts

Thursday, April 7, 2011

Thursday, April 7, 2011

My automation is different than the production code

Thursday, April 7, 2011

No. Its not.

My automation is different than the production code

Thursday, April 7, 2011

Thursday, April 7, 2011

I run my scripts from my local machine

Thursday, April 7, 2011

The CI server is my environment of record

I run my scripts from my local machine

Thursday, April 7, 2011

Se-Grid

Thursday, April 7, 2011

Thursday, April 7, 2011

I use Se-Grid for cross browser distribution

Thursday, April 7, 2011

I have browser specific jobs in CI

I use Se-Grid for cross browser distribution

Thursday, April 7, 2011

Thursday, April 7, 2011

I have my own Se-Grid

Thursday, April 7, 2011

To the Cloud!

I have my own Se-Grid

Thursday, April 7, 2011

And finally...

Thursday, April 7, 2011

Thursday, April 7, 2011

I will blindly implement what Adam says

Thursday, April 7, 2011

I will use my brain and use what works for me and ignore what doesn’t

I will blindly implement what Adam says

Thursday, April 7, 2011

Thanks!

Thursday, April 7, 2011

top related