0% found this document useful (0 votes)
15 views10 pages

L18 - Automation Testing

Automation testing utilizes automated tools and frameworks to execute test cases, improving efficiency and consistency compared to manual testing. It allows for faster execution of lengthy test cases, reduces human error, and can simulate thousands of users for web applications. The document outlines various types of automation testing, frameworks, and a step-by-step process for implementing automation in software testing.

Uploaded by

Akansh Saini
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views10 pages

L18 - Automation Testing

Automation testing utilizes automated tools and frameworks to execute test cases, improving efficiency and consistency compared to manual testing. It allows for faster execution of lengthy test cases, reduces human error, and can simulate thousands of users for web applications. The document outlines various types of automation testing, frameworks, and a step-by-step process for implementing automation in software testing.

Uploaded by

Akansh Saini
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Amity School of Engineering & Technology

Amity School of Engineering & Technology


B.Tech. IT – 7th Sem.
Software Testing and Quality Assurance
Module 5: L18– Automation Testing
Dr. Ritu Punhani

1
Automation Testing Amity School of Engineering & Technology

Automation testing is software testing that uses specific


automated testing tools and frameworks to execute the
test cases. In manual testing where a human tester
manually follows the steps, automation testing
automates the steps by using automation testing tools
and frameworks.
Automation testing uses open source or paid testing
tools to test software applications efficiently, quickly
and without human intervention.The advantages of
automation testing is one can execute thousands of
variety, lengthy test cases and few test conditions 2
Amity School of Engineering & Technology

Why do we need Automation


• We can progress testing faster in Automation Testing than manual testing
• Testing?
We can ensure consistent test execution in automation because there won’t
be any human errors
• Automating frequently executed test cases and test cases which are very
lengthy saves much time
• To test web applications we need thousands of users, it will be very difficult
to test manually so here automation plays a major role which can create
hundreds , thousands of virtual users
• By implementing automation there will be fewer people required compared
to manual testing which saves the spending cost for the organization
• The reusability of automation test scripts has the biggest advantage by just
changing the test scripts according to the test condition
• Automation test cases can run repeatedly and consistently, we don’t need3
Amity School of Engineering & Technology

Types of Automation Testing


• User Acceptance Testing (UAT): It will check if the
product works correctly for the end-user or not.
• Business Acceptance Testing(BAT): It will check if
the product aligns with business requirements.
• Contract Acceptance Testing(CAT): It will check
that acceptance tests must pass within a predefined
period after going live.
• Regulations Acceptance Testing(RAT): It checks
the compliance with Government rules and
regulations. 4
Amity School of Engineering & Technology

Steps to do Automation Testing


• Select the tools based on your application’s
technology.
• Find out which parts of your application can be
automated.
• Work on test scripts and frameworks.
• After test scripts are created then start
execution.
• Make sure to keep the test scripts up to date
and make sure to keep appropriate changes. 5
Amity School of Engineering & Technology

Automated Testing vs. Manual



Testing
In automated testing, tests are executed automatically with the
help of an automation tool where human intervention is not
required, whereas in manual testing, tests are executed by a
human.
• Manual testing is a hands-on technique where the testers need
to get involved in everything from test creation to test execution,
whereas in automation testing, testers leverage tools to write
test scripts and then automate the test execution
• As automated testing helps in executing more test cases, the
test coverage is higher in automated testing than manual testing
• Automated testing is less time consuming and more efficient 6
Amity School of Engineering & Technology

Examples of Automated Testing?


Automated testing can be applied for various types of testing
throughout the STLC:
• Functional testing: Automated functional testing involves automating the entire functional testing
process using testing tools like Testsigma, Selenium, etc. Example: Testing the login functionality of
a web application. You can use testing tools like Testsigma or Selenium to automate the process of
entering a username and password, clicking the login button, and verifying if the user is redirected to
the right page.
• Unit testing: Automated unit testing involves testing every module of the application in isolation.
Example: Testing a method that calculates the sum of two numbers using unit testing frameworks
like TestNG or JUnit.
• Integration testing: Automated integration testing validates the interaction between different
modules. Example: Testing the integration between the Add to Cart, Payment Processing, and Order
Confirmation in an e-commerce application.
• Cross-browser testing: Automated cross-browser testing to ensure the application’s consistency
across multiple browsers. Example: Testing a web application’s appearance and functionality across
different browsers. 7
• UI testing: Automated UI testing checks if the UI components are correctly displayed and function
Amity School of Engineering & Technology

