SlideShare una empresa de Scribd logo
1 de 38
Descargar para leer sin conexión
DevOps Certification Training
Software and Automation Testing Framework
Learning Objectives
By the end of this lesson, you will be able to:
Describe the automation testing process
Describe the Selenium WebDriver architecture
Install Selenium WebDriver, and write the first test case
Implement TestNG in Eclipse
Implement continuous integration with Selenium and Jenkins
Introduction to Automation Testing
What Is Automation Testing?
Automation testing is a method in software testing that uses special software tools to control the
execution of tests and compares the actual test results with the expected results. It requires very less
human intervention.
Automation Testing Process
Automation
Testing Life
Cycle
Determine
the scope of
Automation
Test
Automation
Tool
Selection
Introduce
Automated
Test
Approach
Test Planning,
Design, and
Development
Test Execution
and
Management
Test Review
and
Evaluation
What Is Selenium?
• It is open-source, portable framework used to automate web applications testing.
• It is highly flexible when it comes to testing functional and regression test cases.
• It also supports cross browsing, where the test cases run across various platforms simultaneously.
• It also helps in creating robust, browser-based regression automation suites and perform test case
execution.
Why Selenium?
Browsers
Programming
Languages
OS Platforms
Advantages of Selenium
Language and Framework Support
Multi-Browser Support
Ease of Implementation
Parallel Test Execution and Fast Speed
Less Hardware Usage and Constant Updates
Selenium Architecture and its Components
Selenium WebDriver Architecture
Selenium Components
Selenium RC
Selenium IDE
Selenium
WebDriver
Selenium Grid
Selenium IDE
• IDE (Integrated Development Environment) is a Firefox plugin and is one
of the simplest frameworks in the Selenium Suite.
• It allows us to record and playback the scripts.
• If you wish to create scripts using Selenium the IDE, you should use
Selenium RC or Selenium WebDriver to write advanced and robust test
cases.
Selenium RC
• Also known as Selenium 1.
• Main Selenium project for a long time before the WebDriver merge
brought up Selenium 2.
• Relies on JavaScript for automation.
• Supports Ruby, PHP, Python, Perl, C#, Java, Javascript. It supports all the
browsers currently available.
• RC is now officially deprecated.
Selenium WebDriver
• It is a browser automation framework that accepts commands and
sends them to a browser.
• Implemented through a browser-specific driver.
• Communicates with the browser and controls it.
• Supports various programming languages like – Java, C#, PHP, Python,
Perl, Ruby, and Javascript.
Selenium Grid
• It is a tool which is used together with Selenium RC.
• It is used to run tests on different systems against different browsers in
parallel.
• Which implies – running multiple tests at the same time against different
systems running different browsers and operating systems.
Prerequisites for Selenium
Java 1.8
and
above or
Python
Eclipse for
JEE
developers
Selenium
3.0
Browser
Drivers
Write the First Test Case
Create a project
in Eclipse
Create a class
file
Configure the
build path, add
Selenium jars
Add the path of
browser driver
Save the file
Run the
program
Write the first
test case
Selenium WebDriver Installation and Integration in Eclipse
Problem Statement:
You have been asked to install and integrate Selenium WebDriver.
Duration: 15 Min.
Assisted Practice: Guidelines
Steps to Perform:
1. Download and setup Selenium server
2. Downloading ChromeDriver
3. Integrating selenium to Eclipse
What Is A Web Element?
● Anything that is present on the web
page is a WebElement such as text
box, button, etc. It represents an
HTML element.
● Selenium WebDriver encapsulates a
simple form element as an object of
the WebElement
Running the First Selenium Test Case
Problem Statement:
You have been asked to execute a first test case in Selenium.
Duration: 15 Min.
Assisted Practice: Guidelines
Steps to Perform:
1. Configure Selenium in Eclipse
2. Run the first test case
Selenium TestNG Framework
Introduction to TestNG
• TestNG stands for Test Next Generation and is an open-source test automation framework,
inspired by JUnit and NUnit.
• It provides functionality like test annotations, grouping, prioritization, parameterization, and
sequencing techniques in the code
• It provides detailed test reports.
Features of TestNG
• It generates the report in a format that includes several executed test cases, number of
failed test cases, and test cases that have been skipped.
• Multiple test cases can be grouped easily by converting them into a TestNG.xml file. Here,
you can set the priorities to execute the test cases.
• Using TestNG, you can execute multiple test cases on multiple browsers.
• The testing framework can be easily integrated with tools like Maven, Jenkins, etc.
Setting Up TestNG in Eclipse
Problem Statement:
You have been asked to setup and configure TestNG framework on your system.
Duration: 15 Min.
Assisted Practice: Guidelines
Steps to Perform:
1. Download and set up TestNG
2. Integrate TestNG in Eclipse
Testing the Automation Script
Problem Statement:
You have been asked to test the automation script using TestNG.
Duration: 15 Min.
Assisted Practice: Guidelines
Steps to Perform:
1. Configure TestNG in Eclipse
2. Test the automation script
Selenium Integration with Jenkins
Why Jenkins for Test Automation?
Jenkins is a popular Continuous Integration orchestration tool. It provides numerous plugins
for integration with multiple test automation tools and frameworks into the test pipeline. When
it comes to test automation, Jenkins provides plugins that help run test suites, gather and
display the results, and provide details on failed test cases.
Why Jenkins for Test Automation?
Runs Automated Test Suites:
● Jenkins provides plugins for various test frameworks like Selenium, Cucumber, and
Appium, Robot framework.
● These can be integrated into CI pipelines to run automated tests for every build.
Summarizes the results:
● Most plugins also summarize the test results and display them as an HTML output.
Why Jenkins for Test Automation?
Provides Trends
Jenkins keeps track of results and displays them as a trend graph. This offers a better view
of how the tests have fared in the past.
Displays Test Failure Results
Test results are tabulated, and the failures are logged with the test results.
Adding Selenium Plugin to Jenkins
Problem Statement:
You have been asked to add the selenium plugin to Jenkins tool.
Duration: 15 Min.
Assisted Practice: Guidelines
Steps to Perform:
1. Login to Jenkins Dashboard
2. Add Selenium plugin to Jenkins
Key Takeaways
Selenium is a testing tool for automation testing of web applications.
Selenium supports various programming languages, operating,
system and browsers
TestNG generates the report in a format that includes several
executed test cases, number of failed test cases, and test cases that
have been skipped.
Jenkins provides numerous plugins for integration with
multiple test automation tools and frameworks into the test
pipeline.
Project Agenda: As a DevOps engineer, you are required to perform
continuous integration with Selenium and TestNG in Jenkins.
Description: Testing is an integral part of SDLC and Agile. It is necessary to
test every tool before getting into production environment to ensure that the
tool functions as desired. To do so, it is necessary to integrate a tool with
Jenkins in DevOps life cycle.
Continuous Integration with Selenium in Jenkins
Lesson-End Project

