SlideShare a Scribd company logo
1 of 37
Download to read offline
WEB APPLICATION TESTING WITH SELENIUM
Sargis Sargsyan
QA Automation Engineer
Who This Presentation Is For
•  Developers or QA (Students who will become
developer or QA)
•  Know the basics of an automation tool
•  In this presentation Selenium
•  Want to create a real automation framework
WELCOME TO THE AUTOMATION FACTORY OF NAIRIT
What this Presentation Covers
•  Introduction
•  Basic of automation
•  Why and how we’ll do it
•  Designing The Architecture
•  How to design an automation framework
•  Creating Basic Selenium Test
•  The best place to start
•  Building Out The Framework
•  Refactoring
•  Designing framework for more tests
•  Best Practices and Tips
•  Continuous Integration, Scaling out, Agile, etc.
WE WILL AUTOMATE YOU!
INTRODUCTION
•  Basic of automation
•  Why and how we’ll do it
Type Of Automated Testing
UNIT TEST IS TESTING SMALL UNIT OF CODE IN ISOLATION
Unit Testing
INTEGRATION TESTING TEST UNITS TOGETHER, BUT STILL FOCUSES ON THE CODE
Integration Testing
BATS TEST THE SYSTEM FROM THE PERSPECTIVE OF THE USER
Blackbox Automated Testing (BAT)
THE TEST PYRAMID IS A CONCEPT DEVELOPED BY MIKE COHN
Pyramid of the Testing
Selenium is a web application testing
framework that allows you to write tests
in many programming languages like:
•  Java
•  C#
•  Groovy
•  Perl
•  PHP
•  Python
•  Ruby
What is Selenium?
Selenium deploys on
•  Windows,
•  Linux,
•  MAC OS.
It is an open-source project!
2004 – Jason Huggins creates a JavaScript based tool for automatic
testing called Selenium (now it is known as Selenium Core). Later
Selenium Remote Control (aka Selenium RC) was developed to address
the “same host origin” browser policy and allow many language bindings to
control the browser at a distance
2006 – Simon Stewart started working on another web testing tool called
WebDriver
2009 – Selenium RC and WebDriver are merged into a one project called
Selenium-WebDriver (aka Selenium 2.0)
2013 – The first working draft of WebDriver API W3C Specification is
released
A Bit of History
Terminology
•  Selenium Core
•  Selenium RC
•  Selenium-WebDriver
•  Selenium Server
•  Selenium IDE
•  Selenium-Grid
CAN’T WE JUST USE OUR UNIT & INTEGRATION TESTS AND RUN OTHERS MANUALLY?
Why Do It?
IT WORKED YESTERDAY!
Regression
THIS TEST EXPLAINS EXACTLY WHAT I WANT AND WHAT YOU AGREED TO
Absolute Requirements
BATS TEST MUCH MORE PRODUCTION CODE WITH FEWER LINES OF CODE
Leverage
OUR APPROACH
TESTS DON’T DIRECTLY WORK AGAINST THE WEB APP
Separate Automation Framework
Web App Framework Tests
I TOTALLY UNDERSTAND WHAT THESE TEST ARE DOING.
Simple Test
I AM AN AUTOMATED TEST, I’LL BE DRIVING TODAY. YOU CAN ALL ME ARMAN
Test Drive Creation of Framework
DESIGNING THE ARCHITECTURE
EACH LAYER ONLY INTERACTS WITH THE LAYER IMMEDIATELY BELOW IT
Architecture
THE FRAMEWORK ITSELF SHOULD BE DIVIDED BY LAYERS OF FUNCTIONALITY
Thinking About Layers
Thinking about Ease of Use
THE CHOICE MAKES A HUGE DIFFERENCE
Which is Easier?
OR
PREPARE TO BECOME AN AUTOMATION NINJA!
Let’s Start the Coding
COMMON FAILURE POINTS
NEVER RECORD A TEST CASE!
Recorded Brittle Test
NEVER RECORD A TEST CASE!
Not Building a Framework
WHAT THE HECK AM I LOOKING AT?
Writing Test Like a Code
NOT EVERYTHING CAN BE AUTOMATED!
Automating Hard Things
•  Test fail because
•  The condition testes was not met
•  An Assertion in the test failed
•  Test error because
•  Something other than what was being testes failed
•  The framework threw an exception
IT IS IMPORTANT TO MAKE A DISTINCTION BETWEEN ERRORS & FAILURES
Error vs Failures
•  Have a plan and stick to it
•  Run test as part of build
•  Run test locally
•  Report results
•  Break builds
MAKE SURE AUTOMATED TEST ARE TAKEN SERIOUSLY
Continuous Integration
MAKE SURE AUTOMATED TEST ARE TAKEN SERIOUSLY
Our Continuous Integration
HOW YOU WILL FEEL WHEN YOUR AUTOMATED TESTS ALL PASS
The End!
THANK YOU!
Time for Questions
Web Application Testing with Selenium

