View
219
Download
0
Tags:
Embed Size (px)
Citation preview
Automated Software Testing
A Perspective
Article by Kerry ZallarArticle by Kerry Zallarof testingstuff.comof testingstuff.com
Presentation by Michael MillerPresentation by Michael Miller
Automated Testing
What is automated testing?
Why automate?
When and when not to.
Important facts about automation.
Training.
Questions?
What is automated testing?
Human tasks performed automatically
Types
Performance
Data Integrity
Functional
How?
Automated Test Suites
IBM Rational Test (SQABASIC)
MercurySoft WinRunner/Quicktest (C)
Other programmable testing environments (Perl, Shell, etc)
Automate throughout the lifecycle
Capture/PlaybackCapture/Playback
Pushbutton Click, “Text=OK”,””Pushbutton Click, “Text=OK”,””
Example
Server must report both Server must report both bad passwords, bad bad passwords, bad
usernames, and the absence usernames, and the absence of either or both, and of either or both, and allow entry for valid allow entry for valid
credentialscredentials
This gives a number of test cases, This gives a number of test cases, all of which can be automated, and all of which can be automated, and
run quicklyrun quickly
Automated Script‘‘Test for bad login credentialsTest for bad login credentialsEditBox Click,”Text=UID”,””EditBox Click,”Text=UID”,””InputKeys “MyBadLoginNameInputKeys “MyBadLoginNamePushbutton Click,”Text=login”,”” Pushbutton Click,”Text=login”,”” Browser NewPage,””,””Browser NewPage,””,””VerifyTableCell (“Text=Login Failed”, “Row=2;Col=2”)VerifyTableCell (“Text=Login Failed”, “Row=2;Col=2”)
‘‘Test for valid loginTest for valid loginPushbutton Click,”Return”Pushbutton Click,”Return”Browser NewPage,””,””Browser NewPage,””,””EditBox Click,”Text=UID”,””EditBox Click,”Text=UID”,””InputKeys “Testuser23”InputKeys “Testuser23”EditBox Click,”Text=Password”,””EditBox Click,”Text=Password”,””InputEncKeys ”13ad4c93d1f”InputEncKeys ”13ad4c93d1f”Pushbutton Click,”Text=login”,”” Pushbutton Click,”Text=login”,”” Browser NewPage,””,””Browser NewPage,””,””VerifyTableCell (“Text=Welcome TestUser 23”,”Row=2;Col=3”)VerifyTableCell (“Text=Welcome TestUser 23”,”Row=2;Col=3”)
Result
This test is:
Fast
Computer types faster than a person
It doesn’t make typos
Re-runnable any number of times.
Why?
FAST
Shorter development cycle
The computer seldom makes mistakes (But users sure do)
When
When a test is performed frequently
When precision is a must
When the machine can perform much faster than the tester
When Not To
When human vision is required
When the test does not answer a Yes/No question
When a test is too complex
Important Facts
Automation does not replace manual testing
Automating only at the end of development will not work
Automation must be planned like the software itself
Automation must be modularized
Important Facts
Test cases and test automation are created by different people
Analysts vs. QA Engineers
Automation is an investment
IBM Rational Robot = $3954
Training
Must know or learn a language, such as BASIC, or C
Must learn the fundamentals of automated testing
Must learn how to use a particular automation tool
??