DevOps Meetup | Test Automation | 3/19/2012

Slides:



Advertisements
Similar presentations
J-Unit Framework.
Advertisements

Introduction To Java Objectives For Today â Introduction To Java â The Java Platform & The (JVM) Java Virtual Machine â Core Java (API) Application Programming.
Selenium HP Web Test Tool Training
Automated Testing Nathan Weiss April 23, Overview History of Testing Advantages to Automated Testing Types of Automated Testing Automated Testing.
© 2007 ADP 1 Java Capacity Planning & Performance Measurements Dr. Carl J. De Pasquale Electronic Numerical Integrator and Computer.
Automation using Selenium Authored & Presented by : Chinmay Sathe & Amit Prabhu Cybage Software Pvt. Ltd.
CSCI 224 Introduction to Java Programming. Course Objectives  Learn the Java programming language: Syntax, Idioms Patterns, Styles  Become comfortable.
ExtWebDriver Open Source Project Daniel Koo Latha Nagaraj Bryan Robbins 04/23/2014.
@2011 Mihail L. Sichitiu1 Android Introduction Platform Overview.
Selenium automated testing in Openbravo ERP Quality Assurance Webinar April 8th, 2010.
Customer Service and Support Sutherland Global Services Consultant Learning Services Microsoft Store.
Web Automation Testing With Selenium By Rajesh Kanade.
Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.
Selenium January Selenium course content  Introduction (Session-1)Session-  Automation  What is automation testing  When to go for automation.
Lec 19 Web Driver 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 19 Selenium Web Driver 11/4/
Introduction Selenium IDE is a Firefox extension that allows you to record, edit, and debug tests for HTML Easy record and playback Intelligent field selection.
Lec 18 Web with Selenium 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 16 Testing Web Applications 10/23/
Testing in Android. Methods Unit Testing Integration Testing System Testing Regression Testing Compatibility Testing Black Box (Functional) White Box.
 Automating the process of writing the automation code using Allay Test Tool.  Allay Test Tool generates test files in executable/running form.  Dev/Testers.
ScriptOnce™ & Best Practices. Agenda 2 Automation that works ScriptOnce –Minimal maintenance –Easy to add devices Robustness –Reliable Scripts - Minimize.
EFFECTIVE QA PROCESS FOR PVC Prepared by:PVC QA Team.
Selenium server By, Kartikeya Rastogi Mayur Sapre Mosheca. R
Tata Consultancy Services1 WebDriver Basics Submitted By : Akhil K Gagan Deep Singh Naveenrajha H M Poornachandra Meduri Shubham Utsav Sunil Kumar G Vivek.
- 1 - SeeTestAutomation Product Introduction SeeTest Product Suite.
Testing Your Alfresco Add-ons Michael Suzuki Software Engineer.
Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.
QA Online Training In QA Click Academy. Selenium is a test automation framework used to test web applications such as browsers. It consists of different.
Zhuhai Test Automation Overview Ryan Li Team lead of test automation Foglight QA.
Testing Your Alfresco Add-ons Michael Suzuki Software Engineer.
Windows App Studio Windows App Studio is the tool that makes it fast and easy to build Windows 10 apps. It’s accessible from any device with a browser.
BIT 286: Web Applications Automated Web Testing. Selenium  Selenium Is moving from being Firefox based to being more of a 'normal desktop' program that.
Arklio Studija 2007 File: / / Page 1 Automated web application testing using Selenium
Introduction of Selenium Eli Lu 2016/10/13. Outline What is selenium ? Selenium Projects Selenium Sponsors Easy to use Useful Feature & Tools Useful Links.
Why Selenium Server not required by means of Selenium Web driver?
Best Way to Learn Selenium Course in Online. Looking to learn best testing tool? If your preference is selenium testing then your choice is perfect. The.
Introduction to threads
Appium Studio Appium testing made easy at any scale.
Test Web applications using Selenium
RA-Team Supervisor: Tran Dinh Tri Member: Nguyen Hoang Duc(PM)
Selenium HP Web Test Tool Training
The Zen of UI Test Automation
Selenium and Selenium on Rails
Selenium HP Web Test Tool Training
JRA2: Acceptance Testing senarious
Testing with Selenium IDE
Selenium HP Web Test Tool Training
Mobile App Development
Automated UI Testing with Seleno.
Introduction of Selenium Webdriver Using Java
Automating GUI testing with Selenium WebDriver, Java and Eclipse
Why Selenide? Andrew Boyd.
Testing Your Alfresco Add-ons
Selenium Automation Framework
Software Quality Assurance
Lecture 1 Runtime environments.
Jama Options for Complex Testing variations
CMPE419 Mobile Application Development
Atit Leelasuksan Rungroj Maipradit
How to automate software with
Haden Jackson-Robbins
Introduction to Algorithm Design
Web UI testing automation and Selenium
Test Automation For Web-Based Applications
Login For Excellence Selenium Training In Chennai.
Selenium Tutorials Cheyat Training.
Designing For Testability
CMPE419 Mobile Application Development
Selenium IDE Installation and Use.
A complete Selenium Techstack –
Presentation transcript:

DevOps Meetup | Test Automation | 3/19/2012