More Related Content

What's hot

Testing, CI and CD in the real world
Testing, CI and CD in the real worldTesting, CI and CD in the real world
Testing, CI and CD in the real world
Roc Boronat
 

What's hot (20)

Continuous Testing Meets the Classroom at Code.org
Continuous Testing Meets the Classroom at Code.orgContinuous Testing Meets the Classroom at Code.org
Continuous Testing Meets the Classroom at Code.org
 
Lap Around Visual Studio 2010 Ultimate And TFS 2010
Lap Around Visual Studio 2010 Ultimate And TFS 2010Lap Around Visual Studio 2010 Ultimate And TFS 2010
Lap Around Visual Studio 2010 Ultimate And TFS 2010
 
Zalenium - How to run Selenium Script using Docker and Selenium Grid
Zalenium - How to run Selenium Script using Docker and Selenium GridZalenium - How to run Selenium Script using Docker and Selenium Grid
Zalenium - How to run Selenium Script using Docker and Selenium Grid
 
Automated UI Testing
Automated UI TestingAutomated UI Testing
Automated UI Testing
 
Visual Studio 2010 Testing for Developers
Visual Studio 2010 Testing for DevelopersVisual Studio 2010 Testing for Developers
Visual Studio 2010 Testing for Developers
 
Automated Testing With Jasmine, PhantomJS and Jenkins
Automated Testing With Jasmine, PhantomJS and JenkinsAutomated Testing With Jasmine, PhantomJS and Jenkins
Automated Testing With Jasmine, PhantomJS and Jenkins
 
Agile test-management-test-rail-lastest
Agile test-management-test-rail-lastestAgile test-management-test-rail-lastest
Agile test-management-test-rail-lastest
 
Colorful world-of-visual-automation-testing-latest
Colorful world-of-visual-automation-testing-latestColorful world-of-visual-automation-testing-latest
Colorful world-of-visual-automation-testing-latest
 
How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)
 
DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)
DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)
DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)
 
Mobile UI Testing using Appium and Docker
Mobile UI Testing using Appium and DockerMobile UI Testing using Appium and Docker
Mobile UI Testing using Appium and Docker
 
Continous Integration: A Case Study
Continous Integration: A Case StudyContinous Integration: A Case Study
Continous Integration: A Case Study
 
Learn Key Insights from The State of Web Application Testing Research Report
Learn Key Insights from The State of Web Application Testing Research ReportLearn Key Insights from The State of Web Application Testing Research Report
Learn Key Insights from The State of Web Application Testing Research Report
 
Testing, CI and CD in the real world
Testing, CI and CD in the real worldTesting, CI and CD in the real world
Testing, CI and CD in the real world
 
ASP.NET & Unit Testing
ASP.NET & Unit TestingASP.NET & Unit Testing
ASP.NET & Unit Testing
 
Continous integration
Continous integrationContinous integration
Continous integration
 
Jenkins as the Test Reporting Framework
Jenkins as the Test Reporting FrameworkJenkins as the Test Reporting Framework
Jenkins as the Test Reporting Framework
 
Cypress workshop for JSFoo 2019
Cypress  workshop for JSFoo 2019Cypress  workshop for JSFoo 2019
Cypress workshop for JSFoo 2019
 
Getting Started With Cypress
Getting Started With CypressGetting Started With Cypress
Getting Started With Cypress
 
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App TestingSencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
 

Viewers also liked

Future of Testing Automation and QA - Anand Bagmar, ThoughtWorks
Future of Testing Automation and QA - Anand Bagmar, ThoughtWorksFuture of Testing Automation and QA - Anand Bagmar, ThoughtWorks
Future of Testing Automation and QA - Anand Bagmar, ThoughtWorks
Thoughtworks
 
ATLAS Automation POC
ATLAS Automation POCATLAS Automation POC
ATLAS Automation POC
aakashmc
 

Viewers also liked (13)

QA Automation Testing Online Training in India
QA Automation Testing Online Training in IndiaQA Automation Testing Online Training in India
QA Automation Testing Online Training in India
 
