Yauhen Kavaliou Andrei Palchys “We don’t need QA anymore” or Protractor.

Slides:



Advertisements
Similar presentations
Automated Web Performance Testing Before 5pm
Advertisements

1 Product Development, Environments & Testing Mobile Solutions.
Selenium HP Web Test Tool Training
Story-Based Test Automation Using Free Tools
JQuery. What is jQuery? jQuery is a fast, small, and feature-rich JavaScript library that simplifies HTML document traversing and manipulation event handling.
Presented by…. Group 2 1. Programming language 2Introduction.
SUNY Polytechnic Institute CS 490 – Web Design, AJAX, jQueryAngularJS AngularJS is a client-side JavaScript Framework for adding interactivity to HTML.
Philly.NET Hands-on Labs JAVASCRIPT SERIES. July 9: JavaScript Syntax Visual Studio ◦Projects ◦Editors ◦Debugging ◦Script blocks ◦Minification and bundling.
User Extensions, RC and Web Driver Anton Angelov QA Engineer SystemIntegrationTeam Telerik QA Academy Telerik QA Academy.
Fall, Privacy&Security - Virginia Tech – Computer Science Click to edit Master title style Design Extensions to Google+ CS6204 Privacy and Security.
Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.
Val Kravets, Luis Sanchez, Allen Chung, Phillip Anderson, Leyla Norooz, Brian Ramnarian, Todd Watson.
Testing Web applications. Selenium What is Selenium? Selenium is a suite of tools to automate web application testing across many platforms Tests run.
Unit and Functional Testing Your Flex Applications Mike Nimer Dir. Of Engineering nomee.com.
Tutorial 10 Programming with JavaScript
JavaScript Framework for Rich Apps in Every Browser Maura Wilder Joan Wortman
A TEST FRAMEWORK USING PROTRACTOR, CUCUMBER & CUCUMBER SANDWICH
Embedded Software SKKU 14 1 Sungkyunkwan University Tizen v2.3 Application Profiling & Debugging.
Testing Web Applications. Plan The presentation covers: Selenium framework Spring MVC Test framework HttpUnit framework.
Web Automation Testing With Selenium By Rajesh Kanade.
Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.
Automated Smoke Testing on the JVM with Geb João SILVA (GS-AIS-EB) 1st Forum 29th of September, 2015 e-Business Section AUTOMATED SMOKE.
JavaScript Framework for Rich Apps in Every Browser Maura Wilder Joan Wortman
Lec 19 Web Driver 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 19 Selenium Web Driver 11/4/
Coding environment infrastructure for efficient parallel computing Industrial Project
Mohit Anand, Software Engineer Adobe 1 Selecting GUI Automation Testing Tool for Mobile Domain.
JavaScript Unit Test by MinHo Kim (Dexter Developer Guide)
AJAX and REST. Slide 2 What is AJAX? It’s an acronym for Asynchronous JavaScript and XML Although requests need not be asynchronous It’s not really a.
EFFECTIVE QA PROCESS FOR PVC Prepared by:PVC QA Team.
Introduction to JavaScript MIS 3502, Spring 2016 Jeremy Shafer Department of MIS Fox School of Business Temple University 2/2/2016.
Testing Your Alfresco Add-ons Michael Suzuki Software Engineer.
Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.
丁建文 國立高雄應用科大資管系副教授 兼任計網中心軟體發展組組長 跨平台行動應用軟體開發技術 : HTML5 & Mobile JavaScript Framework 暨南大學.
SAFARI TEST AUTOMATION: NAVIGATING THROUGH THE JUNGLE BY KARAN KUMAR AND JAMES CHUONG.
Testing Your Alfresco Add-ons Michael Suzuki Software Engineer.
Ognjen Bajić Ana Roje Ivančić Ekobit Efficient Application Testing.
Using React, Drupal and Google Chrome to build an interactive kiosk + + =
Introduction of Selenium Eli Lu 2016/10/13. Outline What is selenium ? Selenium Projects Selenium Sponsors Easy to use Useful Feature & Tools Useful Links.
Web Programming Anselm Spoerri PhD (MIT) Rutgers University
BEHAVIOR DRIVEN DEVELOPMENT / TESTING (BDD)
Selenium HP Web Test Tool Training
TEST AUTOMATION IN BDD WAY
MIS 120 Test Planning.
Lesson 14: Web Scraping TopHat Attendance
Accessibility into Automation
Techniques and Practices for Testing Angular
Automated UI Testing with Seleno.
Automating GUI testing with Selenium WebDriver, Java and Eclipse
AJAX and REST.
Testing Your Alfresco Add-ons
UI-Performance Optimization by Identifying its Bottlenecks
Software Quality Assurance
JavaScript Basics Stephen Delaney
VISUAL AUTOMATED REGRESSION TESTING - Sriram Angajala
Galen - Automated testing of look and feel
Top 5 Front End Development Tools. 1. Sublime Text Sublime Text may be a super quick and have packed text and development editor. If you're about to be.
UNH Programming Assistance Center Automation
Automation for mobile apps Presenter: Nikita Mader
React Revived Web Driver IO for Testers
Advantages OF BDD Testing
Haden Jackson-Robbins
5 things you didn’t know you can BUILD with Microsoft Edge
Selenium vs Protractor
Selenium HP Web Test Tool Training
Web UI testing automation and Selenium
Secure Web Programming
DevOps Meetup | Test Automation | 3/19/2012
Open Source Tool Based Automation solution with Continuous Integration and end to end BDD Implementation Arun Krishnan - Automation Manager Maria Afzal-
Automated browser testing with Selenium and C#
Open Source Tool Based Automation solution with Continuous Integration and end to end BDD Implementation Arun Krishnan - Automation Manager Maria Afzal-
Presentation transcript:

Yauhen Kavaliou Andrei Palchys “We don’t need QA anymore” or Protractor

Sencha Touch 2 Cordova 5+ products (phone/tablet & ios/android) +3 years and 150k LoC Project

2 small teams 7 developers 5 manual QA 4 automation testers Team

Many changes every release Developers produces more code than QA (Manual and Auto) can test in 2 week sprint. There is a misbalance in maturity between Devs and QA

Experiment One dev team will develop and cover features with automation tests Automation tests will be written based on QA tests cases.

Selenium WebDriver

TestWebDriverBrowser API

JSON wire protocol POST /session/ /url { "url" : " }

ChromeDriver FirefoxDriver InternetExplorerDriver SafariDriver GhostDriver

Appium

Protractor is an end-to-end test framework for AngularJS JavaScript applications.

describe('rollingscopes.com', function () { it('check meetup name', function () { browser.get(' var text = element(by.css('.banner h1')).getText(); expect(text).toEqual('The Rolling Scopes #19'); }); Protractor provides nice abstraction on top of WebDriver API and uses Jasmine as a test framework

The WebDriver Control Flow var text = element(by.css('.banner h1')).getText(); expect(text).toEqual('The Rolling Scopes #19'); You write async code in sync way

Google Chrome and ChromeDriver

Jasmine Suits and Specs

describe( 'Suit Name', function(){ /*specs*/ }) it( 'Spec Name', function(){ /*expect*/ }, timeout) expect(a).toBe(b).not.toBe(b).toBeGreaterThan(b).toBeLessThan(b).toEqual(b).toBeDefined().toMatch(/\d+/g) …

Approaches - “Smart” automated tests - User as a config

{ login: 'user', password: 'password', preferences: { hasAccessToFeatures: false, isAdmin: true, hasAnalytics: false }, navigation: [ 'home', ‘settings' ] }

var specs = { setup: './Base/spec/Setup.js', … complete: './Base/spec/Complete.js' }; module.exports = { specs: specs, mandatory: [specs.setup, specs.login], full: [ specs.setup, { name: specs.home, allowed: '*', disabled: ['multipleDeals'] }, specs.settings, specs.complete ] }

Page Object

Before describe(‘angularjs homepage', function() { it('should greet the named user', function() { browser.get(' element(by.model('yourName')).sendKeys('Julie'); var greeting = element(by.binding('yourName')); expect(greeting.getText()).toEqual('Hello Julie!'); });

After describe('angularjs homepage', function() { it('should greet the named user', function() { var angularHomepage = new AngularHomepage(); angularHomepage.get(); angularHomepage.setName('Julie'); expect(angularHomepage.getGreeting()).toEqual('Hello Julie!');

Promises

Base components views util spec Project1 components config spec views Project2 components config spec views

browser.executeScript(string|Function, args) browser.executeScriptAsync(string|Function, args)

Utils - WaitFor method based on ExpectedConditions -Touch interactions and scrolling based on mouseEvents и scriptExecute - Specific methods for Sencha Touch, for example - scroll to selected Record and e.t.c.

var EC = protractor.ExpectedConditions; exports.waitFor = function (selector, time) { return browser.wait(EC.presenceOf(element(by.css(selector))), time || 10000); } exports.waitForVisibility = function (selector, time) { return browser.wait(EC.visibilityOf(element(by.css(selector))), time || 10000); } exports.waitForHidden = function (selector, time) { return browser.wait(EC.invisibilityOf(element(by.css(selector))), time || 10000); }}

11:06: INFO - Executing: [find elements: By.cssSelector:.main-container]) 11:06: INFO - Done: [find elements: By.cssSelector:.main-container] 11:06: INFO - Executing: [is enabled: 17 [[ChromeDriver: chrome on XP (fb89e8300a09af71aa37b0b5041c8052)] -> css selector:.main-container]]) 11:06: INFO - Done: [is enabled: 17 [[ChromeDriver: chrome on XP (fb89e8300a09af71aa37b0b5041c8052)] -> css selector:.main-container]]... it('App is ready', function() { //Util.waitFor(this.CSS.container) mainView.waitForLoading(); //browser.isElementPresent(by.css(this.CSS.container)) expect(mainView.isPresent()).toBe(true); });...

xtype support by.xtype = function (xtype) { return { findElementsOverride: function (driver, using, rootSelector) { return driver.findElements( by.xpath( + xtype + '")] | + xtype + '")]' ), rootSelector); }, toString: function toString() { return 'by.xtype("' + xtype + '")'; } };

Timeouts { allScriptTimeout : timeout } browser.manage().timeouts().implicitlyWait(timeout) jasmineNodeOpts.defaultTimeoutInterval = timeout it ('Spec Name', function(){ /*expect*/ }, timeout)

browser.sleep(timeout)

Plugins - Screenshot reporter - Console - Report …

Issues -Different speed of executing on different environments - Tough to debug - Why did my test fail? -WebDriver crashes -DOM manipulations in real-time - Invisible items

Debug Node-inspector

Conclusions