Module 5
Module 5
Module Number: 05
Version Code:ST1
Released Date:31-Jan-2019 1
Test Automation
AIM:
To familiarise students about the automation of Software Testing.
2
Test Automation
Objectives:
The Objectives of this module are to understand:
• The key concepts of software test automation.
• The design and architecture for automation.
• Requirements for a test tool.
• The challenges in automation.
• Test metrics and measurements.
• The progress and productivity metrics.
3
Test Automation
Outcomes:
At the end of this module, you are expected to:
• Explain the need for automation.
• Describe the design and architecture for automation.
• Explain how to deal with challenges in automation.
• Elaborate Test metrics and measurements.
• Describe about the progress and productivity metrics.
4
Test Automation
Content
• Software Test Automation
• Design and architecture for automation
• Requirements for a test tool
• Challenges in automation
• Test metrics and measurements.
• Progress and productivity metrics
5
Test Automation
6
Test Automation
7
Test Automation
8
Test Automation
9
Test Automation
• Manual Testing of all workflows, all fields, all negative scenarios is time and money consuming.
10
Test Automation
11
Test Automation
12
Test Automation
13
Test Automation
The scope of automation is the area of your Application Under Test which will be automated.
14
Test Automation
15
Test Automation
During this phase, you create Automation strategy and plan, which contains the following details:
16
Test Automation
17
Test Automation
• Automation Scripts are executed during this phase. The scripts need input test data before
there are set to run. Once, executed they provide detailed test reports.
• Execution can be performed using the automation tool directly or through the Test
Management tool which will invoke the automation tool.
18
Test Automation
19
Test Automation
20
Test Automation
21
Test Automation
22
Test Automation
23
Test Automation
24
Test Automation
a. 1
b. 2
c. 4
d. 5
Answer: 5
25
Test Automation
26
Test Automation
27
Test Automation
28
Test Automation
29
Test Automation
30
Test Automation
31
Test Automation
32
Test Automation
34
Test Automation
35
Test Automation
36
Test Automation
37
Test Automation
Scope of automation
• Automation is the process of evaluating the AUT (Application Under Test) against the specification
with the help of a tool.
Depending on the nature of testing, there are two main branches under automation.
• Functional testing with automation.
• Performance testing with automation.
38
Test Automation
Scope of automation
• Functional Testing with the help of Automation
Functional automated testing has emerged as a key area in most of the testing processes.
The main area, where the functional testing tools are used is for regression test case
execution.
Mostly in the agile scrum methodology where frequent releases are happening, it is almost
impossible to execute all the regression test cases manually within short span of time.
39
Test Automation
Scope of automation
Automation gives a high ROI (Return of Investment) in this area since, it is a one time effort for
generating the scripts.
Maintenance to the existing scripts will be considerably less, if the automation follows a good
framework which exactly suits the nature of application.
It is advisable to keep at least 60 to 70% of regression cases to be automated for being adherent to
the timelines of test case execution.
40
Test Automation
Scope of automation
Performance Testing with the help of Automation
• Performance testing is the process of evaluating the application performance which is being
a critical requirement of every application nowadays.
• There are different tools used across organisations for evaluating application performance.
• There are different divisions under performance testing based on the nature of testing.
41
Test Automation
Scope of automation
Load and Stress testing
• Load testing is performed to confirm that application can withstand the maximum load which
is mentioned in the SRS.
• Here, the application will be tested with the specified load without overloading the application.
• But in stress testing, the intention is to find out the maximum load the application can
accommodate.
• Application will be tested with more load than the specified limit in order to find out the break
point.
42
Test Automation
Scope of automation
• For load and stress testing, large number of concurrent users is needed and multiple computers are
required.
• In manual testing it is difficult and almost impossible to run the severe load for several days to identify
problems in the application.
• While using automation, the testing software (tool) monitors the CPU and memory usage of each test
computer.
• The tool generates artificial loads by creating virtual users and which will produce a guaranteed test
accuracy.
• The tools can generate number of virtual users on a single computer.
• Automation helps us to find out defects as we can run the test using multiple users, multiple environments
on several days.
43
Test Automation
Scope of automation
• Automation is an effective means of eliminating/reducing manual effort during regression and
functional test case execution.
• Also, the chances of defect escape will be reduced considerably, since human mistakes will not
occur once the script is fully developed.
• Hence, the automation is more economical considering the fact of time and quality.
44
Test Automation
a. True
b. False
Answer: True
45
Test Automation
46
Test Automation
47
Test Automation
48
Test Automation
49
Test Automation
50
Test Automation
51
Test Automation
52
Test Automation
53
Test Automation
54
Test Automation
55
Test Automation
56
Test Automation
57
Test Automation
58
Test Automation
59
Test Automation
60
Test Automation
61
Test Automation
62
Test Automation
63
Test Automation
a. Only i
b. Only ii
c. Only i and ii
d. All i, ii and iii
Challenges in automation
Here, we have listed out some of the most common challenges that a team faces, as they pursue
automation efforts—and also how to overcome these challenges.
1. Effective Team Collaboration
2. Deciding on the best testing approach
3. Evaluating and choosing good tools
4. Training or acquiring skilled testers
5. Significant capital investment
65
Test Automation
Challenges in automation
1. Effective Team Collaboration:
• Collaboration is a challenge for any product development group—developers, test automation
engineers, and conventional testers alike.
• The problem is more acute with test automation because, it requires considerably more
planning, foresight, communication, and collaboration, as it fully depends on historical testing
data, tester experience, and at least one proof-of-concept.
• Testers need to work well with developers, customers, and one another to get all these pieces
together.
66
Test Automation
Challenges in automation
1. Effective Team Collaboration:
• How to overcome it?
• Since, testers will be central in communicating the value of automation testing to senior
management, each automation tester should be in close contact with manual testers, business
stakeholders, developers, and system architects.
• To be successful, it is vital that most of the team commits to active and continuous
involvement because, of all the moving pieces coming in from the different departments. You
will also need management buy-in prior to automating your tests.
67
Test Automation
Challenges in automation
2. Deciding on the best testing approach:
• When possible, it is always best to prioritise meeting this challenge before buying new test
automation tools. Think carefully on this one. You might acquire good tools—but which
tests should you automate first, which one should you leave as manual tests, and how will
you go about doing it all? The tools will not give you insight into what your team should
automate.
• The tools may also be focused on one area when you need help with another. Beware that
you will not be able to automate all of your test cases, particularly in areas such as
compatibility or recovery.
68
Test Automation
Challenges in automation
2. Deciding on the best testing approach:
How to overcome it?
• Which test cases are important to you? Before you begin to think about test
automation, it’s important to define a set of criteria that each test case must satisfy to
be a candidate for automatisation.
• It is very important to focus on areas that contain unknowns that can mean higher risk
to product success. It is also important to give serious attention to complex functional
areas that are especially useful or interesting to customers.
69
Test Automation
Challenges in automation
2. Deciding on the best testing approach:
How to overcome it?
• Risk-focused test automation ascribes a higher priority to testing the elements that are
most likely to fail—and hold the potential for the most serious negative consequences in
the event of a failure in production.
As you assess the level of risk, it is critical to keep the following in mind:
• Financial impact of a potential failure.
• Probability of failure for each vulnerability (get developer input on these).
• Service-level agreements with clients and customers.
• Human and equipment safety issues.
70
Test Automation
Challenges in automation
3. Evaluating and choosing good tools:
• Many record and play testing tools are available, all trying to alleviate the same problem
of automating manual tests, but have proven to be harmful to team's productivity levels.
• This makes it difficult to sift through the chaff and find tools that will actually improve
software testing and meet real needs.
• It is important to steer clear of hype, do sufficient research, and carefully evaluate
fact-based proposals of reputable tool vendors.
71
Test Automation
Challenges in automation
3. Evaluating and choosing good tools:
• Tool evaluation can seem unachievable for various reasons:
• Lack of expertise needed to make the most of the capabilities of a specific tool.
• Indefinite knowledge on whether a tool exists to meet specific needs.
• Misconceptions lead to desire for a tool that is not available.
• A favorite tool does not seem to provide full test coverage.
• Tool costs exceed the team budget.
• The challenge of choosing good automation tools is a serious problem since, according to
the 2018 Gemini World Quality Report.
72
Test Automation
Challenges in automation
3. Evaluating and choosing good tools
• How to overcome it?
• Though it requires effort from the most of the team, a good assessment begins with
clearly outlining a set of tool requirements criteria.
• These definitions should correspond well with user acceptance criteria for each of
your products, and also reflect the input from professionals who have considerable
experience in using the tools. If they are not on your team, you may be able to find
these experts at conferences or smaller-scale networking events, making it worth
investing in sending your teams to them.
73
Test Automation
Challenges in automation
3. Evaluating and choosing good tools:
• How to overcome it?
• Free webinars are often hosted by product vendors to demo their offerings without the
pressure of being in a sales pipeline.
• Encourage your testing team to register to attend these webinars live, as the live Q&A
portion can be very valuable to take part in.
• If the tool that your team wants is beyond the reach of your budget, it may be worth the
effort to prepare a cost-benefit analysis and make your case to management.
• Demonstrate how implementing this tool will minimise risk and improve release quality,
using a pilot scenario that scales.
74
Test Automation
Challenges in automation
4. Training or acquiring skilled testers:
• It is a misconception that test automation can be easily done by any tester.
• Likewise, many falsely believe that any developer can automate tests.
• Focusing, designing, configuring, and implementing test automation requires specific
skills and time to build experience.
75
Test Automation
Challenges in automation
4. Training or acquiring skilled testers:
• How to overcome it?
• When filling this role, you need to look for a specific skill set beyond technical chops.
• Testers sit at the intersection between your developers, managers, and customers, so
having the ability to articulate ideas from one group to another is a must.
• Being in the tech field, testers must be willing to stay up to date with the latest
technologies and development methodologies to understand what the development team
may be doing or moving towards.
• At the same time, they must also understand how to keep a holistic view of what the
software in development is trying to achieve from a business perspective, and keep test
cases relevant to those goals. 76
Test Automation
Challenges in automation
5. Significant capital investment :
• In nearly all cases, the initial phase of test automation comes with some costs, since it
requires analysis, design, and planning for the implementation.
• You will need to account for all licensing and operating costs—including hardware and
software.
• Even if the choice is made to go with free or low-cost open-source automation tools, the time
spent on training and maintenance can have significant costs in terms of employee focus.
77
Test Automation
Challenges in automation
5. Significant capital investment :
• How to overcome it?
• Bite the bullet and then plan it out.
• Automating is not a movement that should be approached haphazardly. When done
properly, the effort and cost can pay steady dividends well into the future.
• Test automation can deliver significant gains in quality, accuracy, and productivity.
• The business case can be built solidly when the team comes to realise that preventing all
the negative impact and cost of a single major defect in production can directly
compensate for all of the tangible and intangible costs of pursuing test automation.
78
Test Automation
a. Only i
b. Only ii
c. Only i and ii
d. All i, ii and iii
80
Test Automation
81
Test Automation
82
Test Automation
Measure
Metrics
Km/hr m/s
83
Test Automation
84
Test Automation
85
Test Automation
86
Test Automation
87
Test Automation
88
Test Automation
89
Test Automation
90
Examples
• 1. Number of test cases
• 2. Number of passed, failed, and blocked test cases.
• 3. Total number of defects and critical issues reported, accepted,
rejected, and deferred.
• 4. Number of planned and actual test hours.
• 5. Number of bugs discovered after shipping.
• 6. Number of critical issues reported
• 7. Number of defects accepted.
• 8. Number of defects rejected
• 9. Number of defects deferred.
91
Test Automation
92
Exaamples
93
94
95
96
Test Automation
Project metrics:
• These are metrics that pertain to Project Quality.
• They are used to quantify defects, cost, schedule, productivity and estimation of various project
resources and deliverables.
Example:
• Schedule: Activities, Milestones, Reviews, Commitments, and Completion dates.
• Risk: Schedule, Cost, Resources, and Deliverables.
• Quality: Issues, defects and rework.
• Resource: Response times, Capacity / load , Forecast / Actual Usage.
97
Test Automation
Productivity metrics
• A quality metric should be a predictor of product quality.
• Classes of product metrics:
• Static metrics:
• Are collected by measurements made of the system representations.
• Help assess complexity, understandability and maintainability.
• Dynamic metrics:
• Dynamic metrics which are collected by measurements made of a program in execution.
• Dynamic metrics help assess efficiency and reliability.
98
Test Automation
Productivity metrics
• Static metrics:
• Have an indirect relationship with quality attributes.
• You need to try and derive a relationship between these metrics and properties such as
complexity, understandability and maintainability.
• Dynamic metrics:
• They are closely related to software quality attributes.
• It is relatively easy to measure the response time of a system (performance attribute) or
the number of failures (reliability attribute).
99
Test Automation
a. Only i
b. Only ii
c. Only i and ii
d. All i, ii and iii
Summary
• Project Metrics are used to quantify defects, cost, schedule, productivity and estimation of various
project resources and deliverables.
• Manual Testing is performed by a human sitting in front of a computer carefully executing the test
steps.
• The automation software can also enter test data into the System Under Test, compare expected and
actual results and generate detailed test reports.
• The goal of Automation is to reduce the number of test cases to be run manually and not to eliminate
Manual Testing altogether.
• Performance testing is the process of evaluating the application performance which is being a critical
requirement of every application nowadays. Performance testing is almost impossible by manual
means. 101
Test Automation
Assignment
1. What skills does every software tester should have?
2. Present a real life scenario on scope of automation.
3. Case study on the design and architecture for automation.
4. Discuss the steps to select the right test automation tool for your project in detail.
5. Discuss the most common challenges that teams face as they pursue automation efforts and also how
to overcome these challenges in detail.
6. Explain software test metrics in detail with proper diagram.
7. Give a comparative study on measurement vs. Metrics with proper diagram.
8. Discuss metrics life cycle in detail.
9. Discuss the types of manual test metrics in detail.
10. Discuss project and productivity metrics in detail. 102
Test Automation
Document Links
Design and architecture http://softwaretestingfundamentals.com/sof This link explains about design and
for automation tware-testing-basics architecture for automation.
103
Test Automation
Test metrics and https://www.softwaretestinghelp.com/soft This link will explains Test metrics and
measurements ware-test-metrics-and-measurements/ measurements.
104
Test Automation
105
Test Automation
Video Links
Topics URL Notes
Software test This video explains about
https://www.youtube.com/watch?v=RbSlW8jZFe8
automation Software Test Automation.
Skill needed for This video explains about the skill
https://www.youtube.com/watch?v=0zXs6EXccvo
automation needed for automation.
Scope of This video describes the scope of
https://www.youtube.com/watch?v=kv-JZAbRess
automation automation.
Design and
This video is about Design and
architecture for https://www.youtube.com/watch?v=y30Rz-w1fPU
architecture for automation.
automation
10
6
Test Automation
E-Book Links
Topics URL
Srinivasan Desikan and
Gopalaswamy Ramesh, https://www.oreilly.com/library/view/software-testing-principles/978
“Software Testing – 8177581218/xhtml/chapter010.xhtml#ch10.1
Principles and Practices”,
Pearson Education, 2006
Naresh Chauhan, Software
https://access.redhat.com/documentation/en-us/red_hat_enterprise_l
Testing Principle and
inux/7/html/storage_administration_guide/index
Practices, Oxford
University Press.
Ron Patton, “Software
https://shekharsk.files.wordpress.com/2016/01/ron-patton-software-t
Testing”, Second Edition,
esting.pdf
Sams Publishing, Pearson
Education, 2007.
107