Weightlifting at SimplySocial
Weightlifting at SimplySocialWeightlifting at SimplySocial
Weightlifting at SimplySocial
 
Selenium Presentation at Engineering Colleges
Selenium Presentation at Engineering CollegesSelenium Presentation at Engineering Colleges
Selenium Presentation at Engineering Colleges
 
Testing web application with Python
Testing web application with PythonTesting web application with Python
Testing web application with Python
 
Selenium2 and Jenkins: Almost pain-free UI Testing
Selenium2 and Jenkins: Almost pain-free UI TestingSelenium2 and Jenkins: Almost pain-free UI Testing
Selenium2 and Jenkins: Almost pain-free UI Testing
 
Future of Testing Automation and QA - Anand Bagmar, ThoughtWorks
Future of Testing Automation and QA - Anand Bagmar, ThoughtWorksFuture of Testing Automation and QA - Anand Bagmar, ThoughtWorks
Future of Testing Automation and QA - Anand Bagmar, ThoughtWorks
 
Integration testing - A&BP CC
Integration testing - A&BP CCIntegration testing - A&BP CC
Integration testing - A&BP CC
 
Integration Testing in Python
Integration Testing in PythonIntegration Testing in Python
Integration Testing in Python
 
Automation Framework 042009 V2
Automation Framework   042009  V2Automation Framework   042009  V2
Automation Framework 042009 V2
 
ATLAS Automation POC
ATLAS Automation POCATLAS Automation POC
ATLAS Automation POC
 
test_automation_POC
test_automation_POCtest_automation_POC
test_automation_POC
 
Understanding Selenium/RC, Webdriver Architecture and developing the page obj...
Understanding Selenium/RC, Webdriver Architecture and developing the page obj...Understanding Selenium/RC, Webdriver Architecture and developing the page obj...
Understanding Selenium/RC, Webdriver Architecture and developing the page obj...
 
Keyword-driven Test Automation Framework
Keyword-driven Test Automation FrameworkKeyword-driven Test Automation Framework
Keyword-driven Test Automation Framework
 

Similar to Web Application Testing with Selenium

Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Simplilearn
 

Similar to Web Application Testing with Selenium (20)

Tools for Software Testing
Tools for Software TestingTools for Software Testing
Tools for Software Testing
 
Growing Trends of Open Source UI Frameworks
Growing Trends of Open Source UI FrameworksGrowing Trends of Open Source UI Frameworks
Growing Trends of Open Source UI Frameworks
 
Selenium Introduction and IDE
Selenium Introduction and IDESelenium Introduction and IDE
Selenium Introduction and IDE
 
Selenium
SeleniumSelenium
Selenium
 
Selenium course training institute ameerpet hyderabad
Selenium course training institute ameerpet hyderabad Selenium course training institute ameerpet hyderabad
Selenium course training institute ameerpet hyderabad
 
Selenium course training institute ameerpet hyderabad – Best software trainin...
Selenium course training institute ameerpet hyderabad – Best software trainin...Selenium course training institute ameerpet hyderabad – Best software trainin...
Selenium course training institute ameerpet hyderabad – Best software trainin...
 
QAorHighway2016
QAorHighway2016QAorHighway2016
QAorHighway2016
 
selenium meetup sf talk march 2014 Selenium at Scale
selenium meetup sf talk march 2014 Selenium at Scaleselenium meetup sf talk march 2014 Selenium at Scale
selenium meetup sf talk march 2014 Selenium at Scale
 
Selenium at Salesforce Scale
Selenium at Salesforce ScaleSelenium at Salesforce Scale
Selenium at Salesforce Scale
 
Salesforce selenium-saucelabs-webinar-april-2014
Salesforce selenium-saucelabs-webinar-april-2014Salesforce selenium-saucelabs-webinar-april-2014
Salesforce selenium-saucelabs-webinar-april-2014
 
Web Automation Testing for developers?
Web Automation Testing for developers?Web Automation Testing for developers?
Web Automation Testing for developers?
 
Selenium - Introduction
Selenium - IntroductionSelenium - Introduction
Selenium - Introduction
 
Selenium - Introduction
Selenium - IntroductionSelenium - Introduction
Selenium - Introduction
 
Best java automation training institute in Bangalore - Selenium Labs
Best java automation training institute in Bangalore - Selenium Labs Best java automation training institute in Bangalore - Selenium Labs
Best java automation training institute in Bangalore - Selenium Labs
 
