15
T15 Concurrent Class 10/3/2013 1:30:00 PM "Confessions of a Test Automation Addict" Presented by: David Rosskopf LDS Church Brought to you by: 340 Corporate Way, Suite 300, Orange Park, FL 32073 888-268-8770 ∙ 904-278-0524 ∙ [email protected] www.sqe.com

Confessions of a Test Automation Addict

Embed Size (px)

Citation preview

Page 1: Confessions of a Test Automation Addict

T15 Concurrent Class

10/3/2013 1:30:00 PM

"Confessions of a Test

Automation Addict"

Presented by:

David Rosskopf

LDS Church

Brought to you by:

340 Corporate Way, Suite 300, Orange Park, FL 32073

888-268-8770 ∙ 904-278-0524 ∙ [email protected] ∙ www.sqe.com

Page 2: Confessions of a Test Automation Addict

David Rosskopf

LDS Church

David Rosskopf has been addicted to test automation since 2006. As a bored technical support

representative for the illegal-drug testing industry, David started introducing automation to

simplify his job—and save time. He moved on to create large automation suites using various

tools, creating solutions that simplified not only his job but the jobs of others. David currently

works for The Church of Jesus Christ of Latter-day Saints, where he helps control quality on an

enterprise level facilities management and property application.

Page 3: Confessions of a Test Automation Addict

9/19/2013

1

Confessions of an Automation Addict

By David Rosskopf

AA

I am David And I am an addict

Page 4: Confessions of a Test Automation Addict

9/19/2013

2

I am David And I am an addict

• Born in Southern California • Moved to Utah • Hobbies and interest: music,

movies, games, and family.

I am David And I am an addict

• Born in Southern California • Moved to Utah • Loves Music, Movies, Games,

and Family.

• Foster Parent • Four children (12, 8,6,4) • Two Dogs • One incredible wife

Page 5: Confessions of a Test Automation Addict

9/19/2013

3

• First XT Computer at 12 • First website at 16 • First tech job at 18 • Small break from IT at 21 • First tech support at 24

My profession is my enabler

History

• First QA position 25 • Currently work for the

LDS Church

• Supporting physical facilities

Tools of choice

Page 6: Confessions of a Test Automation Addict

9/19/2013

4

UI Automation • WShell (VB Script) • Selenium 1 C# • WaTiN C# • Selenium 2 C#

Pros • Automate all types applications • Limited script capabilities • Great for simulating a virus that literally takes

over your computer Cons

• No error handling • Have to watch or it will screw up your computer

Pros • Easy to automate simple websites • Recorder

Cons • Doesn’t always work the way you think it would • No support for on load JavaScript calls • Requires selenium RC server

Pros • Great for IE automation • Can map complex elements on site • Easy use of Object Oriented Programing

Cons • Little support for Firefox • No support for Chrome • No Xpath

Pros • Can map complex elements on site • Easy use of Object Oriented Programing • Use with mobile devices • Support for multiple browser

Cons • Doesn’t work as well in IE • MS Coded UI

Pros • Has a recorder

Cons • Very complex to code yourself • Recorder creates tons of lines to do a simple

function. • Really made to rerecord every time a change is

made

Tools of choice

UI Automation • WShell (VB Script) • Selenium 1 C# • WaTiN C# • Selenium 2 C#

• WAPT • Silk Performer • Microsoft

Load Testing

Load Testing

Pros • Automate all types applications • Limited script capabilities • Great for simulating a virus that literally takes

over your computer Cons

• No error handling • Have to watch or it will screw up your computer

Pros • Easy to automate simple websites • Recorder

Cons • Doesn’t always work the way you think it would • No support for on load JavaScript calls • Requires selenium RC server

Pros • Great for IE automation • Can map complex elements on site • Easy use of Object Oriented Programing

Cons • Little support for Firefox • No support for Chrome • No Xpath

Pros • Can map complex elements on site • Easy use of Object Oriented Programing • Use with mobile devices • Support for multiple browser

Cons • Doesn’t work as well in IE • MS Coded UI

Pros • Has a recorder

Cons • Very complex to code yourself • Recorder creates tons lines to do a simple

