SlideShare a Scribd company logo
Test Web applications
using Selenium
Outline
 Uniqueness of web app testing
 Heterogonous system
 Dynamic pages
 Load
 Security
 Selenium WebDriver
 Course project 4
Web application architecture
 Heterogeneous system
 Front end
 Browser: IE, Firefox, Chrome, Safari…
 Server side
 Application Server
 Database Server
 File System
 ……
Heterogeneous system
 Front end
 HTML, JavaScript, Adobe Flash……
HTMLHTML
JavaScriptJavaScript
Page in BrowserPage in Browser
Source behindSource behind
Uniqueness 1: Heterogeneous system
 Server side
 Can be written in PHP, Java, C#...
 Communicate with Database server in SQL
PHP ScriptPHP Script
SQLSQL
HTMLHTML
SQLSQL
PHPPHP
Heterogeneous system
 Should test all involved parts
 Everything can go wrong…
 However, only front end is accessible for tests
 Can not directly test the Server code and SQL
 Have to drive the execution and test
 Frontend
 HTML: Malformed HTML page? (demo)
 JavaScript: Runtime Errors? (demo)
 Server script
 PHP, Java…: Runtime Errors? (demo)
 SQL: Malformed SQL query string? (demo)
Test from the front end
 Good things
 Hide the complexity of the backend
 Uniformed interface
 Can put a robot in the front end and automate the tests
 Bad things
 The front end is not trustable
 Crafted malicious requests
Good things of testing from the front end
 Automated web app testing
 Compare to commend-line program testing…
 Sensitive to input values (the same)
 GUI testing: event driven (the difference)
 “Button A” then “Button B”  OK
 “Button B” then “Button A”  FAIL
 The robot should be able to
 Provide input values
 Simulate user actions
 Selenium
 A tool set automates web app testing across platforms
 Can simulate user interactions in browser
 Two components
 Selenium IDE
 Selenium WebDriver (aka. Selenium 2)
Selenium IDE
 Firefox extension
 Easy record and replay
 Debug and set breakpoints
 Save tests in HTML,
WebDriver and other
formats.
Selenium IDE test cases
 Selenium saves all information in an HTML table format
 Each record consists of:
 Command – tells Selenium what to do (e.g. “open”, “type”,
“click”, “verifyText”)
 Target – tells Selenium which HTML element a command
refers to (e.g. textbox, header, table)
 Value – used for any command that might need a value of
some kind (e.g. type something into a textbox)
How to record/replay with Selenium IDE
1. Start recording in Selenium IDE
2. Execute scenario on running web application
3. Stop recording in Selenium IDE
4. Verify / Add assertions
5. Replay the test.
Selenium IDE Demo……
Bad things of testing from the front end
 The front end is not trustable
 Front end code can be accessed to anybody
 They can infer the input parameters
 Crafted requests!
 Demo
 Front end limits the length of the input values
 Front end limits the content of the input values
 Front end limits the combination of the input values
Uniqueness 2: Dynamic pages
 Client page is dynamic
 It can change itself in the runtime
 HTML can be modified by JavaScript
 JavaScript can modify itself
 Demo
 Server script is dynamic
 Client pages are constructed in the runtime
 A same server script can produce completely
different client pages
 Demo
 SchoolMate
Uniqueness 3: Performance
 Performance is crucial to the success of a web app
 Recall the experience to register for a class in the
first days of the semester…
 Are the servers powerful enough?
 Performance testing evaluates system performance
under normal and heavy usage
 Load testing
 For expected concurrent number of users
 Stress testing
 To understand the upper limits of capacity
 Performance testing can be automated
Uniqueness 4: Security
 Web app usually deals with sensitive info, e.g.
 Credit card number
 SSN
 Billing / Shipping address
 Security is the biggest concern
 Security testing should simulate possible attacks
Uniqueness 4: Security
 SQL Injection
 The untrusted input is used to construct dynamic
SQL queries.
 E.g, update my own password