Selenium web driver
Selenium web driverSelenium web driver
Selenium web driver
 
Selenium web driver_2.0_presentation
Selenium web driver_2.0_presentationSelenium web driver_2.0_presentation
Selenium web driver_2.0_presentation
 
Enterprise Strength Mobile JavaScript
Enterprise Strength Mobile JavaScriptEnterprise Strength Mobile JavaScript
Enterprise Strength Mobile JavaScript
 
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
 
Automated ui-testing
Automated ui-testingAutomated ui-testing
Automated ui-testing
 
Selenium
SeleniumSelenium
Selenium
 

More from Sargis Sargsyan

More from Sargis Sargsyan (11)

Let’s Talk About Quality Engineering
Let’s Talk About Quality EngineeringLet’s Talk About Quality Engineering
Let’s Talk About Quality Engineering
 
Your Road to Quality Assurance
Your Road to Quality AssuranceYour Road to Quality Assurance
Your Road to Quality Assurance
 
Appium Dockerization: from Scratch to Advanced Implementation - HUSTEF 2019
Appium Dockerization: from Scratch to Advanced Implementation - HUSTEF 2019Appium Dockerization: from Scratch to Advanced Implementation - HUSTEF 2019
Appium Dockerization: from Scratch to Advanced Implementation - HUSTEF 2019
 
Getting Started with Dockerization of Selenium Tests Execution - Testwarez 2019
Getting Started with Dockerization of Selenium Tests Execution - Testwarez 2019Getting Started with Dockerization of Selenium Tests Execution - Testwarez 2019
Getting Started with Dockerization of Selenium Tests Execution - Testwarez 2019
 
Run your Appium tests using Docker Android - AppiumConf 2019
Run your Appium tests using Docker Android - AppiumConf 2019Run your Appium tests using Docker Android - AppiumConf 2019
Run your Appium tests using Docker Android - AppiumConf 2019
 
How to Dockerize Parallel Execution of Selenium Tests - SQA Days EU, Rgia, La...
How to Dockerize Parallel Execution of Selenium Tests - SQA Days EU, Rgia, La...How to Dockerize Parallel Execution of Selenium Tests - SQA Days EU, Rgia, La...
How to Dockerize Parallel Execution of Selenium Tests - SQA Days EU, Rgia, La...
 
Easy Setup for Parallel Test Execution with Selenium Docker
Easy Setup for Parallel Test Execution with Selenium DockerEasy Setup for Parallel Test Execution with Selenium Docker
Easy Setup for Parallel Test Execution with Selenium Docker
 
Make Your Selenium Suite Faster and Reliable: Test Setup with REST APIs - SQA...
Make Your Selenium Suite Faster and Reliable: Test Setup with REST APIs - SQA...Make Your Selenium Suite Faster and Reliable: Test Setup with REST APIs - SQA...
Make Your Selenium Suite Faster and Reliable: Test Setup with REST APIs - SQA...
 
Test Data Preparation: Tips and Tricks - SQA Days 22 - Saint Petersburg
Test Data Preparation: Tips and Tricks - SQA Days 22 - Saint PetersburgTest Data Preparation: Tips and Tricks - SQA Days 22 - Saint Petersburg
Test Data Preparation: Tips and Tricks - SQA Days 22 - Saint Petersburg
 
Better Page Object Handling with Loadable Component Pattern
Better Page Object Handling with Loadable Component PatternBetter Page Object Handling with Loadable Component Pattern
Better Page Object Handling with Loadable Component Pattern
 
QA MeetUp Yerevan - Aug 25
QA MeetUp Yerevan - Aug 25QA MeetUp Yerevan - Aug 25
QA MeetUp Yerevan - Aug 25
 

Recently uploaded

Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Kandungan 087776558899
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
Kamal Acharya
 

Recently uploaded (20)

HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Engineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesEngineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planes
 
Wadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptxWadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptx
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech students
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
Moment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilMoment Distribution Method For Btech Civil
Moment Distribution Method For Btech Civil
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and properties
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
 
Computer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to ComputersComputer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to Computers
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
 