function. • Really made to rerecord every time a change is

made

Pros • Cheap • Complex integration • Good for Web Applications • Scalable

Cons

• Expensive • Complex coding

Weapons of choice Pros

• Has UI Load test Pros

• Easy to code • Complex integration • Good for Web Applications • Scalable (Cheap)

Cons

• No UI Load Testing

Page 7: Confessions of a Test Automation Addict

9/19/2013

5

Boredom is my trigger

Repetitive task + me = boredom

Boredom + me = sleep

Sleepy work = why?

Why? = can I automated this?

Are others falling asleep?

Relapse: Building a Framework

Page 8: Confessions of a Test Automation Addict

9/19/2013

6

Relapse: Building a Framework

Websites are made up of HTML code

Automation interacts with the website using

the HTML code

Websites have patterns in HTML

code

Best Automation frameworks, map each interaction

Coding all of these interaction points is a

great sleep agent.

Part 2: Options has values

Part 3: Options has text

Websites have patterns in HTML

code

Part 1: Select has name

Page 9: Confessions of a Test Automation Addict

9/19/2013

7

Websites have patterns in HTML

code Part 2: Options has values

Part 3: Options has text

Part 1: Select has name

I use web driver to crawl through the website to grab my variables for

each dropdown in the site.

After running, I then have the foundation for my framework.

2 Days of Coding = 1000 automatically mapped objects

I can now do more interesting things like writing tests.

Then I make a template for creating the code for

each object.

Relapse: Building a Framework

Page 10: Confessions of a Test Automation Addict

9/19/2013

8

Relapse: Monitoring Software

The problem

Servers Crashing

Slow Response Times

Sad Users

The Solution

Have technical support check servers every hour

Problem: they have better things to do.

40 hours spent • Increased Efficiency • Increased Quality

Create timer to run tests

Create annoying program to prompt

support users

Create a database to log the data

Capture response times and errors

Create automated test for each application

Relapse: Monitoring Software

Page 11: Confessions of a Test Automation Addict

9/19/2013

9

Relapse: Application Helper

Complications found with testing

Complex Security Model Frustrating Organization Model

No easy way to spoof user Hours spent in the database

Not easy to navigate to right record

Step 1: Identified Redundant Tasks

Step 2: Think “How can I automate this”

Step 3: Sell it and Do it.

• SQL Queries run often • User spoofing

• Take the queries, and move them into a .Net application, with an easy UI.

• Create a bunch of fake users, and replace the real ones.

• Check with your boss, and sell him on the idea.

• Make the program, and share for all to use.

Page 12: Confessions of a Test Automation Addict

9/19/2013

10

Hours Saved per Week QA = 5 Hrs. Dev = 2 Hrs.

X 3 = 15 Hrs. X 3 = 6 Hrs.

Total Hours: 21 Hrs.

Relapse: Application Helper

Relapse: Find Common Issues

Sort through all of the data changes for the last 4 years.

NO!!!!!!!!!!!!!!!

Page 13: Confessions of a Test Automation Addict

9/19/2013

11

Relapse: Find Common Issues

Step 1: Identify the Need Step 2: Think “How can I automate this”

Step 3: Do It

• Identify the common fixes being made to the database.

• Find ways to prevent these fixes from being needed.

• Source control contains a copy of every fix to the database.

• Create a program that reads through each file, and parses it out to a table.

• Didn’t check with boss, time already approved

• Created a simple console program to parsed through the files, and save the data in csv file.

Relapse: Find Common Issues

80 Hours schedule for project 6 hours to automate

74 hours saved

Identified enhancements that lowered annual ticket count 50 tickets X 3 hr = 150 hr year

Page 14: Confessions of a Test Automation Addict

9/19/2013

12

What to take away

If you automate the boring stuff, you leave enough time for

the fun stuff.

Identify tasks that are repetitive, boring, and a waste

of time, automate them.

What to take away

Learn to program, and use those skills to simplify your job.

Build tools that will help you Support the code.

Page 15: Confessions of a Test Automation Addict

9/19/2013

13

What to take away

David Rosskopf Blog: ScienceOfQuality.com

Email: [email protected]

Free software and examples

Step by step tutorials