0% found this document useful (0 votes)
2 views

Ch 2- Java-basic

The document provides an overview of test automation, focusing on the use of Selenium WebDriver with Java for automating web application testing. It outlines the benefits of automation, such as increased speed and reduced human error, while also highlighting potential disadvantages like the need for proficiency in writing scripts and maintenance challenges. Additionally, it discusses various automation tools and frameworks, including those for web, mobile, and API testing.

Uploaded by

Ahmed Mawrdy
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Ch 2- Java-basic

The document provides an overview of test automation, focusing on the use of Selenium WebDriver with Java for automating web application testing. It outlines the benefits of automation, such as increased speed and reduced human error, while also highlighting potential disadvantages like the need for proficiency in writing scripts and maintenance challenges. Additionally, it discusses various automation tools and frameworks, including those for web, mobile, and API testing.

Uploaded by

Ahmed Mawrdy
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

10/5/2024 1

SELENIUM WEBDRIVER USING JAVA

INTRODUCTION TO AUTOMATION TESTING


What’s Test Automation

The activities of transferring Manual Test Cases into scripts using one of the
programming languages with the help of one of the Automation Testing tools
(ex. Selenium WebDriver) & assertion frameworks (ex. TestNG)

Note: Test Cases could be for FrontEnd/BackEnd


What’s Test Automation

Test Steps Test data Expected Result


Navigate to URL https://www.facebook.com/ Facebook Login Page opens up

Enter Valid Username User name: Automation Username is shown

Enter Valid Password Password: P@ssw0rd Password is masked (****)

Click on SignIn Button 1 User logged in successfully


2 Home Page is displayed
What’s Test Automation

Test Cases have to be repeated often during development cycles to ensure


quality. Manually repeating these tests is costly and time consuming. Once
created, automated tests can be run over and over again at no additional cost
and they are much faster than manual tests.

Iteration 1 Iteration 2 Iteration 3 Iteration X

Story 1 Story 2
Login
Login Login
Story 3 Story 4
Sign Up
Sign Up Story 5 Story 6

Forgot Story 7 Story 8


Password Story x
What’s Test Automation
Test Automation Goals

One major goal of automation is to save time, effort, and avoid human
mistakes.

o Increases test execution speed and test coverage.


o Reporting and share test execution results generated by tool which have total
no of test executed, passed, failed and total time.
o More software releases are expected.
o Reusability of scripts on other applications having similar functionality.
Disadvantages of TestAutomation

Automation Testing is a Double-edged sword.

• Proficiency is needed to write the automation test scripts.

• Debugging test scripts could be a major issue, If it’s not depending on an well-
structured design pattern.

• Sometimes changes applied on the application calls more test scripts maintenance.
What’s Test Automation

Remember:

Automation could be for FrontEnd/BackEnd Test Cases


Three-Tier Architecture

FrontEnd BackEnd
Web Automation Tools

Selenium
• Collection of open source APIs
• Automate web app testing
• Languages: Java, Python, Ruby, Javascript
• Official website: https://www.selenium.dev/

Cypress
• Automate web app testing
• JavaScript-only tool
• Official website: https://www.cypress.io/
Web Automation Tools

WebDriverIO
• Automate web apps written in modern
frameworks Like React, Angular, Vue.js
• Also could be used with Native mobile apps
• Official website: https://webdriver.io/

Protractor
• test framework for Angular & AngularJS apps
• JavaScript-only tool
• Official website: https://www.protractortest.org/
Mobile Automation Tools

Appium

Android Espresso

XCUITest IOS
Desktop Automation Tools

WinAppDriver

Robot Framework
API Automation Tools

Postman SoapUI

RestAssured Katalon
Assertion Frameworks

TestNG
• Testing framework inspired from JUnit and NUnit
• TestNG introduces new functionalities makes
it more powerful and easier to use
• Official website: https://testng.org/

Junit
• JUnit is a unit testing framework for Java programming
language.
• Official website: https://junit.org/
Assertion Frameworks

Chai Assertion Library


• Chai is a BDD / TDD assertion library for
node and any JavaScript testing
framework.
• Offical website: https://www.chaijs.com/
Test Automation Pyramid
Test Automation Pyramid

Unit Tests are the smallest automated test possible.

• It tests the behaviour of just one function or method, and is written directly in
the application code.

• Unit Test is the widest section of the pyramid, which should comprise the
largest number of tests

• Unit Tests run very quickly and they are the closest to the code.
Test Automation Pyramid

Service Tests are tests that check the web services (often APIs) that are used in our code.

• The middle section of the pyramid is for the API tests,


• Service Tests run quickly but depend on the back-end data store.
Test Automation Pyramid

UI tests verify that end-user activities work correctly. These are the tests that actions like
fill out text fields and click buttons are take place.

• It’s the smallest section of the test pyramid, which should comprise the smallest number
of tests due to their slow speed and multiple dependencies.
THANK YOU!

You might also like