Learn through Experience -- We differentiate our training and development program by delivering Role-Based training instead of Product-based training. Ultimately, our goal is to deliver the best IT Training to our clients.
In this training, attendees learn:
Introduction to Automation
• What is automation
• Advantages of automation & Disadvantages of automation
• Different types of Automation Tools
• What to automate in projects
• When to start automation. Scope for automation testing in projects
• About open-source automation tools
Introduction to Selenium
• What is selenium
• Why selenium
• Advantage and Disadvantages of selenium
Selenium components
• Selenium IDE
• Selenium RC
• Selenium WebDriver
• Selenium Grid
Selenium IDE
• Introduction to IDE
• IDE Installation
• Installation and uses of Firepath, Firebug & Debug bar
• Property & value of elements
• Selenium commands
• Assertions & Verification
• Running, pausing and debugging script
• Disadvantages of selenium IDE
• How to convert selenium IDE Scripts into other languages
Locators
• Tools to identify elements/objects
• Firebug
• IE Developer tools
• Google Chrome Developer tools
• Locating elements by ID
• Finding elements by name
• Finding elements by link text
• Finding elements by XPath
• Finding Elements by using CSS
• Summary
Selenium RC
• What is selenium RC
• Advantages of RC, Architecture
• What is Eclipse/IntelliJ, Selenium RC configure with Eclipse/IntelliJ
• Creating, running & debugging RC scripts
Java Concepts
• Introduction to OOPs concepts and Java
• Installation: Java, Eclipse/IntelliJ, selenium, TestNg/JUnit
• operators in java
• Data types in java
• Conditional statements in java
• Looping statements in java
• Output statements in java
• Classes & Objects
• Collection Framework
• Regular Expressions
• Exception Handling
• Packages, Access Specifiers /Modifiers
• String handling
• Log4J for logging
Selenium Web Driver with Java
• Introduction to WebDriver
• Advantages
• Different between RC and WebDriver
• Selenium WebDriver- commands
• Generate scripts in Eclipse/IntelliJ. Run Test Scripts.
• Debugging Test Script
• Database Connections
• Assertions, validations
• Working with Excel
• Pass the data from Excel
• Working with multiple browser
• Window Handling, Alert/confirm & Popup Handling
• Mouse events
• Wait mechanism
• Rich Web Handling: Calendar handing, Auto suggest, Ajax, browser forward/back navigation, keyboard events, certificate handling, event listeners
TestNg/JUnit Framework
• What is TestNg/JUnit
• Integrate the Selenium Scripts and Run from TestNg/JUnit
• Reporting Results and Analysis
• Run Scripts from multiple programs
• Parallel running using TestNg/JUnit
Automation Framework development in Agile testing
• Introduction to Frame W
3. 3
What is automated software testing?
A process which covers:
the use of software to control the
execution of tests
the comparison of actual outcomes to
predicted outcomes
the setting up of test preconditions
other test control and test reporting
functions.
5. 5
Why automated testing?
A time savings translates directly into cost
savings
Improves testing productivity
Improves accuracy
Increases test coverage
Does what manual testing cannot do
6. 6
Effort and Cost
Let’s assume 6 test cases
Effort required to run all 6 manually => 10 min
Effort required to write unit tests for all 6 cases => 10 min
Effort required to run unit tests for all 6 cases => < 1 min
Number of testing iterations => 5
Total manual testing time => 50 min
Total unit testing time => 10 min
Release Manual Test Auto Test
Manual Test
Cumulative
1 10 10 10
2 10 0 20
3 10 0 30
4 10 0 40
5 10 0 50
7. 7
Automated vs. Manual testing
Not all tests can be automated and
most times is difficult to decide what
to automate and what to manually
test.
8. Advantages
8
Automated Testing Manual Testing
• Need to run a set of tests
repeatedly
• Test cases have to be run a
small number of times
• Helps performing
"compatibility testing" (on
different configurations and
platforms)
• Allows the tester to perform
more specific tests
•Long term costs are reduced • Short term testing costs are
reduced
• Possible to run regressions on a
code that is continuously
changing and in shorter time
• The more time tester spends
testing a module the grater
chance to find real bugs
9. 9
Disadvantages & other factors
Automated Testing Manual Testing
• It's more expensive to
automate (bigger initial
investments)
• Manual tests can be
very time consuming
• You cannot automate
everything, some tests still
have to be done
manually
• For every release you
must rerun the same set
of tests which can be
tiresome
Other Factors
• The performance of your test tools
• The knowledge level of your testing team
• The continuous growth of software to be
tested
10. 10
Common types of automated
testing methods
Monkey testing
Capture / playback
Code-based (Unit) testing
Intelligent test automation
11. 11
Monkey testing
Randomly selecting inputs from a large
range of values and monitoring if
exceptions are thrown.
For example, a monkey test can enter
random strings into text boxes to ensure
handling of all possible user input.
It applies not only for GUI or WEB testing,
but also for Unit testing.
12. Tools example
Monkey – Android testing tools.
The simplest way to use the monkey
is with the following command, which will
launch the application and send 500
pseudo-random events to it.
$ adb shell monkey -v -p
your.package.name 500
12
13. 13
Capture / playback
It’s a set of software programs that capture
user inputs and stores it into a script for later
replay.
+ Repeated testing can be performed quickly.
+ Does not require programming skills.
- When the GUI changes, input sequences
previously recorded may no longer be valid.
- Difficult to determine location of bugs.
14. Tools example
14
Autohotkey - Free keyboard macro program.
Supports hotkeys for keyboard, mouse.
15. 15
Code-based (Unit) testing
Individual units of source code are tested to
determine if they fit for use.
Ideally, each test case is independent from
the others
+ Bugs can be found in early development
stage
+ Easy to test boundary cases
- Not effective for the integrated system
testing
17. 17
Random
Input values generated randomly
Run with generated inputs
User checks output values (pass/fail)
and saves them for later automatic
checking (Oracle).
18. 18
Genetic
This methods approach is to combine JML (JAVA
model language) and genetic algorithms. JUnit is
used as a test execution platform.
19. Tools examples
Parasoft Jtest is an
automated Java
testing and static
code analysis
product
19
TestGen is a collection of open-source
tools that automatically generates unit
test cases.
20. 20
Intelligent test automation
A model-based method for generating tests from
a description of an application’s behavior (UML)
+ Models are simple to modify, so model-based
tests are economical to maintain over the life of
a project.
- Most of these methods are researched only
theoretically.
22. 22
Automated testing framework A framework is an integrated system
that sets the rules of automation of a
specific product.
This system integrates the function
libraries, test data sources, object
details and various reusable modules.
The framework provides the basis of test
automation and simplifies the
automation effort.
23. Common types of frameworks
Data-driven testing
Keyword-driven testing
Hybrid testing
23
24. 24
Data-driven testing
Data-focused automation
User defines just data sets to run tests with
Data is defined in external data source and
de-coupled from script
Good fit for a single application testing,
featuring multi-environment, big datasets,
and rarely changing Test Cases
+ -
Good usability and re-usability
Quality and coverage strongly depends on the
automation skills of implementing person
Good test flow coverage Continuous maintenance issues due to a big
amount of the code
Multi-environment support Manual validation is required
26. 26
Keyword-driven testing
Good fit for a multi-application testing
featuring multi-environment, big datasets, and
a big number of short and straight Test Cases
Users de-compose test cases into reusable
action keywords
Non-coders are able to author automated test
cases with action keywords
+ -
Test development doesn’t
require programming skills
Due to keywords limit doesn’t allow
covering very complicated Test Cases
Good test flow coverage Meta-language specific training is required
for staff
Compact code Manual validation is required
28. Hybrid testing
28
Combines the best of data-driven and
keyword-driven testing:
User defines data sets to run tests with
User also defines flow control through action
keywords
Data is separated from script and stored in external
data source with action keywords
+ -
Test Plan / Test Scenario creation doesn’t
require programming or training on the
Testing Tool Requires initial investment for
design and implementation
Compact code and scalable architecture of the framework
Built-in strict validation
29. 29
Framework components
Test generation (data and script generators).Tools might create
specialized data such as randomized email messages, or
populate databases etc.
System configuration. Tools might preserve or reproduce system
parameters.
Test execution. Tools might operate the software itself, either
simulating a user working through the GUI and using an
alternative testable interface.
Oracles. An oracle is any mechanism by which we detect
failure or success. Tools might automatically detect certain
kinds of error conditions in a product.
Activity recording & coverage analysis. Tools might watch
testing as it happens and retrospectively report what was and
was not tested.
Test management. Tools might record test results, organize test
ideas or metrics.
31. Common functional automated test tools
Tool + -
IBM /
Rational
Functional
Tester (RFT)
•Built as Eclipse plug-in with full
IDE, Java support and source
management
•Supports Web-based
applications, .Net, Java, Siebel,
SAP®, PowerBuilder, AJAX, Adobe
Flex, Adobe PDF documents
•Full GUI Object Map repository
•License cost
HP /
Mercury
Quick Test
Pro (QTP)
•Supports Web 2.0, GWT, Dojo,
YUI, Silverlight, Flex, Ajax, JAVA, .NET
applications
•Full GUI Object Map repository
•Seamless integration with
QualityCenter
•No IDE
(changing in
release 10)
•License cost
•VisualBasic
scripting is limited
Selenium
RC & IDE
•Good browser support
•Good language support (JAVA,
Ruby, C#)
•Can be easily extended as JUnit
suite
•Open-source (no license cost)
•No GUI Object
repository
•Only web-based
application support
•Tool support is
limited
31
33. 33
Summary
Automated testing improves productivity,
accuracy, increases test coverage, saves
time and cost
Need to decide what to automate and
what to manually test
The framework provides the basis of test
automation and simplifies the automation
effort.
34. 34
More information
http://opuntia.cs.utep.edu/utjml/utest.html
http://www.ibm.com/developerworks/rational/library/591.html
http://www.satisfice.com/presentations/agileauto.pdf
http://automation-beyond.com/2009/05/30/test-automation-practices-
recordplayback/
http://en.wikipedia.org/wiki/Test_automation
36. QQuueessttiioonn ??????
36
What is the benefit of automated testing?
What are the common types of
automated testing methods?
What are the common types of
frameworks?
What components come to framework?
What are the examples of automated
testing tools?