Sqs.com SQS – the world’s leading specialist in software quality Please copy a slide with a suitable picture from the file „Title Slides_EN.pptx“ (change.

Slides:



Advertisements
Similar presentations
Introduction to Java 2 Programming
Advertisements

Designing Reusable Frameworks for Test Automation
What’s New in Blackboard 9.1 SP 11.  Blackboard 9.1 SP11 takes Blackboard closer to the cloud and introduces a modernized user interface more in line.
Key-word Driven Automation Framework Shiva Kumar Soumya Dalvi May 25, 2007.
MP IP Strategy Stateye-GUI Provided by Edotronik Munich, May 05, 2006.
Web Applications Development Using Coldbox Platform Eddie Johnston.
© by Pearson Education, Inc. All Rights Reserved.
CREATING A PRESENTATION AND ADDING FEATURES. POSITIVE USES OF POWERPOINT Good at presenting things visually  Charts, graphs, etc. Easy to create  Can.
1 Introduction to the Visual Studio.NET IDE Powerpoint slides modified from Deitel & Deitel.
Slide 1 FastFacts Feature Presentation 12/16/2014 To dial in, use this phone number and participant code… Phone number: Participant code:
The University of Adelaide Table Talk: Using tables in Word Peter Murdoch March 2014 PREPARING GOOD LOOKING DOCUMENTS.
Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department.
Power Point Presentation - Advanced Julia J. Stahl Distributed System Specialist.
6 th Annual Focus Users’ Conference Application Editor and Form Builder Presented by: Mike Morris.
Selenium – Testing Tool. What is Selenium? Selenium is a robust set of tools that supports rapid development of test automation for web-based applications.
2. Introduction to the Visual Studio.NET IDE 2. Introduction to the Visual Studio.NET IDE Ch2 – Deitel’s Book.
Android Application Development 2013 PClassic Chris Murphy 1.
Open source administration software for education next generation student system Using the Kuali Student Configurable User Interaction Model & Framework.
Sikuli Ivailo Dinkov QA Engineer PhoneX Team Telerik QA Academy.
WorkPlace Pro Utilities.
Software Quality Assurance QA Engineering, Testing, Bug Tracking, Test Automation Software University Technical Trainers SoftUni Team.
Fall, Privacy&Security - Virginia Tech – Computer Science Click to edit Master title style Design Extensions to Google+ CS6204 Privacy and Security.
© 2012 LogiGear Corporation. All Rights Reserved Robot framework.
Washington Campus Compact New Time Log Database Note to users: You should use Internet Explorer to use this database. In other programs (i.e. Firefox)
242/102/49 0/51/59 181/172/166 Primary colors 248/152/29 PMS 172 PMS 137 PMS 546 PMS /206/ /227/ /129/123 Secondary colors 114/181/204.
Software Engineering 2003 Jyrki Nummenmaa 1 CASE Tools CASE = Computer-Aided Software Engineering A set of tools to (optimally) assist in each.
Amber Annett David Bell October 13 th, What will happen What is this business about personal web pages? Designated location of your own web page.
IE 411/511: Visual Programming for Industrial Applications
Creating a presentation and adding features. Positive Uses of PowerPoint Good at presenting things visually ◦ Charts, graphs, etc. Easy to create ◦ Can.
Lecture Set 2 Part B – Configuring Visual Studio; Configuration Options and The Help System (scan quickly for future reference)
HTML Hyper Text Markup Language A simple introduction.
Exploring an Open Source Automation Framework Implementation.
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. word 2010 Chapter 3 Formatting Documents.
A TEST FRAMEWORK USING PROTRACTOR, CUCUMBER & CUCUMBER SANDWICH
Support.ebsco.com Introduction to EBSCOhost Tutorial.
Level 1 Tutorial Project How to put a movie player on your Weebly website using an HTML code.
Chapter 2 – Introduction to the Visual Studio .NET IDE
1 EndNote X2 Your Bibliographic Management Tool 29 September 2009 Humanities and Social Sciences Resource Teams.
® IBM Software Group © 2006 IBM Corporation Web JSF Overview – RBD Tooling – for Web Development This unit introduces you to the aspects of the RBD tooling.
Selenium January Selenium course content  Introduction (Session-1)Session-  Automation  What is automation testing  When to go for automation.
Mohit Anand, Software Engineer Adobe 1 Selecting GUI Automation Testing Tool for Mobile Domain.
PowerPoint: Animation Randy Graff HSC IT Center Training
TABLE OF CONTENTS 2014 BasmahAlQadheeb. What is a report? A report is a clearly structured document that presents information as clearly as possible.
© 2012 LogiGear Corporation. All Rights Reserved FitNesseFitNesse Authors: Nghia Pham 1.
Click the CCDT link on the EDUCE 104 homepage Accessing the Collaborative Curriculum Design Tool.
Selenium server By, Kartikeya Rastogi Mayur Sapre Mosheca. R
Test Automation Using Selenium Presented by: Shambo Ghosh Ankit Sachan Samapti Sinhamahapatra Akshay Kotawala.
Thank you for looking into Policy Manager Two for your Head Start program Teresa K. Wickstrom Senior Associate Center for Community Futures
Tata Consultancy Services1 WebDriver Basics Submitted By : Akhil K Gagan Deep Singh Naveenrajha H M Poornachandra Meduri Shubham Utsav Sunil Kumar G Vivek.
IE 411/511: Visual Programming for Industrial Applications Lecture Notes #2 Introduction to the Visual Basic Express 2010 Integrated Development Environment.
Testing Your Alfresco Add-ons Michael Suzuki Software Engineer.
Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.
Testing Your Alfresco Add-ons Michael Suzuki Software Engineer.
Introduction to EBSCOhost
Warm Up 8/27 Turn in your signed Safety Contract on the front table
Extended BDD Automation for Future Agile Applications
Testing Your Alfresco Add-ons
© Paradigm Publishing, Inc.
Introduction to EBSCOhost
HOW TO CREATE A CLASS Steps:
Monday 28th November 2016.
Introduction to EBSCOhost
Managing CPQ Performance Proactively
Tutorial Introduction to help.ebsco.com.
Presentation transcript:

sqs.com SQS – the world’s leading specialist in software quality Please copy a slide with a suitable picture from the file „Title Slides_EN.pptx“ (change to presentation mode to download) and paste it here. If necessary, apply the correct formatting by right-clicking and choosing “Layout  Title Slide“. „Title Slides_EN.pptx“ sqs.com SQS – the world’s leading specialist in software quality Chris Gormley and Mark McTaggart A Consultants Tale SQS Group Technical Services Centre (GTSC)

Schedule 2© SQS Group | A Consultants Tale | 2016 |  Introductions  Aim of talk  What we do  Common Issues in Automation  Custom Element Design  Code Examples  Demo  Q & A

What we do? 3© SQS Group | A Consultants Tale | 2016 | As test automation consultants we typically do the following.  Pre-sales meeting to discuss requirements and expectations  Conduct POC  Conduct Health Check  Make recommendations  Use SQS Automation framework  Enhance existing framework

Common Issues Encountered in a Selenium Framework 4© SQS Group | A Consultants Tale | 2016 | When working on automation projects we come across the following issues.  Not following Development best practices  DRY principles  No code reusability  No Coding Standards  Poor commenting and documentation  No Page Object Model  Not using Selenium Wait methods  Hardcoded data in Page Objects  No Source Control  No Reporting / Logging  Not wrapping Selenium elements  Automate too much front end

Layers of Test Automation 5© SQS Group | A Consultants Tale | 2016 |  Focus on a Test Automation Pyramid Strategy GUI Tests API or Service Tests Unit Tests ROI increasing Aut Team Dev Team

Where do we go from here? 6© SQS Group | A Consultants Tale | 2016 |

Custom Element Design Overview 7© SQS Group | A Consultants Tale | 2016 | Discuss how to wrap WebElements with functionality  Example of WebElement use  Issues encounter with standard WebElement use  What to consider before implementation  Writing wrappers and base wrappers  What interfaces to write and use  Custom element decorators Demo Demo of test running Example wrappers discussed

Example Web Element Use © SQS Group | A Consultants Tale | 2016 |8 Above displays 2 ways to capture objects Attempt to Capture Elements and use them in a Page Object

Risks of using “WebElement” © SQS Group | A Consultants Tale | 2016 |9 Risks Readability – E.G. Element type? Naming convention? Type Safety – Risk element misuse? Code duplication – Code that interacts with element repeated throughout page objects instead of once in wrapper

Risks of using “WebElement” cont… © SQS Group | A Consultants Tale | 2016 |10 Risks Custom methods – Specialist methods that interact with element can be stored in wrapper which would not be available as standard. Inconsistent behaviour – Different element interactions? Synchronisation – Sync has to be put into Page Objects?

Prerequisites © SQS Group | A Consultants Tale | 2016 |11 Where to start? Have a test plan (Can be just a few steps in order to get going) Pick a language, IDE etc… (Whatever your test team or preferably dev team is using) Have a Selenium project set up (WebDriver, Selenium lib) The suitability of Selenium has been established Create a basic page object and test case that executes

Research is key © SQS Group | A Consultants Tale | 2016 |12 Investigate? Does the GUI use generated code? instead of etc… Do dev’s have info on how screen objects/widgets are developed? Do the objects interactions need any workarounds? E.G. Select or drop down is actually a combination of div’s Is the GUI consistently developed? E.G. A Button is the same as another

Structure © SQS Group | A Consultants Tale | 2016 |13 Design element wrappers to maximise code reuse

© SQS Group | A Consultants Tale | 2016 |14 Wrapping is a simple way to provide functionality Firstly we create an Element interface to extend some of the public Selenium interfaces.

Create Base Element Wrapper © SQS Group | A Consultants Tale | 2016 |15 Base Element Should add common Web Element standard methods Remove any methods like click, sendkeys etc… Contains custom methods that should be available for all elements Synchronisation can be added

Create a Base Element and implement shared methods © SQS Group | A Consultants Tale | 2016 |16 Following DRY (Don’t Repeat Yourself) principles we create a Base Element to cover common functionality for our Elements.

Create Element Wrappers © SQS Group | A Consultants Tale | 2016 |17 Element Wrapper (Button, Text Input etc…) Create class that extends the base element you created Add specific methods tied to the Element type Can override Base Element methods if slight variations are required Synchronisation can also be added

Create Element wrappers – Select impl © SQS Group | A Consultants Tale | 2016 |18 Above displays a good example of functionality where a workaround in Page Objects would have to be duplicated. Different implementations of the below code could also cause inconsistency.

Use of Wrapped Elements © SQS Group | A Consultants Tale | 2016 |19 Element functionality is now wrapped and can be used within a Page Object

Modify Page Factory to accept our custom Element © SQS Group | A Consultants Tale | 2016 |20 Decorates for our Element type. List decorator would be required for List. We need to write a CustomFieldDecorator that extends DefaultFieldDecorator and override decorate

What to avoid? © SQS Group | A Consultants Tale | 2016 |21  Avoid test specific methods  Avoid hardcoding values where possible  Over engineering, keep it simple, no need for overly complicated wrappers. E.G. Inherit common methods from a base class.  No need to create multiple wrappers that do the same thing. E.G. Link, Button  Exposing methods that should be hidden from wrappers. E.G. A text input having access to Click etc…  Leaving Page Factory standard  Forget interfaces for wrappers

What else can I do? © SQS Group | A Consultants Tale | 2016 |22 Read the WebDriver code and see what is being created, things that can be enhanced are:  Custom annotations E.G. Exists or FindBy some other locator  Synchronisation added by writing new findElement methods  Whatever else is required for a project Write custom Element type for returning Lists

Recap © SQS Group | A Consultants Tale | 2016 |23  Create basic automation project using Page Object Model  Work out what Custom Elements (Wrappers) you need  Create a custom Element type to be used instead of WebElement  Create BaseElement for common methods  Create custom wrappers for each element and specific methods should be contained within E.G. click, setText etc…  Modify Page Factory to use our new Element  Don’t Repeat Yourself

sqs.com SQS – the world’s leading specialist in software quality Please copy a slide with a suitable picture from the file „Title Slides_EN.pptx“ (change to presentation mode to download) and paste it here. If necessary, apply the correct formatting by right-clicking and choosing “Layout  Title Slide“. „Title Slides_EN.pptx“ sqs.com SQS – the world’s leading specialist in software quality Demo SQS Solution Center

25 Questions? © SQS Group | A Consultants Tale | 2016 |

sqs.com SQS USA Inc Bond Street, Suite 100 Naperville, IL 60563, USA Phone: Fax: Thank you for your attention. SQS Belfast The Concourse Northern Ireland Science Park Belfast BT3 9DT

Appendix A - SQS Automation Services 27© SQS Group | A Consultants Tale | 2016 |  SQS Ireland has developed a range of competencies and supporting services for open source test automation

Appendix B - SQS Automation Framework 28© SQS Group | A Consultants Tale | 2016 |  The SQS Automation Framework is designed to be modular TESTNG TESTING FRAMEWORK SELENIUM CHROME APPLICATION SELENIUM GRID FireFox IE SQS LIBRARIES SQS LIBRARIES REPORTING (ReportNG) XML HANDLING FILE HANDLING DB FUNCTIONS DATA HANDLING JBEHAVE BDD SOLUTION PhantomJS APPIUM ANDROID iOS STORIES / STEPS PAGE OBJECTS WRAPPERS (incl. MOBILE) CUCUMBER ALLURE REPORTING IDE REST MAVEN REST API