Más contenido relacionado

Similar a Lesson_06_Software_and_Automation_Testing_Frameworks.pdf

[DevDay 2017] Automation Testing - Speaker: Nghia Khuong - Project Manager at...
[DevDay 2017] Automation Testing - Speaker: Nghia Khuong - Project Manager at...[DevDay 2017] Automation Testing - Speaker: Nghia Khuong - Project Manager at...
[DevDay 2017] Automation Testing - Speaker: Nghia Khuong - Project Manager at...DevDay.org
 
Best Unit Testing Frameworks to Automate your Desktop Web Testing using Selen...
Best Unit Testing Frameworks to Automate your Desktop Web Testing using Selen...Best Unit Testing Frameworks to Automate your Desktop Web Testing using Selen...
Best Unit Testing Frameworks to Automate your Desktop Web Testing using Selen...pCloudy
 
test-automation-selenium-160216124839.pptx
test-automation-selenium-160216124839.pptxtest-automation-selenium-160216124839.pptx
test-automation-selenium-160216124839.pptxSyedZaeem9
 
Python selenium
Python seleniumPython selenium
Python seleniumDucat
 
What is Selenium Introduction to Selenium Testing.pptx
What is Selenium Introduction to Selenium Testing.pptxWhat is Selenium Introduction to Selenium Testing.pptx
What is Selenium Introduction to Selenium Testing.pptxSyntax Technologies
 
