34
What you need to know to get started in Automation Presented by Jim Hazen

What you need to know to get started in Automation ...files.meetup.com/2625872/AutomationProgrammingForTestersV3.pdf · Veteran of the Software Testing Trenches Experience in software

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: What you need to know to get started in Automation ...files.meetup.com/2625872/AutomationProgrammingForTestersV3.pdf · Veteran of the Software Testing Trenches Experience in software

What you need to know to get started in Automation

Presented by

Jim Hazen

Page 2: What you need to know to get started in Automation ...files.meetup.com/2625872/AutomationProgrammingForTestersV3.pdf · Veteran of the Software Testing Trenches Experience in software

Introduction Jim Hazen

Veteran of the Software Testing Trenches

Experience in software testing, both commercial and consulting work.

Working with automation and tools since 1989.

Implemented Automation on DOS, OS/2, Windows and Web platforms.

Experience with various tools; including HP/Mercury, IBM/Rational, and other ‘scripting’ languages.

Page 3: What you need to know to get started in Automation ...files.meetup.com/2625872/AutomationProgrammingForTestersV3.pdf · Veteran of the Software Testing Trenches Experience in software

Agenda How Do I Learn How to do Test Automation

Programming Basics & Constructs

What is Scripting

Programming for Test Automation

Windows, Objects, API’s & Other Fun Things

Outside of the Comfort Zone

Resources to Tap Into

Summary

Q&A

Page 4: What you need to know to get started in Automation ...files.meetup.com/2625872/AutomationProgrammingForTestersV3.pdf · Veteran of the Software Testing Trenches Experience in software

When I Grow Up… I want to be a Test Automation Developer.

Page 5: What you need to know to get started in Automation ...files.meetup.com/2625872/AutomationProgrammingForTestersV3.pdf · Veteran of the Software Testing Trenches Experience in software

How do I learn how to Automate Testing?

The Vulcan Mind Meld??? Umm… I don’t think so.

Page 6: What you need to know to get started in Automation ...files.meetup.com/2625872/AutomationProgrammingForTestersV3.pdf · Veteran of the Software Testing Trenches Experience in software

Can’t learn it in your sleep.

Page 7: What you need to know to get started in Automation ...files.meetup.com/2625872/AutomationProgrammingForTestersV3.pdf · Veteran of the Software Testing Trenches Experience in software

Nope, not this way!

Page 8: What you need to know to get started in Automation ...files.meetup.com/2625872/AutomationProgrammingForTestersV3.pdf · Veteran of the Software Testing Trenches Experience in software

Doesn’t work either.

Page 9: What you need to know to get started in Automation ...files.meetup.com/2625872/AutomationProgrammingForTestersV3.pdf · Veteran of the Software Testing Trenches Experience in software

Automation is hard work

Page 10: What you need to know to get started in Automation ...files.meetup.com/2625872/AutomationProgrammingForTestersV3.pdf · Veteran of the Software Testing Trenches Experience in software

Learning automation can be frustrating

Page 11: What you need to know to get started in Automation ...files.meetup.com/2625872/AutomationProgrammingForTestersV3.pdf · Veteran of the Software Testing Trenches Experience in software

Sometimes you don’t know where to go

Page 12: What you need to know to get started in Automation ...files.meetup.com/2625872/AutomationProgrammingForTestersV3.pdf · Veteran of the Software Testing Trenches Experience in software

Sometimes you go where you don’t want to

Page 13: What you need to know to get started in Automation ...files.meetup.com/2625872/AutomationProgrammingForTestersV3.pdf · Veteran of the Software Testing Trenches Experience in software

Sometimes you just want to give up

Page 15: What you need to know to get started in Automation ...files.meetup.com/2625872/AutomationProgrammingForTestersV3.pdf · Veteran of the Software Testing Trenches Experience in software

You need to do research

Page 16: What you need to know to get started in Automation ...files.meetup.com/2625872/AutomationProgrammingForTestersV3.pdf · Veteran of the Software Testing Trenches Experience in software

You need to do the work!

Page 17: What you need to know to get started in Automation ...files.meetup.com/2625872/AutomationProgrammingForTestersV3.pdf · Veteran of the Software Testing Trenches Experience in software

Programming Basics Programs are written by humans

It’s only as good as the person who wrote it

Programs need to be written in a ‘logical’ fashion

Need to perform a specific task or set of tasks

Programs need to be written with modularity and simplicity in mind

