the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
Module 4.pptxbsbsnsnsnsbsbbsjsjzbsbbsbsbsbs
1. Module 4
Automation testing: Basics, Significance,
Components, Process of Test Automation,
Strategies, Automated tests, Examples of test
automation, Test Automation maintainance,
Automation test frameworks-types, tools.
2. • Automation Testing or Test Automation is a software
testing technique that performs using special automated
testing software tools to execute a test case suite.
• The automation testing software can also enter test data
into the System Under Test, compare expected and actual
results and generate detailed test reports.
• Software Test Automation demands considerable
investments of money and resources
3. • Successive development cycles will require execution of same
test suite repeatedly. Using a test automation tool, it’s possible to
record this test suite and re-play it as required.
• Once the test suite is automated, no human intervention is
required.
• This improved ROI of Test Automation.
• The goal of Automation is to reduce the number of test cases to
be run manually and not to eliminate Manual Testing altogether.
4. Why Test Automation?
• Test Automation is the best way to increase the
effectiveness, test coverage, and execution speed in
software testing. Automated software testing is important
due to the following reasons:
• Manual Testing of all workflows, all fields, all negative
scenarios is time and money consuming
• It is difficult to test for multilingual sites manually
• Test Automation in software testing does not require
Human intervention. You can run automated test
unattended
• Test Automation increases the speed of test execution
• Automation helps increase Test Coverage
• Manual Testing can become boring and hence error-
prone.
5. Which Test Cases to Automate?
• Test cases to be automated can be selected using the
following criterion to increase the automation ROI
• High Risk – Business Critical test cases
• Test cases that are repeatedly executed
• Test Cases that are very tedious or difficult to
perform manually
• Test Cases which are time-consuming
• The following category of test cases are not suitable
for automation:
• Test Cases that are newly designed and not executed
manually at least once
• Test Cases for which the requirements are frequently
changing
• Test cases which are executed on an ad-hoc basis.
6. Automated Testing Process:
Following steps are followed in an
Automation Process
Step 1) Test Tool Selection
Step 2) Define scope of Automation
Step 3) Planning, Design and Development
Step 4) Test Execution
Step 5) Maintenance
7. Define the scope of Automation
The scope of automation is the area of your Application
Under Test which will be automated. Following points
help determine scope:
• The features that are important for the business
• Scenarios which have a large amount of data
• Common functionalities across applications
• Technical feasibility
• The extent to which business components are reused
• The complexity of test cases
• Ability to use the same test cases for cross-browser
testing
8. Significance of Automation in Testing
• Software testing is essentially an important part of the software
development life cycle (SDLC) and should be taken up to ensure
quality software.
• Earlier manual testing was the major mode of testing but with
advanced applications and connected devices in place, it
is essential to have Test Automation to ensure faster and quality
releases.
• Even smaller and mid-sized companies in their quest to have good
quality products continue to adopt test automation best practices to
deliver high-performing products to their clients.
• For enterprises, with automation in testing in place, there is a faster
feedback cycle and that brings faster validation at various phases in
product development.
9. Significance of Automation in Testing
• The other benefit of automation testing is the testing procedure
becomes automated, as the test scripts are run by the test
automation tools without much interference of QA.
• Test automation also helps enterprises to improve the
communication between DevOps, QA teams and product owners
who depend on the results of these automated tests as these results
are more reliable than the manual testing results.
• It is more important to note that automation testing is best suitable
for applications that need to be tested for various versions,
platforms, and operating systems.
• Test automation involves the usage of tests that are repeatable and
can be run many times to test various conditions and scenarios.
10. What are the Benefits of Automation Testing?
Qualitative Benefits of Automation in Testing
– Speeds up the testing cycle with automated runs
– Reduces test execution time effectively
– Increases test coverage on each testing cycle
– Ensures ease of test case maintenance
Quantitative Benefits of Automation in Testing
– Generates quicker ROI
– Reduces QA cycle times by up to 80%
– Lowers the overall QA costs up to 60%
– Improves organizational efficiency
– Ensures cost optimization
– Delivers faster time to market
– Helps improve the business bottom line
11. What are the Various Components of Automation Testing?
• Automated unit tests
• Automated web services tests
• Automated API tests
• Automated GUI tests
12. Automated unit tests:
These tests are primarily designed and crafted to test the
software code. These tests categorically search for script
errors, or if any bugs or any other issues within the written
code.
Automated web services tests:
These tests are useful to test the user interface part of the
web services. Protocols like SOAP and REST are used to
test a web service.
This sort of testing determines the XML request and
validates the response against the request sent which is
achieved by the web services testing.
13. Automated API tests:
• These tests allow the software to communicate
effectively with other software applications. These API
tests help to check the functionality and security of
underlying layers.
• In API Testing, instead of using standard user
inputs(keyboard) and outputs, you use software to
send calls to the API, get output, and note down the
system’s response.
14. Set-up of API Test environment
• API Testing is different than other software testing types as GUI is
not available, and yet you are required to setup initial environment
that invokes API with a required set of parameters and then finally
examines the test result.
• Hence, Setting up a testing environment for API automation
testing seems a little complex.
• Database and server should be configured as per the application
requirements.
• Once the installation is done, the API Function should be called to
check whether that API is working.
15. Automated GUI tests:
These tests focus on testing the graphical user interface of
the application under test.
It involves checking the screens with various controls like
menus, buttons, icons, and all types of toolbars, menu
bars dialogue boxes, and windows.
16. What is the Actual Process of Test Automation?
1. Evaluate to understand the need for automation based on
project type
2. Define automation goals and priorities
3. Plan automated testing strategy
4. Select the right automation tool & framework based
upon the project requirements
5. Decide on what test cases to automate
6. Develop good quality test data
7. Create automated tests more resistant to UI changes
8. Execute the tests for the test scripts developed
9. Test early and often with CI/CD pattern
10. Maintain the test scripts
17. Some of the Most commonly used Test Automation tools
are:
18. Selenium:
Selenium is one of the most popular test automation tool and is the
preferred tool for web automation testing for DevOps.
Selenium offers two parts of its software, Web driver and IDE
(Integrated Development Environment). Selenium automation
testing is also one of the most preferred automation testing in the
market these days.
Appium:
It is an open-source test automation framework that can be used with
native, hybrid and mobile web applications to test them.
It facilitates to make use of preferred test practices, frameworks, and
tools. It is preferred to automate any mobile app from any language
and any test framework.
Cucumber:
It is an Open source automation testing tool that revolves around
behavior-driven development.
19. Ranorex:
This is a unique test automation tool that can be used to test web
apps, desktop or mobile applications.
TestComplete:
This is the first automation testing tool that has AI with a visual
recognition engine that can test with or without scripts and the
tool can be used to test desktop, mobile, and web applications
extensively.
Microfocus UFT:
The Unified Functional testing tool (UFT Tool) is used in
regressive and functional test automation.
It also supports API and web services testing, continuous testing,
support for testing ERP and CRM applications.
20. Apache JMeter:
This is the most popular performance testing tool that perfectly
measures the performance of your software. It is built on java and
runs functional tests to measure the performance of web
applications.
Tosca:
This is a very effective testing tool that can be used for end-to-
end testing as it supports functional testing, load testing, risk-based
testing, test data management and also app testing.
22. What Does an Automation Tester Do?
• The QA automation tester and the automation test engineers are
the main people involved to achieve test automation initiatives.
They know how to automate for the successful roll-out of quality
products for businesses.
• The QA automation tester is responsible for designing and
writing test automation scripts as the first phase and they use
various types of test automation frameworks to achieve
successful test automation.
• They run test scripts to ensure all the scenarios are successfully
tested and they have a close association with the developers and
other QA analysts.
• They log bugs and issues in various test management tools such
that the developers work on these bugs and fix them.
• Once again automated regression testing is done to ensure the
new functionalities do not affect the functionalities of existing
features.
23. Framework for Automation
A framework is set of automation guidelines which help in
Maintaining consistency of Testing
• Improves test structuring
• Minimum usage of code
• Less Maintenance of code
• Improve re-usability
• Non Technical testers can be involved in code
• The training period of using the tool can be reduced
• Involves Data wherever appropriate
25. 1) Linear Automation Framework
The linear Automation framework is commonly used in the testing of
small applications. This framework is also called as a Record and
playback framework.
Pros: There is no need to write custom code, so expertise in test
automation is not necessary.
Cons: The data is hardcoded in the test script; hence, the test cases
cannot be re-run with multiple sets. You need to make some changes if
the data is altered.
26. 2) Modular Driven Framework
In this Framework, the tester can create test scripts module wise by
breaking down the whole application into smaller modules as per the
client requirements and create test scripts individually.
Pros: Modular driven framework ensures the division of scripts that
leads to easier maintenance and scalability. You can write independent
test scripts.
Cons: The modular driven framework requires additional time in
analyzing the test cases and identifying reusable flows.
27. 3) Behavior Driven Development Framework
Behavior Driven Development framework is to create a platform,
which allows every person, like Developers, Testers, business analyst,
etc., to participate actively. It also increases collaboration between the
tester and the developers on your project.
Pros: You can use non-technical, natural language to create test
specifications on this behavior-driven testing.
Cons: To work with this framework, sufficient technical skills as well
as prior experience in Test driven development is required.
28. 4) Data-driven Testing Framework
Generally, Test Data is read from the external files like Excel Files, Text
Files, CSV Files, ODBC Sources, DAO Objects and they are loaded into
the variables inside the Test Script. The data-driven framework allows us
to create test automation scripts by passing different sets of test data.
Pros: It reduces the number of scripts required. Hence, multiple scenarios
can be tested in less code.
Cons: You will need a highly experienced tester who should be proficient
in various programming languages to completely utilize the design of
this framework.
29. 5) The Keyword-Driven Testing Framework
The keyword-Driven Testing framework is also known as table-driven
testing. This framework is suitable only for small projects or
applications. The automation test scripts performed are based on the
keywords specified in the excel sheet of the project.
Pros: A single keyword can be used across multiple test scripts, so the
code is reusable.
Cons: The initial cost of setting up the framework is high, and it is
time-consuming & complex.
30. 6) The Hybrid test Automation Framework
Hybrid Framework is used to combine the benefits of Keyword Driven
and Data-Driven frameworks.
Pros: This type leverages the advantages of all kinds of related
frameworks.
Cons: Tests are fully scripted in a Hybrid Testing Framework thus
increases the automation effort.
31. Test Automation Strategy
A cost-effective test automation strategy with
a result-oriented approach is always a key to
success in automation testing.
Having a good test automation strategy will
help businesses keep pace with the market and
avoid any major technology failures.
33. Automation Feasibility Analysis
In this step, you check the feasibility of automation. This
includes shortlisting the relevant test cases for automation
and selecting the right test tool that fits your requirement.
Test Strategy
Here, you select the test automation framework. You have
multiple options to choose from here. For example, linear
test automation framework, data-driven framework, key-
word driven framework etc.
Environment Set Up
In this phase, you set up the testing environment and
acquire the required hardware and software to execute the
automated test cases.
34. Test Script Development
In this step, you start creating the automation test scripts.
Make sure that the scripts that you have written are
reusable, well-structured and well documented.
Test Case Execution
In this step, you execute the test cases that you have
written previously.
Test Result Generation and Analysis
In this last phase of test automation life cycle, you analyze
the output of test cases and share the reports with
stakeholders
35. Building Blocks of Test
Automation Strategy
The prime objective of any
software project is to get a high-
quality output while reducing
the cost and the time required
for completing the project. A
good test automation strategy
helps companies achieve that.
Below is the list of building
blocks of automation test
strategy:
36. Scope of Automation
Defining a project scope includes outlining timelines and milestones
for each sprint in the project. Two most important things here are:
Shortlisting the test cases to automate
• One of the best models that can help you with that task is Mike
Cohn’s “Test Automation Pyramid”. According to the pyramid, unit
tests are quick to write.
• They have the highest ROI(Return of Investment) and should ideally
form the backbone of your automation testing strategy. Regression
test should be your next priority.
• Next, you need to check functionality and other quality
characteristics with functional testing.
• Then comes UI(User Interface) tests. They are expensive, require
heavy maintenance, and return the highest number of false
positives/negatives.
37. Selecting the right test automation tool
• You need to select one out of the several test automation tools
available in the market. That can be a difficult task.
• In order to select the tool that fits best for your project, first, you
need to understand your project requirements thoroughly.
• Identify your budget. Select the tools that fit your requirement and
within your budget. Then you can shortlist based on other
parameters such as licensing cost of the tool, maintenance cost,
training and support, tools extensibility, performance and stability
38. Test Automation Environment
• Setting up your test environment is another building block of test
automation strategy. You can establish your automation test
environment
• First by identifying the requirements of the test environment
• Then by acquiring the required tools with their licenses.
• You can also consider the data that is part of test cases like:
• Where to store the test data?
• Should the data be masked?
• What happens to the data after testing?
• Test automation is like a deterministic game, where, known inputs
will produce predictable outputs. A stable and predictable test
environment is a prerequisite for successful test automation.
39. Test Automation Approach
When choosing a test automation approach, there are three areas to
consider: Processes, Technology, and Roles
Process
Your automation roll out must always be a well-defined and
structural process.
Technology
Here you figure out everything about the applications that you want
to automate. Figure out which technology they are based on and
whether your test automation platform supports these technologies.
40. Risk Analyses
As we know risk analysis is an essential part of project planning in
general, but it is important to consider it in the test automation as
well. By considering a few viable parameters you can create a risk
document. The parameters would be something like:
Description – A crisp explanation of what the risk is?
Risk Level – What will happen if the risk becomes a reality? How
hard will it hit the project?
Probability – Likeness of the risk turning to reality
Mitigation – What actions can be taken to resolve the risk?
Cost Estimate – What would be the cost of mitigating the risk?
One important thing here is that the risk document is
dynamic. Risks will be added and removed to the list as the project
evolves.
41. Test Execution and Management
• A test automation strategy should also define the process of
execution and management of test cases. Text execution should
outline things like day-to-day tasks and procedures related to
automation. Consider the below suggestions when executing test
cases:
• Before you add any automated test cases to the regression suite,
run and verify multiple times to ensure they run as expected
• Define a set of best practices that make test cases resistant to
changes in the system which is being automated
• Use pipeline orchestrator (Jenkins, TFS, Bamboo, TeamCity, etc.)
or a scheduling tool to execute test cases in parallel
• Assign status ‘Pass’ or ‘Fail’ to the test case after execution. , this
status is assigned to the test cases automatically as per defined
success criteria
• If the status is ‘Fail’, perform failure analysis
42. Failure Analysis and Reporting Results
• Having a plan for how to analyze the failed test cases and resolve
them is a critical part of test automation strategy.
• Often time is taken to notify the failure, analyze it and resolve it
much longer than you anticipate.
• Having a well-defined process for this can save a lot of time and
effort for the development team.
• Outline how different errors should be handled. These errors can
be:
• Issues with test environment – Inform DevOps team about it
• A bug in an application under test – Flaf a bug for the
development team
• A bug in automation scripts – Create a task for the testing team
43. Myths about Automated Testing
Time to bust some myths surrounding test automation-
100% automation is possible – Barring a few very specific applications,
100% automation is just not possible. Exploratory test cases, usability test
cases are some of the examples of test cases that can’t be automated.
Automation will eat the manual testing jobs – It is true that with the
advent and rise of automation testing and different tools, there is a shift to
the requirement of full-stack or dual role testers – who can work on both
manual and automation testing. But automation will never be able to
completely eliminate the need for manual testing.
Developer makes better automation testers – While a developer might
have a slight edge on the coding part but still a tester will be able to think
from a testing perspective.
Automation is expensive – When done correctly, automation can reduce
the overall testing effort and resource requirement. Thus saving the
project cost in the long run.