Top Banner
T3 Test Automation 10/6/16 9:45 Automated Testing Using Selenium Presented by: Jin Reck Mutual of Omaha Insurance Brought to you by: 350 Corporate Way, Suite 400, Orange Park, FL 32073 8882688770 9042780524 [email protected] http://www.starwest.techwell.com/
49

Automated Testing Using Selenium

Jan 23, 2018

Download

Software

TechWell
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Automated Testing Using Selenium

       T3  Test  Automation  10/6/16  9:45            

Automated  Testing  Using  Selenium  Presented  by:    

 

  Jin  Reck      

Mutual  of  Omaha  Insurance    

Brought  to  you  by:        

   

   

350  Corporate  Way,  Suite  400,  Orange  Park,  FL  32073    888-­‐-­‐-­‐268-­‐-­‐-­‐8770  ·∙·∙  904-­‐-­‐-­‐278-­‐-­‐-­‐0524  -­‐  [email protected]  -­‐  http://www.starwest.techwell.com/      

 

       

Page 2: Automated Testing Using Selenium

Jin  Reck      A  lead  testing  engineer  at  Mutual  of  Omaha,  Jin  Reck  has  diverse  global  experience  with  multiple  Fortune  500  companies  within  the  technology,  telecommunications,  and  financial  domains.  Jin  spearheads  test  automation  for  Mutual  of  Omaha  by  developing  advanced  frameworks  that  emphasize  reusability  and  reduce  maintenance  efforts.  She  is  currently  responsible  for  strategic  delivery  of  client  engagements  for  QA/test  process  improvement,  test  automation  architecture,  test  development,  and  implementation.  Jin  specializes  in  delivering  testing  services  for  mobile  and  web  solutions,  test  automation,  and  load  and  performance  testing.  She  implements  automation  solutions  for  clients  using  both  commercial  and  open  source  tools.    

Page 3: Automated Testing Using Selenium

STARWEST

2016

Page 4: Automated Testing Using Selenium

About the Presenter • Jin Reck

o Test engineer and web developer

• “You love tests?"

"Well, yeah. There are questions and

answers. True or false, multiple choice,

essay. What's not to love?”

― Nora Roberts, Tribute

Page 5: Automated Testing Using Selenium

Automated

Testing Using

Selenium

Page 6: Automated Testing Using Selenium

We are here to talk about • Testing

• Automation – Selenium Grid, Jmeter

• Selenium

• Continuous Integration/Continuous

Delivery/DevOps - Jenkins, FisheyeCrucible

and Sonarqube

Page 7: Automated Testing Using Selenium

Testing Software • Software testing is a process used to identify

the correctness, completeness and quality

of developed computer software. It includes

a set of activities conducted with the intent

of finding errors in software so that it could

be corrected before the product is released

to the end users

Page 8: Automated Testing Using Selenium

Why is Testing Important? • Software testing is any activity aimed at

evaluating an attribute or capability of a

program or system and determining that it

meets its required results

• Although crucial to software quality and

widely deployed by programmers and

testers, software testing still remains an art,

due to limited understanding of the

principles of software

Page 9: Automated Testing Using Selenium

Why is Testing Important? • Software bugs can be very expensive and

Dangerous

• Software testing is important to deliver the

best possible application

• Current Methods:

oManual

o 3rd Party Vendor Application

Page 10: Automated Testing Using Selenium

Testing - Impact • We need an optimal amount of testing

based on the risk assessment of the

application

• Testing either too much or too little could be

costly for the company

• We need an optimal amount of testing

based on the risk assessment of the

application--over-testing or under-testing

are not recommended

Page 11: Automated Testing Using Selenium

Automation • The difficulty with software testing stems from

the complexity of software:

oWe can not completely test a program

with moderate complexity. Testing is more

than just debugging.

o The purpose of testing can be quality

assurance, verification and validation, or

reliability estimation. Testing can be used

as a generic metric as well.

Page 12: Automated Testing Using Selenium

Automation o User Interface testing

• Simulate user actions

o Functional testing

• Create regression tests to verify

functionality and user acceptance

o Browser compatibility testing

• The same script can run on any

Selenium platform

o Load testing

o Stress testing

Page 13: Automated Testing Using Selenium

Manual test VS Automated

test

Page 14: Automated Testing Using Selenium
Page 15: Automated Testing Using Selenium
Page 16: Automated Testing Using Selenium
Page 17: Automated Testing Using Selenium
Page 18: Automated Testing Using Selenium

Automation - Why • There are many different devices, browsers,

and operating systems that could behave

differently when our websites/applications

are run on them

• Testing on multiple devices, browsers,

operating systems can help ensure our

website works for as many users as possible

Page 19: Automated Testing Using Selenium

Automation - Why • Web apps usually deal with sensitive info,

e.g.

oCredit card numbers

o SSNs

o Billing / Shipping addresses

• Security one of the biggest concerns

• Security testing should simulate possible

attacks

Page 20: Automated Testing Using Selenium

Automation - Impact • There’s always a chance that a user will do

what you least expect – no matter how unlikely it seems

• Testing can uncover bugs, the tricky part is figuring out where fixing bugs falls among project management priorities