$str = "UPDATE users SET password = ” “ . $_POST['newPass’] .
“” WHERE username =”“ . $_POST['username'] . “””;
mysql_query( $str );
$_POST['newPass’] = pass, $_POST['username'] = me
Query String: UPDATE users SET password = “pass” WHERE username =“me”
$_POST['newPass’] = pass, $_POST['username'] = “ OR 1=1 --
Query String: UPDATE users SET password = “pass” WHERE username =“” OR 1=1 --”
Normal CaseNormal Case
AttackAttack
PHP ScriptPHP Script
Uniqueness 4: Security
 Cross Site Scripting (XSS)
 The untrusted input is used to construct dynamic
HTML pages.
 The malicious JS injected executes in victim’s
browser
 The malicious JS can steal sensitive info
 Demo
 Solution: Never trust user inputs
 Design test cases to simulate attacks
Outline
 Uniqueness of web app testing
 Heterogonous system
 Dynamic pages
 Load
 Security
 Selenium WebDriver
 Course project 4
Limitation of Selenium IDE
 No multiple browsers support
 It runs only in Mozilla Firefox.
 No manual scripts
 E.g. conditions and Loops for Data Driven Testing
 Fancy test cases  Selenium WebDriver
Selenium WebDriver (Selenium 2)
 Selenium-WebDriver
 A piece of program
 Control the browser by programming
 More flexible and powerful
 Selenium-WebDriver supports multiple browsers in
multiple platforms
 Google Chrome 12.0.712.0+
 Internet Explorer 6+
 Firefox 3.0+
 Opera 11.5+
 Android – 2.3+ for phones and tablets
 iOS 3+ for phones
 iOS 3.2+ for tablets
Selenium WebDriver
 WebDriver is designed to providing a simpler and
uniformed programming interface
 Same WebDriver script runs for different platforms
 Support multiple programming language:
 Java, C#, Python, Ruby, PHP, Perl…
 It’s efficient
 WebDriver leverages each browser’s native
support for automation.
What Selenium can do
 A solution for the automated testing
 Simulate user actions
 Functional testing
 Create regression tests to verify functionality and
user acceptance.
 Browser compatibility testing
 The same script can run on any Selenium platform
 Load testing
 Stress testing
How to use Selenium WebDriver
(1) Go to a page
(2) Locate an element
(3) Do something with that element
......
(i) Locate an element
(i+1) Do something with that element
(i+2) Verify / Assert the result
Demo: Verify page title
public static void main( String[] args )
{
// Create a new instance of the Firefox driver
WebDriver driver = new FirefoxDriver();
// (1) Go to a page
driver.get("http://www.google.com");
// (2) Locate an element
WebElement element = driver.findElement(By.name("q"));
// (3-1) Enter something to search for
element.sendKeys("Purdue Univeristy");
// (3-2) Now submit the form. WebDriver will find the form for us from the element
element.submit();
// (3-3) Wait up to 10 seconds for a condition
WebDriverWait waiting = new WebDriverWait(driver, 10);
waiting.until( ExpectedConditions.presenceOfElementLocated( By.id("pnnext") ) );
// (4) Check the title of the page
if( driver.getTitle().equals("purdue univeristy - Google Search") )
System.out.println("PASS");
else
System.err.println("FAIL");
//Close the browser
driver.quit();
}
How to locate an element
 By id
 HTML: <div id="coolestWidgetEvah">...</div>
 WebDriver:
driver.findElement( By.id("coolestWidgetEvah") );
 By name
 HTML: <input name="cheese" type="text"/>
 WebDriver: driver.findElement( By.name("cheese") );
 By Xpath
 HTML
<html>
<input type="text" name="example" />
<input type="text" name="other" />
</html>
 WebDriver: driver.findElements( By.xpath("//input") );
 There are plug-ins for firefox/chrome to automatically display the Xpath
Time issue
 There are delays between submitting a request
and receiving the response
 We can wait until the response page is loaded
 Robot doesn’t know!
 In WebDriver, sometimes it doesn’t work if
 Submit a request
 Verify the response immediately
 Solution:
 Simulate the wait. Wait until some HTML object
appears
 Demo
Outline
 What to test for a web application
 Test web app with selenium
 What’s Selenium?
 Why Selenium?
 How to use Selenium
 Course project 4
Course Project 4
 Test a functionality without the source
 The subject web application
 “Add New Class” in “SchoolMate”
Course Project 4
 Part 1: overview
 Design test cases against the requirement
 The tests should consider
 all possible cases
 equivalence class partitioning
 Implement Selenium WebDriver Script for “Add
new class”
Your testYour test
casescases
Your testYour test
casescases
Your WebDriverYour WebDriver
test templatetest template
Your WebDriverYour WebDriver
test templatetest template
inputinputinputinput outputoutputoutputoutput
TestTest
resultsresults
TestTest
resultsresults
Part 1: requirement analysis
 Requirement for values entered/selected
 [R-1] Class Name : alphabets and numbers are allowed.
 [R-2] Section Number : only numbers are allowed.
 [R-3] Room Number : only numbers are allowed.
 [R-4] Period Number : only numbers are allowed.
 [R-5] All textbox fields : no Cross-Site Scripting (XSS) injection
vulnerabilities.
Part 1: requirement analysis
 Requirement for the “add” function
 After clicking the “Add class” button…
 [R-6] The class record added is successfully
shown in the table.
 [R-7] The values are exactly the same as those
were entered or selected.
Part 1:Design testcases
 For each requirement, design test cases
 Only need test one field in each case
 Do not need consider combinations of fileds
 E.g.
 [R-1] Class Name : alphabets and numbers are allowed.
 You need consider all possible cases
 Divide the test space and find the equivalence class
 Alphabets
 Numbers
 ….
 The test case format is defined
 Test cases will be used as input to your WebDriver Script
Part 1: Implement WebDriver Script
 In WebDriver script, Simulate the user action
 Navigate to the subject page
 Enter values into textboxs based on input values
 Select options based on input values
 Click the “add class” button
 Check the result against the requirements
 Run all your test cases and report the results.
Course Project 4
 Part 2: Pair wise testing
 Use an existing pair wise testing tool fire-eye
 Largely you may reuse the WebDriver template in
Part 1
Your testYour test
casescases
Your testYour test
casescases
Your WebDriverYour WebDriver
test templatetest template
Your WebDriverYour WebDriver
test templatetest template
inputinputinputinput outputoutputoutputoutput
TestTest
resultresult
TestTest
resultresult
Test casesTest cases
generatedgenerated
Test casesTest cases
generatedgenerated
ConvertConvertConvertConvert
Part 2: Generate test cases
 Consider the combination of all textboxs/options
 Use the existing tool, fire-eye, to generate test
cases
 Export the test case in “Nist form”
 Parse and convert the exported test cases to the
form that your WebDriver can accept
 Run all pair-wise test cases
 Report the result
Part 2: Solution design
 Selenium can do more …
 Black Friday is coming, hot items can be sold in a few seconds
 Can you leverage the automated tool and design a practical
solution to score a super hot deal?
 Explain
 What’s the challenge
 What’s the possible cases to handle and how?
 In stock
 Out of stock
 Your shopping cart may be reset under what conditions…
 How to add it into your shopping cart asap
 How you are going to cooperate with the automated tool
Thanks
Q & A
Ad

More Related Content

What's hot (20)

Selenium Concepts
Selenium ConceptsSelenium Concepts
Selenium Concepts
Swati Bansal
 
Selenium WebDriver
Selenium WebDriverSelenium WebDriver
Selenium WebDriver
Yuriy Bezgachnyuk
 
Selenium ppt
Selenium pptSelenium ppt
Selenium ppt
Aneesh Rangarajan
 
Selenium
SeleniumSelenium
Selenium
Rakshitha Raviprakash
 
Test Automation and Selenium
Test Automation and SeleniumTest Automation and Selenium
Test Automation and Selenium
Karapet Sarkisyan
 
Web application testing with Selenium
Web application testing with SeleniumWeb application testing with Selenium
Web application testing with Selenium
Kerry Buckley
 
Selenium Tutorial For Beginners | What Is Selenium? | Selenium Automation Tes...
Selenium Tutorial For Beginners | What Is Selenium? | Selenium Automation Tes...Selenium Tutorial For Beginners | What Is Selenium? | Selenium Automation Tes...
Selenium Tutorial For Beginners | What Is Selenium? | Selenium Automation Tes...
Edureka!
 
An overview of selenium webdriver
An overview of selenium webdriverAn overview of selenium webdriver
An overview of selenium webdriver
Anuraj S.L
 
Data driven Automation Framework with Selenium
Data driven Automation Framework with Selenium Data driven Automation Framework with Selenium
Data driven Automation Framework with Selenium
Edureka!
 
Selenium ppt
Selenium pptSelenium ppt
Selenium ppt
Anirudh Raja
 
End to end test automation with cypress
End to end test automation with cypressEnd to end test automation with cypress
End to end test automation with cypress
Kushan Shalindra Amarasiri - Technical QE Specialist
 
Selenium
SeleniumSelenium
Selenium
eduquer
 
Test automation
Test automationTest automation
Test automation
Xavier Yin
 
Webinar: Selenium WebDriver - Automation Uncomplicated
Webinar: Selenium WebDriver - Automation UncomplicatedWebinar: Selenium WebDriver - Automation Uncomplicated
Webinar: Selenium WebDriver - Automation Uncomplicated
Edureka!
 
What's new in selenium 4
What's new in selenium 4What's new in selenium 4
What's new in selenium 4
Knoldus Inc.
 
Selenium
SeleniumSelenium
Selenium
Kalyan ch
 
Selenium ppt
Selenium pptSelenium ppt
Selenium ppt
Pavan Kumar
 
Introduction to selenium
Introduction to seleniumIntroduction to selenium
Introduction to selenium
Archana Krushnan
 
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
 
Cypress Automation
Cypress  AutomationCypress  Automation
Cypress Automation
Susantha Pathirana
 
Test Automation and Selenium
Test Automation and SeleniumTest Automation and Selenium
Test Automation and Selenium
Karapet Sarkisyan
 
Web application testing with Selenium
Web application testing with SeleniumWeb application testing with Selenium
Web application testing with Selenium
Kerry Buckley
 
Selenium Tutorial For Beginners | What Is Selenium? | Selenium Automation Tes...
Selenium Tutorial For Beginners | What Is Selenium? | Selenium Automation Tes...Selenium Tutorial For Beginners | What Is Selenium? | Selenium Automation Tes...
Selenium Tutorial For Beginners | What Is Selenium? | Selenium Automation Tes...
Edureka!
 
An overview of selenium webdriver
An overview of selenium webdriverAn overview of selenium webdriver
An overview of selenium webdriver
Anuraj S.L
 
Data driven Automation Framework with Selenium
Data driven Automation Framework with Selenium Data driven Automation Framework with Selenium
Data driven Automation Framework with Selenium
Edureka!
 
Selenium
SeleniumSelenium
Selenium
eduquer
 
Test automation
Test automationTest automation
Test automation
Xavier Yin
 
Webinar: Selenium WebDriver - Automation Uncomplicated
Webinar: Selenium WebDriver - Automation UncomplicatedWebinar: Selenium WebDriver - Automation Uncomplicated
Webinar: Selenium WebDriver - Automation Uncomplicated
Edureka!
 
What's new in selenium 4
What's new in selenium 4What's new in selenium 4
What's new in selenium 4
Knoldus Inc.
 
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
 

Viewers also liked (20)

Selenium web driver
Selenium web driverSelenium web driver
Selenium web driver
Sun Technlogies
 
Jira
JiraJira
Jira
Sun Technlogies
 
Silk Performer Presentation v1
Silk Performer Presentation v1Silk Performer Presentation v1
Silk Performer Presentation v1
Sun Technlogies
 
XPATH
XPATHXPATH
XPATH
Sun Technlogies
 
Web Test Automation with Selenium
Web Test Automation with SeleniumWeb Test Automation with Selenium
Web Test Automation with Selenium
vivek_prahlad
 
Automation Testing using Selenium
Automation Testing using SeleniumAutomation Testing using Selenium
Automation Testing using Selenium
Naresh Chintalcheru
 
Continuous Delivery With Selenium Grid And Docker
Continuous Delivery With Selenium Grid And DockerContinuous Delivery With Selenium Grid And Docker
Continuous Delivery With Selenium Grid And Docker
Barbara Gonzalez
 
Jmeter
JmeterJmeter
Jmeter
Sun Technlogies
 
Maven and ANT
Maven and ANTMaven and ANT
Maven and ANT
Sun Technlogies
 
Path Testing
Path TestingPath Testing
Path Testing
Sun Technlogies
 
Software testing
Software testingSoftware testing
Software testing
Rakshitha Raviprakash
 
Javascript
JavascriptJavascript
Javascript
Sun Technlogies
 
Mobile Application Testing
Mobile Application TestingMobile Application Testing
Mobile Application Testing
Sun Technlogies
 
Selenium Basics Tutorial
Selenium Basics TutorialSelenium Basics Tutorial
Selenium Basics Tutorial
Clever Moe
 
BDD with JBehave and Selenium
BDD with JBehave and SeleniumBDD with JBehave and Selenium
BDD with JBehave and Selenium
Nikolay Vasilev
 
Behavior Driven Development and Automation Testing Using Cucumber
Behavior Driven Development and Automation Testing Using CucumberBehavior Driven Development and Automation Testing Using Cucumber
Behavior Driven Development and Automation Testing Using Cucumber
KMS Technology
 
HTML, CSS and Java Scripts Basics
HTML, CSS and Java Scripts BasicsHTML, CSS and Java Scripts Basics
HTML, CSS and Java Scripts Basics
Sun Technlogies
 
Automated Web Testing using JavaScript
Automated Web Testing using JavaScriptAutomated Web Testing using JavaScript
Automated Web Testing using JavaScript
Simon Guest
 
Selenium介绍
Selenium介绍Selenium介绍
Selenium介绍
lory hou
 
Git and GitHub for Testers
Git and GitHub for TestersGit and GitHub for Testers
Git and GitHub for Testers
Josiah Renaudin
 
Silk Performer Presentation v1
Silk Performer Presentation v1Silk Performer Presentation v1
Silk Performer Presentation v1
Sun Technlogies
 
Web Test Automation with Selenium
Web Test Automation with SeleniumWeb Test Automation with Selenium
Web Test Automation with Selenium
vivek_prahlad
 
Automation Testing using Selenium
Automation Testing using SeleniumAutomation Testing using Selenium
Automation Testing using Selenium
Naresh Chintalcheru
 
Continuous Delivery With Selenium Grid And Docker
Continuous Delivery With Selenium Grid And DockerContinuous Delivery With Selenium Grid And Docker
Continuous Delivery With Selenium Grid And Docker
Barbara Gonzalez
 
Mobile Application Testing
Mobile Application TestingMobile Application Testing
Mobile Application Testing
Sun Technlogies
 
Selenium Basics Tutorial
Selenium Basics TutorialSelenium Basics Tutorial
Selenium Basics Tutorial
Clever Moe
 
BDD with JBehave and Selenium
BDD with JBehave and SeleniumBDD with JBehave and Selenium
BDD with JBehave and Selenium
Nikolay Vasilev
 
Behavior Driven Development and Automation Testing Using Cucumber
Behavior Driven Development and Automation Testing Using CucumberBehavior Driven Development and Automation Testing Using Cucumber
Behavior Driven Development and Automation Testing Using Cucumber
KMS Technology
 
HTML, CSS and Java Scripts Basics
HTML, CSS and Java Scripts BasicsHTML, CSS and Java Scripts Basics
HTML, CSS and Java Scripts Basics
Sun Technlogies
 
Automated Web Testing using JavaScript
Automated Web Testing using JavaScriptAutomated Web Testing using JavaScript
Automated Web Testing using JavaScript
Simon Guest
 
Selenium介绍
Selenium介绍Selenium介绍
Selenium介绍
lory hou
 
Git and GitHub for Testers
Git and GitHub for TestersGit and GitHub for Testers
Git and GitHub for Testers
Josiah Renaudin
 
Ad

Similar to Selenium (20)

selenium.ppt
selenium.pptselenium.ppt
selenium.ppt
rajnexient
 
selenium.ppt
selenium.pptselenium.ppt
selenium.ppt
AmenSheikh
 
selenium.ppt
selenium.pptselenium.ppt
selenium.ppt
ssuser7b4894
 
Selenium
SeleniumSelenium
Selenium
Purna Chandar
 
By combining Selenium for frontend testing and tools
By combining Selenium for frontend testing and toolsBy combining Selenium for frontend testing and tools
By combining Selenium for frontend testing and tools
sivanandhumanickam84
 
Selenium
SeleniumSelenium
Selenium
husnara mohammad
 
Web UI Tests: Introduce UI tests using Selenium
Web UI Tests: Introduce UI tests using Selenium Web UI Tests: Introduce UI tests using Selenium
Web UI Tests: Introduce UI tests using Selenium
Peyman Fakharian
 
Selenium training
Selenium trainingSelenium training
Selenium training
Suresh Arora
 
Selenium testing - Handle Elements in WebDriver
Selenium testing - Handle Elements in WebDriver Selenium testing - Handle Elements in WebDriver
Selenium testing - Handle Elements in WebDriver
Vibrant Technologies & Computers
 
Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!
Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!
Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!
Puneet Kala
 
#2 integration + ui tests
#2 integration + ui tests#2 integration + ui tests
#2 integration + ui tests
eleksdev
 
Mastering Test Automation: How To Use Selenium Successfully
Mastering Test Automation: How To Use Selenium SuccessfullyMastering Test Automation: How To Use Selenium Successfully
Mastering Test Automation: How To Use Selenium Successfully
SpringPeople
 
Selenium Introduction by Sandeep Sharda
Selenium Introduction by Sandeep ShardaSelenium Introduction by Sandeep Sharda
Selenium Introduction by Sandeep Sharda
Er. Sndp Srda
 
QA Fest 2014. Ярослав Пернеровский. Appium - два в одном. рецепт приготовлени...
QA Fest 2014. Ярослав Пернеровский. Appium - два в одном. рецепт приготовлени...QA Fest 2014. Ярослав Пернеровский. Appium - два в одном. рецепт приготовлени...
QA Fest 2014. Ярослав Пернеровский. Appium - два в одном. рецепт приготовлени...
QAFest
 
Selenium
SeleniumSelenium
Selenium
Daksh Sharma
 
Karate _Framework.ppt
Karate _Framework.pptKarate _Framework.ppt
Karate _Framework.ppt
SamKhan531862
 
Selenium.pptx
Selenium.pptxSelenium.pptx
Selenium.pptx
Pandiya Rajan
 
Selenium -Test automation for web applications
Selenium -Test automation for web applicationsSelenium -Test automation for web applications
Selenium -Test automation for web applications
AnisGhelissi
 
Selenium Webdriver Interview Questions
Selenium Webdriver Interview QuestionsSelenium Webdriver Interview Questions
Selenium Webdriver Interview Questions
Jai Singh
 
Selenium Automation Testing Interview Questions And Answers
Selenium Automation Testing Interview Questions And AnswersSelenium Automation Testing Interview Questions And Answers
Selenium Automation Testing Interview Questions And Answers
Ajit Jadhav
 
By combining Selenium for frontend testing and tools
By combining Selenium for frontend testing and toolsBy combining Selenium for frontend testing and tools
By combining Selenium for frontend testing and tools
sivanandhumanickam84
 
Web UI Tests: Introduce UI tests using Selenium
Web UI Tests: Introduce UI tests using Selenium Web UI Tests: Introduce UI tests using Selenium
Web UI Tests: Introduce UI tests using Selenium
Peyman Fakharian
 
Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!
Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!
Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!
Puneet Kala
 
#2 integration + ui tests
#2 integration + ui tests#2 integration + ui tests
#2 integration + ui tests
eleksdev
 
Mastering Test Automation: How To Use Selenium Successfully
Mastering Test Automation: How To Use Selenium SuccessfullyMastering Test Automation: How To Use Selenium Successfully
Mastering Test Automation: How To Use Selenium Successfully
SpringPeople
 
Selenium Introduction by Sandeep Sharda
Selenium Introduction by Sandeep ShardaSelenium Introduction by Sandeep Sharda
Selenium Introduction by Sandeep Sharda
Er. Sndp Srda
 
QA Fest 2014. Ярослав Пернеровский. Appium - два в одном. рецепт приготовлени...
QA Fest 2014. Ярослав Пернеровский. Appium - два в одном. рецепт приготовлени...QA Fest 2014. Ярослав Пернеровский. Appium - два в одном. рецепт приготовлени...
QA Fest 2014. Ярослав Пернеровский. Appium - два в одном. рецепт приготовлени...
QAFest
 
Karate _Framework.ppt
Karate _Framework.pptKarate _Framework.ppt
Karate _Framework.ppt
SamKhan531862
 
Selenium -Test automation for web applications
Selenium -Test automation for web applicationsSelenium -Test automation for web applications
Selenium -Test automation for web applications
AnisGhelissi
 
Selenium Webdriver Interview Questions
Selenium Webdriver Interview QuestionsSelenium Webdriver Interview Questions
Selenium Webdriver Interview Questions
Jai Singh
 
Selenium Automation Testing Interview Questions And Answers
Selenium Automation Testing Interview Questions And AnswersSelenium Automation Testing Interview Questions And Answers
Selenium Automation Testing Interview Questions And Answers
Ajit Jadhav
 
Ad

More from Sun Technlogies (9)

HyperText Markup Language - HTML
HyperText Markup Language - HTMLHyperText Markup Language - HTML
HyperText Markup Language - HTML
Sun Technlogies
 
Extended Finite State Machine - EFSM
Extended Finite State Machine - EFSMExtended Finite State Machine - EFSM
Extended Finite State Machine - EFSM
Sun Technlogies
 
Cascading Style Sheets - CSS
Cascading Style Sheets - CSSCascading Style Sheets - CSS
Cascading Style Sheets - CSS
Sun Technlogies
 
Core java
Core javaCore java
Core java
Sun Technlogies
 
Automation Testing
Automation TestingAutomation Testing
Automation Testing
Sun Technlogies
 
Devops
DevopsDevops
Devops
Sun Technlogies
 
QTest
QTest QTest
QTest
Sun Technlogies
 
Array and functions
Array and functionsArray and functions
Array and functions
Sun Technlogies
 
Sikuli
SikuliSikuli
Sikuli
Sun Technlogies
 

Recently uploaded (20)

What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
Andre Hora
 
How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...
How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...
How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...
Egor Kaleynik
 
Explaining GitHub Actions Failures with Large Language Models Challenges, In...
Explaining GitHub Actions Failures with Large Language Models Challenges, In...Explaining GitHub Actions Failures with Large Language Models Challenges, In...
Explaining GitHub Actions Failures with Large Language Models Challenges, In...
ssuserb14185
 
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
F-Secure Freedome VPN 2025 Crack Plus Activation  New VersionF-Secure Freedome VPN 2025 Crack Plus Activation  New Version
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
saimabibi60507
 
Societal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainabilitySocietal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainability
Jordi Cabot
 
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
steaveroggers
 
EASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License CodeEASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License Code
aneelaramzan63
 
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
AxisTechnolabs
 
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and CollaborateMeet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Maxim Salnikov
 
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Andre Hora
 
Revolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptxRevolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptx
nidhisingh691197
 
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Eric D. Schabell
 
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage DashboardsAdobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
BradBedford3
 
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Lionel Briand
 
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New VersionPixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
saimabibi60507
 
FL Studio Producer Edition Crack 2025 Full Version
FL Studio Producer Edition Crack 2025 Full VersionFL Studio Producer Edition Crack 2025 Full Version
FL Studio Producer Edition Crack 2025 Full Version
tahirabibi60507
 
Exploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the FutureExploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the Future
ICS
 
Designing AI-Powered APIs on Azure: Best Practices& Considerations
Designing AI-Powered APIs on Azure: Best Practices& ConsiderationsDesigning AI-Powered APIs on Azure: Best Practices& Considerations
Designing AI-Powered APIs on Azure: Best Practices& Considerations
Dinusha Kumarasiri
 
Download Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With LatestDownload Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With Latest
tahirabibi60507
 
Adobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest VersionAdobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest Version
kashifyounis067
 
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
Andre Hora
 
How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...
How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...
How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...
Egor Kaleynik
 
Explaining GitHub Actions Failures with Large Language Models Challenges, In...
Explaining GitHub Actions Failures with Large Language Models Challenges, In...Explaining GitHub Actions Failures with Large Language Models Challenges, In...
Explaining GitHub Actions Failures with Large Language Models Challenges, In...
ssuserb14185
 
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
F-Secure Freedome VPN 2025 Crack Plus Activation  New VersionF-Secure Freedome VPN 2025 Crack Plus Activation  New Version
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
saimabibi60507
 
Societal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainabilitySocietal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainability
Jordi Cabot
 
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
steaveroggers
 
EASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License CodeEASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License Code
aneelaramzan63
 
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
AxisTechnolabs
 
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and CollaborateMeet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Maxim Salnikov
 
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Andre Hora
 
Revolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptxRevolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptx
nidhisingh691197
 
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Eric D. Schabell
 
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage DashboardsAdobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
BradBedford3
 
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Lionel Briand
 
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New VersionPixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
saimabibi60507
 
FL Studio Producer Edition Crack 2025 Full Version
FL Studio Producer Edition Crack 2025 Full VersionFL Studio Producer Edition Crack 2025 Full Version
FL Studio Producer Edition Crack 2025 Full Version
tahirabibi60507
 
Exploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the FutureExploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the Future
ICS
 
Designing AI-Powered APIs on Azure: Best Practices& Considerations
Designing AI-Powered APIs on Azure: Best Practices& ConsiderationsDesigning AI-Powered APIs on Azure: Best Practices& Considerations
Designing AI-Powered APIs on Azure: Best Practices& Considerations
Dinusha Kumarasiri
 
Download Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With LatestDownload Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With Latest
tahirabibi60507
 
Adobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest VersionAdobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest Version
kashifyounis067
 

Selenium

  • 2. Outline  Uniqueness of web app testing  Heterogonous system  Dynamic pages  Load  Security  Selenium WebDriver  Course project 4
  • 3. Web application architecture  Heterogeneous system  Front end  Browser: IE, Firefox, Chrome, Safari…  Server side  Application Server  Database Server  File System  ……
  • 4. Heterogeneous system  Front end  HTML, JavaScript, Adobe Flash…… HTMLHTML JavaScriptJavaScript Page in BrowserPage in Browser Source behindSource behind
  • 5. Uniqueness 1: Heterogeneous system  Server side  Can be written in PHP, Java, C#...  Communicate with Database server in SQL PHP ScriptPHP Script SQLSQL HTMLHTML SQLSQL PHPPHP
  • 6. Heterogeneous system  Should test all involved parts  Everything can go wrong…  However, only front end is accessible for tests  Can not directly test the Server code and SQL  Have to drive the execution and test  Frontend  HTML: Malformed HTML page? (demo)  JavaScript: Runtime Errors? (demo)  Server script  PHP, Java…: Runtime Errors? (demo)  SQL: Malformed SQL query string? (demo)
  • 7. Test from the front end  Good things  Hide the complexity of the backend  Uniformed interface  Can put a robot in the front end and automate the tests  Bad things  The front end is not trustable  Crafted malicious requests
  • 8. Good things of testing from the front end  Automated web app testing  Compare to commend-line program testing…  Sensitive to input values (the same)  GUI testing: event driven (the difference)  “Button A” then “Button B”  OK  “Button B” then “Button A”  FAIL  The robot should be able to  Provide input values  Simulate user actions  Selenium  A tool set automates web app testing across platforms  Can simulate user interactions in browser  Two components  Selenium IDE  Selenium WebDriver (aka. Selenium 2)
  • 9. Selenium IDE  Firefox extension  Easy record and replay  Debug and set breakpoints  Save tests in HTML, WebDriver and other formats.
  • 10. Selenium IDE test cases  Selenium saves all information in an HTML table format  Each record consists of:  Command – tells Selenium what to do (e.g. “open”, “type”, “click”, “verifyText”)  Target – tells Selenium which HTML element a command refers to (e.g. textbox, header, table)  Value – used for any command that might need a value of some kind (e.g. type something into a textbox)
  • 11. How to record/replay with Selenium IDE 1. Start recording in Selenium IDE 2. Execute scenario on running web application 3. Stop recording in Selenium IDE 4. Verify / Add assertions 5. Replay the test. Selenium IDE Demo……
  • 12. Bad things of testing from the front end  The front end is not trustable  Front end code can be accessed to anybody  They can infer the input parameters  Crafted requests!  Demo  Front end limits the length of the input values  Front end limits the content of the input values  Front end limits the combination of the input values
  • 13. Uniqueness 2: Dynamic pages  Client page is dynamic  It can change itself in the runtime  HTML can be modified by JavaScript  JavaScript can modify itself  Demo  Server script is dynamic  Client pages are constructed in the runtime  A same server script can produce completely different client pages  Demo  SchoolMate
  • 14. Uniqueness 3: Performance  Performance is crucial to the success of a web app  Recall the experience to register for a class in the first days of the semester…  Are the servers powerful enough?  Performance testing evaluates system performance under normal and heavy usage  Load testing  For expected concurrent number of users  Stress testing  To understand the upper limits of capacity  Performance testing can be automated
  • 15. Uniqueness 4: Security  Web app usually deals with sensitive info, e.g.  Credit card number  SSN  Billing / Shipping address  Security is the biggest concern  Security testing should simulate possible attacks
  • 16. Uniqueness 4: Security  SQL Injection  The untrusted input is used to construct dynamic SQL queries.  E.g, update my own password $str = "UPDATE users SET password = ” “ . $_POST['newPass’] . “” WHERE username =”“ . $_POST['username'] . “””; mysql_query( $str ); $_POST['newPass’] = pass, $_POST['username'] = me Query String: UPDATE users SET password = “pass” WHERE username =“me” $_POST['newPass’] = pass, $_POST['username'] = “ OR 1=1 -- Query String: UPDATE users SET password = “pass” WHERE username =“” OR 1=1 --” Normal CaseNormal Case AttackAttack PHP ScriptPHP Script
  • 17. Uniqueness 4: Security  Cross Site Scripting (XSS)  The untrusted input is used to construct dynamic HTML pages.  The malicious JS injected executes in victim’s browser  The malicious JS can steal sensitive info  Demo  Solution: Never trust user inputs  Design test cases to simulate attacks
  • 18. Outline  Uniqueness of web app testing  Heterogonous system  Dynamic pages  Load  Security  Selenium WebDriver  Course project 4
  • 19. Limitation of Selenium IDE  No multiple browsers support  It runs only in Mozilla Firefox.  No manual scripts  E.g. conditions and Loops for Data Driven Testing  Fancy test cases  Selenium WebDriver
  • 20. Selenium WebDriver (Selenium 2)  Selenium-WebDriver  A piece of program  Control the browser by programming  More flexible and powerful  Selenium-WebDriver supports multiple browsers in multiple platforms  Google Chrome 12.0.712.0+  Internet Explorer 6+  Firefox 3.0+  Opera 11.5+  Android – 2.3+ for phones and tablets  iOS 3+ for phones  iOS 3.2+ for tablets
  • 21. Selenium WebDriver  WebDriver is designed to providing a simpler and uniformed programming interface  Same WebDriver script runs for different platforms  Support multiple programming language:  Java, C#, Python, Ruby, PHP, Perl…  It’s efficient  WebDriver leverages each browser’s native support for automation.
  • 22. What Selenium can do  A solution for the automated testing  Simulate user actions  Functional testing  Create regression tests to verify functionality and user acceptance.  Browser compatibility testing  The same script can run on any Selenium platform  Load testing  Stress testing
  • 23. How to use Selenium WebDriver (1) Go to a page (2) Locate an element (3) Do something with that element ...... (i) Locate an element (i+1) Do something with that element (i+2) Verify / Assert the result
  • 24. Demo: Verify page title public static void main( String[] args ) { // Create a new instance of the Firefox driver WebDriver driver = new FirefoxDriver(); // (1) Go to a page driver.get("http://www.google.com"); // (2) Locate an element WebElement element = driver.findElement(By.name("q")); // (3-1) Enter something to search for element.sendKeys("Purdue Univeristy"); // (3-2) Now submit the form. WebDriver will find the form for us from the element element.submit(); // (3-3) Wait up to 10 seconds for a condition WebDriverWait waiting = new WebDriverWait(driver, 10); waiting.until( ExpectedConditions.presenceOfElementLocated( By.id("pnnext") ) ); // (4) Check the title of the page if( driver.getTitle().equals("purdue univeristy - Google Search") ) System.out.println("PASS"); else System.err.println("FAIL"); //Close the browser driver.quit(); }
  • 25. How to locate an element  By id  HTML: <div id="coolestWidgetEvah">...</div>  WebDriver: driver.findElement( By.id("coolestWidgetEvah") );  By name  HTML: <input name="cheese" type="text"/>  WebDriver: driver.findElement( By.name("cheese") );  By Xpath  HTML <html> <input type="text" name="example" /> <input type="text" name="other" /> </html>  WebDriver: driver.findElements( By.xpath("//input") );  There are plug-ins for firefox/chrome to automatically display the Xpath
  • 26. Time issue  There are delays between submitting a request and receiving the response  We can wait until the response page is loaded  Robot doesn’t know!  In WebDriver, sometimes it doesn’t work if  Submit a request  Verify the response immediately  Solution:  Simulate the wait. Wait until some HTML object appears  Demo
  • 27. Outline  What to test for a web application  Test web app with selenium  What’s Selenium?  Why Selenium?  How to use Selenium  Course project 4
  • 28. Course Project 4  Test a functionality without the source  The subject web application  “Add New Class” in “SchoolMate”
  • 29. Course Project 4  Part 1: overview  Design test cases against the requirement  The tests should consider  all possible cases  equivalence class partitioning  Implement Selenium WebDriver Script for “Add new class” Your testYour test casescases Your testYour test casescases Your WebDriverYour WebDriver test templatetest template Your WebDriverYour WebDriver test templatetest template inputinputinputinput outputoutputoutputoutput TestTest resultsresults TestTest resultsresults
  • 30. Part 1: requirement analysis  Requirement for values entered/selected  [R-1] Class Name : alphabets and numbers are allowed.  [R-2] Section Number : only numbers are allowed.  [R-3] Room Number : only numbers are allowed.  [R-4] Period Number : only numbers are allowed.  [R-5] All textbox fields : no Cross-Site Scripting (XSS) injection vulnerabilities.
  • 31. Part 1: requirement analysis  Requirement for the “add” function  After clicking the “Add class” button…  [R-6] The class record added is successfully shown in the table.  [R-7] The values are exactly the same as those were entered or selected.
  • 32. Part 1:Design testcases  For each requirement, design test cases  Only need test one field in each case  Do not need consider combinations of fileds  E.g.  [R-1] Class Name : alphabets and numbers are allowed.  You need consider all possible cases  Divide the test space and find the equivalence class  Alphabets  Numbers  ….  The test case format is defined  Test cases will be used as input to your WebDriver Script
  • 33. Part 1: Implement WebDriver Script  In WebDriver script, Simulate the user action  Navigate to the subject page  Enter values into textboxs based on input values  Select options based on input values  Click the “add class” button  Check the result against the requirements  Run all your test cases and report the results.
  • 34. Course Project 4  Part 2: Pair wise testing  Use an existing pair wise testing tool fire-eye  Largely you may reuse the WebDriver template in Part 1 Your testYour test casescases Your testYour test casescases Your WebDriverYour WebDriver test templatetest template Your WebDriverYour WebDriver test templatetest template inputinputinputinput outputoutputoutputoutput TestTest resultresult TestTest resultresult Test casesTest cases generatedgenerated Test casesTest cases generatedgenerated ConvertConvertConvertConvert
  • 35. Part 2: Generate test cases  Consider the combination of all textboxs/options  Use the existing tool, fire-eye, to generate test cases  Export the test case in “Nist form”  Parse and convert the exported test cases to the form that your WebDriver can accept  Run all pair-wise test cases  Report the result
  • 36. Part 2: Solution design  Selenium can do more …  Black Friday is coming, hot items can be sold in a few seconds  Can you leverage the automated tool and design a practical solution to score a super hot deal?  Explain  What’s the challenge  What’s the possible cases to handle and how?  In stock  Out of stock  Your shopping cart may be reset under what conditions…  How to add it into your shopping cart asap  How you are going to cooperate with the automated tool