Test Automation Frameworks


Some of the most common types of automation frameworks are:
• Linear framework: This is the most basic form of framework and is also known as
the record and playback framework. In this testers create and execute the test
scripts for each test case. It is mostly suitable for small teams that don’t have a lot
of test automation experience.
• Modular-Based Framework: This framework organizes each test case into small
individual units known as modules each module is independent of the other,
having different scenarios but all modules are handled by a single master script.
This approach requires a lot of pre-planning and is best suited for testers who have
experience with test automation.
• Library Architecture Framework: This framework is the expansion of a modular-
based framework with few differences. Here, the task is grouped within the test
script into functions according to a common objective. These functions are stored
in the library so that they can be accessed quickly when needed. This framework
allows for greater flexibility and reusability but creating scripts takes a lot of time 8
Amity School of Engineering & Technology

Automation Testing Process

• Test Planning: Define the scope, objectives, and test strategy.


• Test Design: Create test cases, scenarios, and data.
• Test Execution: Run automated tests and collect results.
• Defect Reporting: Identify and report issues.
• Test Reporting: Generate detailed reports for stakeholders. 9
Automated testing—A simple example Amity School of Engineering & Technology

Let's say you have a web application for an online store and want to automate the testing of the login functionality. Let’s follow the steps mentioned above to create and run the script.
Step 1: Select the right tool
We chose Selenium as our automation tool because it supports web applications and integrates well with various CI/CD tools.
Step 2: Create a framework
We set up a test automation framework using Selenium WebDriver with Java and TestNG for organizing our test cases. We also use Maven for dependency management and Jenkins for CI/CD
integration.
Step 3: Write a test script
We created a test script that contains instructions for the automated testing tool to open a web browser, navigate to the login page of your website, enter predefined username and password
credentials, click the login button, and verify that the user is successfully logged in.
WebDrive driver = new ChromeDriver ();
driver.get(“https://example.com/login”);
driver.findElement(By.id(“username”)).sendKeys(“user123”);
driver.findElement(By.id(“password”)).sendKeys(“pass123”);
driver.findElement(By.id(“loginButton”)).click();
driver.findElement(By.id(“success”));
Step 4: Perform automated testing
Execute the test script using TestNG. The tool opens a web browser, performs the actions specified in the script, and verifies the results.
Step 5: Gather results
After the test execution, TestNG generates a report indicating whether the test passed or failed. The automation tool compares the actual results (such as the appearance of the user dashboard
after login) with the expected results (as defined in the script). If the actual results match the expected results, the test case passes. If not, it fails.
Step 6: Prepare test closure reports
The automation tool generates a detailed report of the test execution, indicating which tests passed and which ones failed. It may also include logs and screenshots for further analysis.
Step 7: Integrate automation testing into CI/CD pipeline
Integrate automation testing into CI/CD pipelines, for example, using Jenkins, to ensure rapid and reliable software delivery. Whenever developers commit code changes to the version control
system, CI/CD pipelines trigger automated tests. If all tests pass, the code is automatically deployed to production.
How do you know if the test passed or failed? Well, for one, if the automated test for login functionality successfully logs in with the correct credentials and navigates to the user dashboard, the
test case is marked as passed. If, however, the login fails due to incorrect credentials, the test case is marked as failed, and the report will provide details about the failure, such as error
messages or screenshots of the unexpected behavior.
Automation testing allows for the efficient and repeatable testing of software applications, saving time and effort compared to manual testing, especially for repetitive and regression testing tasks.
10

You might also like