Web Application Testing with Selenium

  • 1. WEB APPLICATION TESTING WITH SELENIUM Sargis Sargsyan QA Automation Engineer
  • 2. Who This Presentation Is For •  Developers or QA (Students who will become developer or QA) •  Know the basics of an automation tool •  In this presentation Selenium •  Want to create a real automation framework WELCOME TO THE AUTOMATION FACTORY OF NAIRIT
  • 3. What this Presentation Covers •  Introduction •  Basic of automation •  Why and how we’ll do it •  Designing The Architecture •  How to design an automation framework •  Creating Basic Selenium Test •  The best place to start •  Building Out The Framework •  Refactoring •  Designing framework for more tests •  Best Practices and Tips •  Continuous Integration, Scaling out, Agile, etc. WE WILL AUTOMATE YOU!
  • 4. INTRODUCTION •  Basic of automation •  Why and how we’ll do it
  • 6. UNIT TEST IS TESTING SMALL UNIT OF CODE IN ISOLATION Unit Testing
  • 7. INTEGRATION TESTING TEST UNITS TOGETHER, BUT STILL FOCUSES ON THE CODE Integration Testing
  • 8. BATS TEST THE SYSTEM FROM THE PERSPECTIVE OF THE USER Blackbox Automated Testing (BAT)
  • 9. THE TEST PYRAMID IS A CONCEPT DEVELOPED BY MIKE COHN Pyramid of the Testing
  • 10. Selenium is a web application testing framework that allows you to write tests in many programming languages like: •  Java •  C# •  Groovy •  Perl •  PHP •  Python •  Ruby What is Selenium? Selenium deploys on •  Windows, •  Linux, •  MAC OS. It is an open-source project!
  • 11. 2004 – Jason Huggins creates a JavaScript based tool for automatic testing called Selenium (now it is known as Selenium Core). Later Selenium Remote Control (aka Selenium RC) was developed to address the “same host origin” browser policy and allow many language bindings to control the browser at a distance 2006 – Simon Stewart started working on another web testing tool called WebDriver 2009 – Selenium RC and WebDriver are merged into a one project called Selenium-WebDriver (aka Selenium 2.0) 2013 – The first working draft of WebDriver API W3C Specification is released A Bit of History
  • 12. Terminology •  Selenium Core •  Selenium RC •  Selenium-WebDriver •  Selenium Server •  Selenium IDE •  Selenium-Grid
  • 13. CAN’T WE JUST USE OUR UNIT & INTEGRATION TESTS AND RUN OTHERS MANUALLY? Why Do It?
  • 15. THIS TEST EXPLAINS EXACTLY WHAT I WANT AND WHAT YOU AGREED TO Absolute Requirements
  • 16. BATS TEST MUCH MORE PRODUCTION CODE WITH FEWER LINES OF CODE Leverage
  • 18. TESTS DON’T DIRECTLY WORK AGAINST THE WEB APP Separate Automation Framework Web App Framework Tests
  • 19. I TOTALLY UNDERSTAND WHAT THESE TEST ARE DOING. Simple Test
  • 20. I AM AN AUTOMATED TEST, I’LL BE DRIVING TODAY. YOU CAN ALL ME ARMAN Test Drive Creation of Framework
  • 22. EACH LAYER ONLY INTERACTS WITH THE LAYER IMMEDIATELY BELOW IT Architecture
  • 23. THE FRAMEWORK ITSELF SHOULD BE DIVIDED BY LAYERS OF FUNCTIONALITY Thinking About Layers
  • 25. THE CHOICE MAKES A HUGE DIFFERENCE Which is Easier? OR
  • 26. PREPARE TO BECOME AN AUTOMATION NINJA! Let’s Start the Coding
  • 28. NEVER RECORD A TEST CASE! Recorded Brittle Test
  • 29. NEVER RECORD A TEST CASE! Not Building a Framework
  • 30. WHAT THE HECK AM I LOOKING AT? Writing Test Like a Code
  • 31. NOT EVERYTHING CAN BE AUTOMATED! Automating Hard Things
  • 32. •  Test fail because •  The condition testes was not met •  An Assertion in the test failed •  Test error because •  Something other than what was being testes failed •  The framework threw an exception IT IS IMPORTANT TO MAKE A DISTINCTION BETWEEN ERRORS & FAILURES Error vs Failures
  • 33. •  Have a plan and stick to it •  Run test as part of build •  Run test locally •  Report results •  Break builds MAKE SURE AUTOMATED TEST ARE TAKEN SERIOUSLY Continuous Integration
  • 34. MAKE SURE AUTOMATED TEST ARE TAKEN SERIOUSLY Our Continuous Integration
  • 35. HOW YOU WILL FEEL WHEN YOUR AUTOMATED TESTS ALL PASS The End!
  • 36. THANK YOU! Time for Questions