What is Selenium Testing.pdf
What is Selenium Testing.pdfWhat is Selenium Testing.pdf
What is Selenium Testing.pdfAnanthReddy38
 
Selenium Presentation at Engineering Colleges
Selenium Presentation at Engineering CollegesSelenium Presentation at Engineering Colleges
Selenium Presentation at Engineering CollegesVijay Rangaiah
 
Reasons behind selenium automation testing popularity
Reasons behind selenium automation testing popularityReasons behind selenium automation testing popularity
Reasons behind selenium automation testing popularityRay Business Technologies
 
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdfPros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdfkalichargn70th171
 
Software Testing Tools Training
Software Testing Tools TrainingSoftware Testing Tools Training
Software Testing Tools TrainingQEdge Tech
 
Test Automation Using Selenium
Test Automation Using SeleniumTest Automation Using Selenium
Test Automation Using SeleniumNikhil Kapoor
 
What is Selenium Automation Testing.pdf
What is Selenium Automation Testing.pdfWhat is Selenium Automation Testing.pdf
What is Selenium Automation Testing.pdfAnanthReddy38
 
What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...
What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...
What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...Simplilearn
 
Selenium Testing: A Comprehensive Guide to Automated Web Testing
Selenium Testing: A Comprehensive Guide to Automated Web TestingSelenium Testing: A Comprehensive Guide to Automated Web Testing
Selenium Testing: A Comprehensive Guide to Automated Web TestingpCloudy
 

Similar a Lesson_06_Software_and_Automation_Testing_Frameworks.pdf (20)

Sel
SelSel
Sel
 
Selenium Introduction
Selenium IntroductionSelenium Introduction
Selenium Introduction
 
[DevDay 2017] Automation Testing - Speaker: Nghia Khuong - Project Manager at...
[DevDay 2017] Automation Testing - Speaker: Nghia Khuong - Project Manager at...[DevDay 2017] Automation Testing - Speaker: Nghia Khuong - Project Manager at...
[DevDay 2017] Automation Testing - Speaker: Nghia Khuong - Project Manager at...
 
Best Unit Testing Frameworks to Automate your Desktop Web Testing using Selen...
Best Unit Testing Frameworks to Automate your Desktop Web Testing using Selen...Best Unit Testing Frameworks to Automate your Desktop Web Testing using Selen...
Best Unit Testing Frameworks to Automate your Desktop Web Testing using Selen...
 
test-automation-selenium-160216124839.pptx
test-automation-selenium-160216124839.pptxtest-automation-selenium-160216124839.pptx
test-automation-selenium-160216124839.pptx
 
Python selenium
Python seleniumPython selenium
Python selenium
 
Selenium (1)
Selenium (1)Selenium (1)
Selenium (1)
 
What is Selenium Introduction to Selenium Testing.pptx
What is Selenium Introduction to Selenium Testing.pptxWhat is Selenium Introduction to Selenium Testing.pptx
What is Selenium Introduction to Selenium Testing.pptx
 
QSpiders - Automation using Selenium
QSpiders - Automation using SeleniumQSpiders - Automation using Selenium
QSpiders - Automation using Selenium
 
What is Selenium Testing.pdf
What is Selenium Testing.pdfWhat is Selenium Testing.pdf
What is Selenium Testing.pdf
 
Selenium Presentation at Engineering Colleges
Selenium Presentation at Engineering CollegesSelenium Presentation at Engineering Colleges
Selenium Presentation at Engineering Colleges
 