Don’t try to do it all in one big piece, break it down and solve it a piece at a time.

Programs need to be maintainable

Make sure you can come back in 6 months and know what is going on.

Page 18: What you need to know to get started in Automation ...files.meetup.com/2625872/AutomationProgrammingForTestersV3.pdf · Veteran of the Software Testing Trenches Experience in software

What is Scripting? It’s programming! It is creating a set of instructions

for the computer to execute.

It can include other instruction sources

External data files

It is created by a human

It needs to be built in a logical manner

It needs to be modular

It needs to be maintainable

It is only as good as the person who wrote it

Page 19: What you need to know to get started in Automation ...files.meetup.com/2625872/AutomationProgrammingForTestersV3.pdf · Veteran of the Software Testing Trenches Experience in software

Test Automation Programming It is NOT Record & Playback!

Just Shoot Me!!!

Page 20: What you need to know to get started in Automation ...files.meetup.com/2625872/AutomationProgrammingForTestersV3.pdf · Veteran of the Software Testing Trenches Experience in software

Programming for Test Automation It’s a different view and purpose for the program code. Creating ‘software’ to ‘test’ software

You need to understand basic programming methods.

You need to understand basic software design and construction methods.

You need to understand how to program for different types of technologies. GUI vs. Database vs. System vs. Web vs. Services vs. API

You need to understand how to program in different languages if needed. C#, Java, VBScript, Jscript, XML, SQL, etc.

Page 21: What you need to know to get started in Automation ...files.meetup.com/2625872/AutomationProgrammingForTestersV3.pdf · Veteran of the Software Testing Trenches Experience in software

Test Automation Programming Cont. You need to understand how to ‘hook’ the software under

test and interact with it, and at what level.

API, or Object, or Service, or Protocol, or Application code itself, etc.

You need to understand how your tool ‘interacts with’ the software under test, and what functions/methods you have available for use.

GUI Object ‘methods’ (functions)

