¡ ¡ ¡ ¡ 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 ¡-‑ ¡info@techwell.com ¡-‑ ¡http://www.starwest.techwell.com/ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡
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. ¡ ¡
STARWEST 2016
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
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
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
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
Why is Testing Important? • Software bugs can be very expensive and Dangerous • Software testing is important to deliver the best possible application • Current Methods: o Manual o 3 rd Party Vendor Application
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
Automation • The difficulty with software testing stems from the complexity of software: o We 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.
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
Manual test VS Automated test
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
Automation - Why • Web apps usually deal with sensitive info, e.g. o Credit card numbers o SSNs o Billing / Shipping addresses • Security one of the biggest concerns • Security testing should simulate possible attacks
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
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
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
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
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
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
Selenium • Selenium: o Extensible framework o Supports mobile testing Android/IOS o Can write test cases using language of choice Java, C#, Python, Ruby & HTML o Supports native browser testing
• 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
• Firefox extension • Easy record and replay • Debug and set breakpoints • Save tests in HTML, Web driver and other formats.
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)
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
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
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”
Selenium How
Selenium How
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
• Continuous Integration basically just means that the developer's working copies are synchronized with a shared mainline several times a day
• Continuous Delivery is described as the logical evolution of continuous integration: Always be able to put a product into production
Recommend
More recommend