• Software testing is a trade-off between budget, time and quality

Page 21: Automated Testing Using Selenium

Automation - Impact • Software testing is important to deliver the

best possible application

• We owe it to our users and ourselves to deliver the best applications possible

• Ultimately, we need software testing to ensure our websites or apps are something we can be proud of and have confidence in

Page 22: Automated Testing Using Selenium

Automation - Impact • Performance is crucial to the success of a

web application

• Performance testing evaluates system

performance under normal and heavy

usage

• Performance testing can be automated

Page 23: Automated Testing Using Selenium

What is Selenium • What is selenium

• Chemical symbol - Se

• Atomic number - 34

• Atomic mass – 78.96

• Melting point – 428.9F

• Element classification – Non-Metal

• Crystal structure - Hexagonal

Page 24: Automated Testing Using Selenium

Selenium • Jason Huggins and team from ThoughtWorks

Inc. developed the testing tool in 2004

• Huggins joked about competitor HP Mercury

tools saying to cure mercury poisoning by

taking selenium supplements

Page 25: Automated Testing Using Selenium

Selenium • Selenium is an open source bowser based

test automation software

• Selenium is a robust suite of tools which

supports rapid development of test

automation for web-based applications

• Works anywhere Java script is supported

• Hooks for many other languages – Java,

Ruby, python

Page 26: Automated Testing Using Selenium

Selenium • Selenium:

o Extensible framework

o Supports mobile testing Android/IOS

oCan write test cases using language of

choice Java, C#, Python, Ruby & HTML

o Supports native browser testing

Page 27: Automated Testing Using Selenium

• Selenium is a tool set that automates web application testing across platforms

• Selenium can simulate user interactions in a browser

• Functional testing

• Create regression tests to verify functionality and user acceptance

• Browser compatibility testing

• The same script can run on any Selenium platform

Page 28: Automated Testing Using Selenium

• Firefox extension

• Easy record and replay

• Debug and set breakpoints

• Save tests in HTML,

Web driver and other

formats.

Page 29: Automated Testing Using Selenium

• Selenium saves all information in an HTML table format

• Each record consists of:

o Command – tells Selenium what to do (e.g. “open”, “type”, “click”, “verifyText”)

o Target – tells Selenium which HTML element a command refers to (e.g. textbox, header, table)

o Value – used for any command that might need a value of some kind (e.g. type something into a textbox)

Page 30: Automated Testing Using Selenium

• Selenium-Web driver

o Control the browser by programming

o More flexible and powerful

• Selenium-Web driver supports multiple browsers in multiple platforms

o Google Chrome 12.0.712.0+

o Internet Explorer 6+

o Firefox 3.0+

o Opera 11.5+

o Android – 2.3+ for phones and tablets

o iOS 3+ for phones

o iOS 3.2+ for tablets

Page 31: Automated Testing Using Selenium

Pros of Selenium • Possible to move testing from QA to Dev team

as part of unit testing

• Integration with most Continuous Integration systems

• Easy to integrate test with development language

• More control over the framework because of language choices

• Possible to implement scalable testing using the cloud/grid

• Faster execution

Page 32: Automated Testing Using Selenium

Cons of Selenium • IE driver uses JavaScript simulated XPATH

• Scripts working in Firefox and Chrome may not work in IE without some additional code

• No tools like Data Table for data driving test

• No Object Repository to store object mappings

• No object types in Selenium. Only Web Element and Select

• Table and other common HTML elements need extra code to work

• Different browsers may exhibit different issues on operations

• Higher development effort for initial few months

• NOTE: Many of these Cons are more of minor technical inconveniences than true “Cons”

Page 33: Automated Testing Using Selenium

Selenium How

Page 34: Automated Testing Using Selenium

Selenium How

Page 35: Automated Testing Using Selenium

DevOps The DevOps approach seeks to meld

application development and deployment

into a more streamlined process, shifting some

of the operation team’s responsibilities back to

the development team in order to facilitate:

continuous development, continuous

integration, continuous delivery and

continuous monitoring processes

Page 36: Automated Testing Using Selenium

• Continuous Integration basically just means

that the developer's working copies are

synchronized with a shared mainline several

times a day

Page 37: Automated Testing Using Selenium

• Continuous Delivery is described as the

logical evolution of continuous integration:

Always be able to put a product into

production

Page 38: Automated Testing Using Selenium

• Continuous Deployment is described as the

logical next step after continuous delivery:

Automatically deploy the product into

production whenever it passes QA

Page 39: Automated Testing Using Selenium
Page 40: Automated Testing Using Selenium
Page 41: Automated Testing Using Selenium
Page 42: Automated Testing Using Selenium
Page 43: Automated Testing Using Selenium
Page 44: Automated Testing Using Selenium
Page 45: Automated Testing Using Selenium
Page 46: Automated Testing Using Selenium
Page 47: Automated Testing Using Selenium

Review • Testing

• Automation – Selenium Grid, Jmeter

• Selenium

• Continuous Integration/Continuous

Delivery/DevOps - Jenkins, FisheyeCrucible

and Sonarqube

• Review

Page 48: Automated Testing Using Selenium

Questions?

Page 49: Automated Testing Using Selenium

Thank you