Example: SwfWindow(“LoginForm").SwfEdit(“ID”).SET “Jim”

You need to understand how to “pick apart” the software and “drive it” programmatically.

Page 22: What you need to know to get started in Automation ...files.meetup.com/2625872/AutomationProgrammingForTestersV3.pdf · Veteran of the Software Testing Trenches Experience in software

Windows, Objects, API’s & Other Things For most GUI based software the User Interface is

comprised of “Windows” (Parent) & “Objects” (Children).

Objects can be Standard or Custom Class (tweaked by the developer).

Object types include: Push Buttons, Edit Fields, Radio Buttons, Check Boxes, Combo Boxes, Tree Views/List, etc.

For an Automation Programmer you need to understand what ‘object’ you are working with, how to work with it, and the different ways to work with it. A lot to know and remember. Not easy.

Page 23: What you need to know to get started in Automation ...files.meetup.com/2625872/AutomationProgrammingForTestersV3.pdf · Veteran of the Software Testing Trenches Experience in software

Windows, Objects, API’s & Other Things API’s, or Application Programming Interfaces, allow

automation to directly interact with the functionality in the program, or system

Multiple ways to interact: COM, DCOM, ODBC, Service Layer

Usually done locally on the test machine

Have to know what the interface is comprised of and how to hook into it.

COM – Component Object Model

ODBC – Open Database Connectivity

Page 24: What you need to know to get started in Automation ...files.meetup.com/2625872/AutomationProgrammingForTestersV3.pdf · Veteran of the Software Testing Trenches Experience in software

Windows, Objects, API’s & Other Things Protocols

Protocols are different layers of communication by programs. Sometimes you need to hook your automation to them to get things done.

An example is HTTP & web servers

Services Remotely running applications that can be accessed by

‘calling’ directly to them.

An example is WSDL & SOAP

Application Code Physically testing at the code level.

An example is xUnit & other test harnesses in code

Again… a lot to know! And you won’t learn it overnight.

Page 25: What you need to know to get started in Automation ...files.meetup.com/2625872/AutomationProgrammingForTestersV3.pdf · Veteran of the Software Testing Trenches Experience in software

Outside of the Comfort Zone Well then… where do I go to learn?

Depending on your learning mode you will need to start with basic programming concepts and a language.

Books, Whitepapers, Classes, and Google.

Learn constructs, syntax, and processes of the language.

Learn about modern software construction, especially the building blocks (i.e.; objects & their methods/properties).

Find a mentor who can help to guide you.

OJT is the reality of this type of work.

Page 26: What you need to know to get started in Automation ...files.meetup.com/2625872/AutomationProgrammingForTestersV3.pdf · Veteran of the Software Testing Trenches Experience in software

Outside of the Comfort Zone cont. I already know the basics, what next?

Start building “Utility Scripts” that will help you in test setup, data mining, and whatever else you need. Get some further practice and experience.

Look up the different “Frameworks” and study them. Push yourself to the next level.

Look into how you can expand into working with other tools. For example, a tool that has a command line interface.

Page 27: What you need to know to get started in Automation ...files.meetup.com/2625872/AutomationProgrammingForTestersV3.pdf · Veteran of the Software Testing Trenches Experience in software

Resources to Tap Into Books

Visual Basic for Testers (Mary Romero Sweeney)

Foundations of Programming (Karl Seguin)

Everyday Scripting with Ruby (Brian Marick)

The Pragmatic Programmer (Andrew Hunt & David Thomas)

Search Amazon.com !

Page 28: What you need to know to get started in Automation ...files.meetup.com/2625872/AutomationProgrammingForTestersV3.pdf · Veteran of the Software Testing Trenches Experience in software

Resources to Tap Into cont. Websites

The Scripting Guys - http://technet.microsoft.com/en-us/scriptcenter/dd901334

Software Test Scripting - http://www.compendiumdev.co.uk/essays/testscripting/testscripting.php

Guidelines for Scripting - http://www.psqtconference.com/2004east/tracks/Tuesday/GuidelinesforScriptingLanguagesPaper.pdf

Automated Testing Institute - http://www.automatedtestinginstitute.com/home/

Page 29: What you need to know to get started in Automation ...files.meetup.com/2625872/AutomationProgrammingForTestersV3.pdf · Veteran of the Software Testing Trenches Experience in software

Resources to Tap Into cont. Classes

ACC – Intro to Programming

Metro State – Intro to Programming for Visual Basic

Connected Testing – Scripting QTP

Touchstone Technology Training - Scripting QTP http://www.touchstonetechnologytraining.com/classes/

Online Classes

SkillSoft – www.skillsoft.com

Lynda.com – www.lynda.com

Others – just Google!

Page 30: What you need to know to get started in Automation ...files.meetup.com/2625872/AutomationProgrammingForTestersV3.pdf · Veteran of the Software Testing Trenches Experience in software

Summary Programming for Test Automation is not an easy thing to do.

You cannot learn it overnight. It takes time and effort.

Test Automation requires learning basic programming concepts and methods, but also more in-depth in other areas. It requires knowledge of basic software design.

Automation requires knowledge of both development and testing. You need to have good skills in both in order to succeed.

Developing automation scripts requires knowledge of other areas outside of the application itself. You will need to have a system wide view of what you are working with.

Page 31: What you need to know to get started in Automation ...files.meetup.com/2625872/AutomationProgrammingForTestersV3.pdf · Veteran of the Software Testing Trenches Experience in software

Q&A

Page 32: What you need to know to get started in Automation ...files.meetup.com/2625872/AutomationProgrammingForTestersV3.pdf · Veteran of the Software Testing Trenches Experience in software

Contact Info Jim Hazen

Company: (www.connectedtesting.com)

Company email: [email protected]

Home email: [email protected]

Page 33: What you need to know to get started in Automation ...files.meetup.com/2625872/AutomationProgrammingForTestersV3.pdf · Veteran of the Software Testing Trenches Experience in software

References 1) “How to Automate Testing: The Big Picture“, Keith Stobie & Mark Bergman,

1992.

2) “Software Test Automation”, Mark Fewster & Dorothy Graham, Addison-Wesley, 1999.

3) “Automated Software Testing”, Elfriede Dustin et al., Addison-Wesley, 1999.

4) “Implementing Automated Software Testing”, Elfriede Dustin et al., Addison-Wesley, 2009.

5) “Experiences of Test Automation”, Dorothy Graham & Mark Fewster, Addison-Wesley, 2012.

6) “Seven Steps to Test Automation Success”, Bret Pettichord, http://www.io.com/~wazmo/papers/seven_steps.html, 2001.

7) “Success with Test Automation”, Bret Pettichord, http://www.io.com/~wazmo/succpap.htm, 2001.

Page 34: What you need to know to get started in Automation ...files.meetup.com/2625872/AutomationProgrammingForTestersV3.pdf · Veteran of the Software Testing Trenches Experience in software

Thank you for attending this session.

Please fill out an evaluation form.