Reasons behind selenium automation testing popularity
Reasons behind selenium automation testing popularityReasons behind selenium automation testing popularity
Reasons behind selenium automation testing popularity
 
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdfPros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
 
Selenium
SeleniumSelenium
Selenium
 
Software Testing Tools Training
Software Testing Tools TrainingSoftware Testing Tools Training
Software Testing Tools Training
 
Test Automation Using Selenium
Test Automation Using SeleniumTest Automation Using Selenium
Test Automation Using Selenium
 
What is Selenium Automation Testing.pdf
What is Selenium Automation Testing.pdfWhat is Selenium Automation Testing.pdf
What is Selenium Automation Testing.pdf
 
What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...
What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...
What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...
 
Selenium Testing: A Comprehensive Guide to Automated Web Testing
Selenium Testing: A Comprehensive Guide to Automated Web TestingSelenium Testing: A Comprehensive Guide to Automated Web Testing
Selenium Testing: A Comprehensive Guide to Automated Web Testing
 
Selenium Primer
Selenium PrimerSelenium Primer
Selenium Primer
 

Último

办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Best Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfBest Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfIdiosysTechnologies1
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfLivetecs LLC
 

Último (20)

办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Best Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfBest Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdf
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdf
 

Lesson_06_Software_and_Automation_Testing_Frameworks.pdf

  • 2. Software and Automation Testing Framework
  • 3. Learning Objectives By the end of this lesson, you will be able to: Describe the automation testing process Describe the Selenium WebDriver architecture Install Selenium WebDriver, and write the first test case Implement TestNG in Eclipse Implement continuous integration with Selenium and Jenkins
  • 5. What Is Automation Testing? Automation testing is a method in software testing that uses special software tools to control the execution of tests and compares the actual test results with the expected results. It requires very less human intervention.
  • 6. Automation Testing Process Automation Testing Life Cycle Determine the scope of Automation Test Automation Tool Selection Introduce Automated Test Approach Test Planning, Design, and Development Test Execution and Management Test Review and Evaluation
  • 7. What Is Selenium? • It is open-source, portable framework used to automate web applications testing. • It is highly flexible when it comes to testing functional and regression test cases. • It also supports cross browsing, where the test cases run across various platforms simultaneously. • It also helps in creating robust, browser-based regression automation suites and perform test case execution.
  • 9. Advantages of Selenium Language and Framework Support Multi-Browser Support Ease of Implementation Parallel Test Execution and Fast Speed Less Hardware Usage and Constant Updates
  • 10. Selenium Architecture and its Components
  • 12. Selenium Components Selenium RC Selenium IDE Selenium WebDriver Selenium Grid
  • 13. Selenium IDE • IDE (Integrated Development Environment) is a Firefox plugin and is one of the simplest frameworks in the Selenium Suite. • It allows us to record and playback the scripts. • If you wish to create scripts using Selenium the IDE, you should use Selenium RC or Selenium WebDriver to write advanced and robust test cases.
  • 14. Selenium RC • Also known as Selenium 1. • Main Selenium project for a long time before the WebDriver merge brought up Selenium 2. • Relies on JavaScript for automation. • Supports Ruby, PHP, Python, Perl, C#, Java, Javascript. It supports all the browsers currently available. • RC is now officially deprecated.
  • 15. Selenium WebDriver • It is a browser automation framework that accepts commands and sends them to a browser. • Implemented through a browser-specific driver. • Communicates with the browser and controls it. • Supports various programming languages like – Java, C#, PHP, Python, Perl, Ruby, and Javascript.
  • 16. Selenium Grid • It is a tool which is used together with Selenium RC. • It is used to run tests on different systems against different browsers in parallel. • Which implies – running multiple tests at the same time against different systems running different browsers and operating systems.
  • 17. Prerequisites for Selenium Java 1.8 and above or Python Eclipse for JEE developers Selenium 3.0 Browser Drivers
  • 18. Write the First Test Case Create a project in Eclipse Create a class file Configure the build path, add Selenium jars Add the path of browser driver Save the file Run the program Write the first test case
  • 19. Selenium WebDriver Installation and Integration in Eclipse Problem Statement: You have been asked to install and integrate Selenium WebDriver. Duration: 15 Min.
  • 20. Assisted Practice: Guidelines Steps to Perform: 1. Download and setup Selenium server 2. Downloading ChromeDriver 3. Integrating selenium to Eclipse
  • 21. What Is A Web Element? ● Anything that is present on the web page is a WebElement such as text box, button, etc. It represents an HTML element. ● Selenium WebDriver encapsulates a simple form element as an object of the WebElement
  • 22. Running the First Selenium Test Case Problem Statement: You have been asked to execute a first test case in Selenium. Duration: 15 Min.
  • 23. Assisted Practice: Guidelines Steps to Perform: 1. Configure Selenium in Eclipse 2. Run the first test case
  • 25. Introduction to TestNG • TestNG stands for Test Next Generation and is an open-source test automation framework, inspired by JUnit and NUnit. • It provides functionality like test annotations, grouping, prioritization, parameterization, and sequencing techniques in the code • It provides detailed test reports.
  • 26. Features of TestNG • It generates the report in a format that includes several executed test cases, number of failed test cases, and test cases that have been skipped. • Multiple test cases can be grouped easily by converting them into a TestNG.xml file. Here, you can set the priorities to execute the test cases. • Using TestNG, you can execute multiple test cases on multiple browsers. • The testing framework can be easily integrated with tools like Maven, Jenkins, etc.
  • 27. Setting Up TestNG in Eclipse Problem Statement: You have been asked to setup and configure TestNG framework on your system. Duration: 15 Min.
  • 28. Assisted Practice: Guidelines Steps to Perform: 1. Download and set up TestNG 2. Integrate TestNG in Eclipse
  • 29. Testing the Automation Script Problem Statement: You have been asked to test the automation script using TestNG. Duration: 15 Min.
  • 30. Assisted Practice: Guidelines Steps to Perform: 1. Configure TestNG in Eclipse 2. Test the automation script
  • 32. Why Jenkins for Test Automation? Jenkins is a popular Continuous Integration orchestration tool. It provides numerous plugins for integration with multiple test automation tools and frameworks into the test pipeline. When it comes to test automation, Jenkins provides plugins that help run test suites, gather and display the results, and provide details on failed test cases.
  • 33. Why Jenkins for Test Automation? Runs Automated Test Suites: ● Jenkins provides plugins for various test frameworks like Selenium, Cucumber, and Appium, Robot framework. ● These can be integrated into CI pipelines to run automated tests for every build. Summarizes the results: ● Most plugins also summarize the test results and display them as an HTML output.
  • 34. Why Jenkins for Test Automation? Provides Trends Jenkins keeps track of results and displays them as a trend graph. This offers a better view of how the tests have fared in the past. Displays Test Failure Results Test results are tabulated, and the failures are logged with the test results.
  • 35. Adding Selenium Plugin to Jenkins Problem Statement: You have been asked to add the selenium plugin to Jenkins tool. Duration: 15 Min.
  • 36. Assisted Practice: Guidelines Steps to Perform: 1. Login to Jenkins Dashboard 2. Add Selenium plugin to Jenkins
  • 37. Key Takeaways Selenium is a testing tool for automation testing of web applications. Selenium supports various programming languages, operating, system and browsers TestNG generates the report in a format that includes several executed test cases, number of failed test cases, and test cases that have been skipped. Jenkins provides numerous plugins for integration with multiple test automation tools and frameworks into the test pipeline.
  • 38. Project Agenda: As a DevOps engineer, you are required to perform continuous integration with Selenium and TestNG in Jenkins. Description: Testing is an integral part of SDLC and Agile. It is necessary to test every tool before getting into production environment to ensure that the tool functions as desired. To do so, it is necessary to integrate a tool with Jenkins in DevOps life cycle. Continuous Integration with Selenium in Jenkins Lesson-End Project