Requirements and Purposes Open source tools Multiple browser and OS support Regression / functional tests Parallel execution Tool for easily write tests (long term)

Used software Selenium (webdriver) in Java TestNG (+ReportNG) from Ant Jenkins

Framework design Window driver pattern Locators / Translations / Fixtures WebElement locator strategy id > css ( > xpath) DynamicLocator

Framework design Organize tests by groups Own page factory pattern design Easy to read Test code Wrap what you can ("wait for" utilities) Report what you do

Framework design DLocator <WebElement name="GeneralVideoDiv"> <!-- This is a general locator for videos, can be used as a dynamic locator to address videos. --> <Locators> <css>#MyVideosList > li</css> <class>+ li</class> </Locators> </WebElement> <WebElement name="VideoSpecificVideoDiv"> <!-- This is a specific locator for a video, can be used as a dynamic locator to address videos. --> <css>#Video-VIDEO_ID</css> <value>VIDEO_ID</value> <WebElement name="VideoDivEditButton"> <!-- Edit button on a video div, can be used as second part of a dynamic locator. --> <css>button.button-bar.editButton</css>

Framework design TestCode /** * Tests error messages and text format in edit video overlay price field. */ @Test(description = "Tests video edit overlay functionalities", groups = { "PPVTests", "PPVVod" }) public void testVodEditVideoOverlay() { final int videoToEdit = 3; HeaderPage headerPage = getHeaderPage(); DashboardPage dashboardPage = getDashboardPage(); PPVEventUser ppvUser = userFactory.getPpvEventUser(); DynamicLocator editButton = dashboardPage.getDLocator("GeneralVideoDiv").append("VideoDivEditButton"); headerPage.loginUser(ppvUser.getName(), ppvUser.getPassword()); headerPage.openDashboard(); dashboardPage.loadManageYourShow(); dashboardPage.loadShowToManage(ppvUser.getVodPPVEventShowName()); dashboardPage.click("ShowYourVideos"); dashboardPage.waitForPageLoad(); dashboardPage.click(editButton, videoToEdit); dashboardPage.waitForAjaxRequestDone();

Framework design TestGrps <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" > <suite name="Social Pages Login Tests" verbose="1" parallel="tests" thread-count="4"> <test name="Social Pages Login Tests in Firefox" parallel="methods" thread-count="12"> <parameter name="browserName" value="Firefox" /> <parameter name="browserVersion" value="8" /> <groups> <run> <include name="SocialPagesLoginLogout" /> <exclude name="NotRunOnFirefox" /> </run> </groups> <packages> <package name="com.ustreamv3.tests" /> </packages> </test> <test name="Social Pages Login Tests in Chrome" parallel="methods" thread-count="12"> <parameter name="browserName" value="Chrome" /> <exclude name="NotRunOnChrome" />

Framework design Report

Flash Automation JsApi is our friend getProperty(...) setProperty(...) callMethod(...) addListener(...) Needs strong team cooperation

Flash Automation @Sequential(groupClasses = { MetricsUser.class }) @MultiBrowser @Test(description = "Tests the broadcast start and stop effect on channel page.") public void testBroadcastStartStop() { MetricsUser metricsUser = userFactory.getMetricsUser(); ShowPage showPage = getShowPage(); JsAPI viewerApi = getJsAPI(); showPage.openShowPage(metricsUser.getShowName()); viewerApi.checkProperty(ViewerProperties.IS_PLAYING, false); incrementSteps(); final int lastSession = startNewSession(); HeaderPage headerPage = getHeaderPage(lastSession); JsAPI bcApi = getJsAPI(lastSession); headerPage.loginUser(metricsUser.getName(), metricsUser.getPassword()); headerPage.openBroadcastConsole(); bcApi.checkProperty(BroadcasterProperties.IS_PUBLISHER_ACTIVE, true); bcApi.callMethod(BroadcasterMethods.START_BROADCAST); viewerApi.checkProperty(ViewerProperties.IS_PLAYING, true); bcApi.callMethod(BroadcasterMethods.STOP_BROADCAST); }

Dynamic vs static fixtures Dynamic fixture backdoor setup gui setup internal api setup Static fixture = manual shared fixture

Dynamic vs static fixtures Backdoor setup Pros full parallel fast setup accurate result Cons infrastructure maintenance

Dynamic vs static fixtures GUI setup Pros black-box test parallel Cons s l o w setup fragile

Dynamic vs static fixtures Internal API setup Pros can be fast parallel custom Cons development maintenance

Dynamic vs static fixtures Manual Shared Fixture Pros flexible fast test Cons sequential creation maintenance

Parallel execution Tests with multiple browser instances → sequential job execution Native events = one browser / VM IE = one instance / VM

Multiple browser support Safari 5.x with selenium → Fail IE webdriver = jvm killer app :(

Lessons learned seeing is believing be prepared for exceptional cases multiple browser = Firefox test a new selenium version before use clean up trash that selenium forgot to memory > cpu (cores > frequency)

Lessons learned Parallel is better than fast tests Tests must run on a daily basis Keep locators organized Automation must be planned carefully Keep tests in good health

Questions / comments ?

Thank you Happy testing!