QA Fest 2017. Александр Хотемской. Современные возможности в организации ProtractorJS фреймворка

Q
Welcome to presentation wizard
Modern Features in ProtractorJS framework
Oleksandr Khotemskyi 2017
• Async/Await – a hero we deserved
• Deprecation of control flow – what to do next?
• TypeScript – superset of javascript
• Blocking proxy – waitForAngular for everyone
• Webdriver-manager features
• Bonus
QA Fest 2017. Александр Хотемской. Современные возможности в организации ProtractorJS фреймворка
Asynchronous code
• Harder for humans, easier for computer
• Task does not wait for previous task to complete
• Order of tasks should be specified explicitly by callbacks
• Consumes much less resources than splitting to threads
• Asynchronous code allows to work with IO operations
much more efficiently
QA Fest 2017. Александр Хотемской. Современные возможности в организации ProtractorJS фреймворка
Tests are synchronous by their nature
• Each step in UI functional tests should be done in strict
order
• This requires “synchronization” approaches of
asynchronous code:
• Callbacks
• Promises chaining
• Generators
• Fibers, corutines
• Async/Await
• other
Control Flow
• WebdriverJS now uses variation of task queue approach
Control Flow
• Increased complexity – this module is 3300 lines of code
• One of the hardest thing to understand in WebdriverJS
• Hard to debug
QA Fest 2017. Александр Хотемской. Современные возможности в организации ProtractorJS фреймворка
Async/Await
• Native approach to synchronize your asynchronous
code
• Hides internal Promises based implementation
• Introduced as part of ECMAscript 7 specification
QA Fest 2017. Александр Хотемской. Современные возможности в организации ProtractorJS фреймворка
With control flow
Without Control Flow
Handling errors
Iterating
More functional style Iterating
How to enable
• NodeJS >7.8 or use Babel
• For TypeScript – async/await could be compiled to ES3
compatible code
• Set - SELENIUM_PROMISE_MANAGER: false in your
protractor config file
• DO NOT mix control flow and async/await code –
execution flow will be unpredictable
QA Fest 2017. Александр Хотемской. Современные возможности в организации ProtractorJS фреймворка
Control flow is deprecated
• https://github.com/SeleniumHQ/selenium/issues/2969
• Phase 1: allow users to optionally turn off of the
control flow
• Phase 2: (October 2017) users must turn on the control
flow
• Phase 3: (October 2018) removing the control flow
Be ready for deprecation
• Set - SELENIUM_PROMISE_MANAGER: true in your
protractor config file explicitly right now (or env variable
SELENIUM_PROMISE_MANAGER : 1)
• This will give you one year to migrate your code away
from control flow
• More instructions and tips here:
https://github.com/SeleniumHQ/selenium/wiki/WebDri
verJs#moving-to-asyncawait
SELENIUM_PROMISE_MANAGER
QA Fest 2017. Александр Хотемской. Современные возможности в организации ProtractorJS фреймворка
TypeScript lang
• Developed by Microsoft, open
source
• Compiles into JavaScript
• Optional types
• ProtractorJS written with
TypeScript
QA Fest 2017. Александр Хотемской. Современные возможности в организации ProtractorJS фреймворка
QA Fest 2017. Александр Хотемской. Современные возможности в организации ProtractorJS фреймворка
QA Fest 2017. Александр Хотемской. Современные возможности в организации ProtractorJS фреймворка
QA Fest 2017. Александр Хотемской. Современные возможности в организации ProtractorJS фреймворка
Private methods
Some features
• ES6 imports/exports
• async/await
• Mixins, Enums, Interfaces, Abstract Classes
• Iterators/Generators
• Generics
• Property/class/parameter decorators (experimental)
QA Fest 2017. Александр Хотемской. Современные возможности в организации ProtractorJS фреймворка
Blocking Proxy
• Automatically executes waitForAngular before any
selenium action. Blocks actions execution
• Works on network level, not language level
• Can highlight interactions
• Can additionally log requests
• Works with any language
Your tests
Selenium
Server
Browser
Blocking
Proxy
Driver
(2) Selenium action
(1) waitForAngular()
QA Fest 2017. Александр Хотемской. Современные возможности в организации ProtractorJS фреймворка
Webdriver-manager
• Can setup Android SDK and virtual mobile devices
https://github.com/angular/webdriver-
manager/blob/master/docs/mobile.md
• Can install Appium
• Can download and prepare any version of webdriver
and selenium-standalone server
• `clean` and `status` - are useful to check what happens
Useful links
• Modern generator with async/await, TS, and other:
https://github.com/Xotabu4/generator-modern-
protractor
• Some examples from this presentation -
https://github.com/Xotabu4/modern_protractor_demo
• Blocking-proxy - https://github.com/angular/blocking-
proxy
• Webdriver-manager -
https://github.com/angular/webdriver-manager
http://www.xotabu4.github.io
QA Fest 2017. Александр Хотемской. Современные возможности в организации ProtractorJS фреймворка
QA Fest 2017. Александр Хотемской. Современные возможности в организации ProtractorJS фреймворка
1 of 37

Recommended

Selenoid: browsers in containers by
Selenoid: browsers in containersSelenoid: browsers in containers
Selenoid: browsers in containersIvan Krutov
813 views57 slides
Selenoid by
SelenoidSelenoid
SelenoidDataArt
1.7K views27 slides
Scalable Selenium cluster: up and running by
Scalable Selenium cluster: up and runningScalable Selenium cluster: up and running
Scalable Selenium cluster: up and runningIvan Krutov
1.2K views55 slides
Mobile automation: a three act tragedy by
Mobile automation: a three act tragedyMobile automation: a three act tragedy
Mobile automation: a three act tragedyIvan Krutov
757 views47 slides
Jenkins & Selenium by
Jenkins & SeleniumJenkins & Selenium
Jenkins & Seleniumadamcarmi
2.3K views9 slides
Selenium Automation at Incapsula by
Selenium Automation at IncapsulaSelenium Automation at Incapsula
Selenium Automation at Incapsulaadamcarmi
1.6K views15 slides

More Related Content

What's hot

Parallel Testing with Python with Selenium and Sauce Labs by
Parallel Testing with Python with Selenium and Sauce LabsParallel Testing with Python with Selenium and Sauce Labs
Parallel Testing with Python with Selenium and Sauce LabsSauce Labs
3.1K views8 slides
Controlling the browser through python and selenium by
Controlling the browser through python and seleniumControlling the browser through python and selenium
Controlling the browser through python and seleniumPatrick Viafore
2.6K views45 slides
Selenium by
SeleniumSelenium
Seleniumconect2krish
1.5K views35 slides
Selenium by
SeleniumSelenium
SeleniumSatyam Pandey
348 views23 slides
Run Selenium Tests With Jenkins and BrowseEmAll by
Run Selenium Tests With Jenkins and BrowseEmAllRun Selenium Tests With Jenkins and BrowseEmAll
Run Selenium Tests With Jenkins and BrowseEmAllDaniel Herken
550 views15 slides
Smarter ways to do selenium automation @ work, Selenium, automation by
Smarter ways to do selenium automation @ work, Selenium, automationSmarter ways to do selenium automation @ work, Selenium, automation
Smarter ways to do selenium automation @ work, Selenium, automationRIA RUI Society
12.5K views33 slides

What's hot(20)

Parallel Testing with Python with Selenium and Sauce Labs by Sauce Labs
Parallel Testing with Python with Selenium and Sauce LabsParallel Testing with Python with Selenium and Sauce Labs
Parallel Testing with Python with Selenium and Sauce Labs
Sauce Labs3.1K views
Controlling the browser through python and selenium by Patrick Viafore
Controlling the browser through python and seleniumControlling the browser through python and selenium
Controlling the browser through python and selenium
Patrick Viafore2.6K views
Run Selenium Tests With Jenkins and BrowseEmAll by Daniel Herken
Run Selenium Tests With Jenkins and BrowseEmAllRun Selenium Tests With Jenkins and BrowseEmAll
Run Selenium Tests With Jenkins and BrowseEmAll
Daniel Herken550 views
Smarter ways to do selenium automation @ work, Selenium, automation by RIA RUI Society
Smarter ways to do selenium automation @ work, Selenium, automationSmarter ways to do selenium automation @ work, Selenium, automation
Smarter ways to do selenium automation @ work, Selenium, automation
RIA RUI Society12.5K views
Selenium By Pravin Mishra by Pravin Mishra
Selenium By Pravin MishraSelenium By Pravin Mishra
Selenium By Pravin Mishra
Pravin Mishra1.4K views
Automation Testing by RomSoft SRL
Automation TestingAutomation Testing
Automation Testing
RomSoft SRL1.5K views
Selenium 2: The Future of Selenium is now! by AutomatedTester
Selenium 2: The Future of Selenium is now!Selenium 2: The Future of Selenium is now!
Selenium 2: The Future of Selenium is now!
AutomatedTester6.4K views
Victor Dyptan.Using Selenium IDE for automated testing.Drupal Camp Kyiv 2011 by camp_drupal_ua
Victor Dyptan.Using Selenium IDE for automated testing.Drupal Camp Kyiv 2011Victor Dyptan.Using Selenium IDE for automated testing.Drupal Camp Kyiv 2011
Victor Dyptan.Using Selenium IDE for automated testing.Drupal Camp Kyiv 2011
camp_drupal_ua2K views
Docker and Selenoid - Make Autotests Great Again by COMAQA.BY
Docker and Selenoid - Make Autotests Great Again Docker and Selenoid - Make Autotests Great Again
Docker and Selenoid - Make Autotests Great Again
COMAQA.BY 4.3K views
What type of testing is selenium commonly used for? by Serena Gray
What type of testing is selenium commonly used for?What type of testing is selenium commonly used for?
What type of testing is selenium commonly used for?
Serena Gray20 views
Cross browser testing by Sauce Labs
Cross browser testingCross browser testing
Cross browser testing
Sauce Labs3.5K views
Automated Web Testing With Selenium by Deepak Mittal
Automated Web Testing With SeleniumAutomated Web Testing With Selenium
Automated Web Testing With Selenium
Deepak Mittal2.1K views
An Overview of Selenium by adamcarmi
An Overview of SeleniumAn Overview of Selenium
An Overview of Selenium
adamcarmi3K views

Similar to QA Fest 2017. Александр Хотемской. Современные возможности в организации ProtractorJS фреймворка

Protractor survival guide by
Protractor survival guideProtractor survival guide
Protractor survival guideLászló Andrási
679 views25 slides
Continuous Integration for OpenVMS with Jenkins by
Continuous Integration for OpenVMS with JenkinsContinuous Integration for OpenVMS with Jenkins
Continuous Integration for OpenVMS with Jenkinsecubemarketing
909 views25 slides
Versioning for Developers by
Versioning for DevelopersVersioning for Developers
Versioning for DevelopersMichelangelo van Dam
1.4K views45 slides
Test automation proposal by
Test automation proposalTest automation proposal
Test automation proposalMihai-Cristian Fratila
1.2K views28 slides
AngularJS - Architecture decisions in a large project  by
AngularJS - Architecture decisionsin a large project AngularJS - Architecture decisionsin a large project 
AngularJS - Architecture decisions in a large project Elad Hirsch
3.5K views71 slides
QA Challenge Accepted 4.0 - Cypress vs. Selenium by
QA Challenge Accepted 4.0 - Cypress vs. SeleniumQA Challenge Accepted 4.0 - Cypress vs. Selenium
QA Challenge Accepted 4.0 - Cypress vs. SeleniumLyudmil Latinov
3.7K views21 slides

Similar to QA Fest 2017. Александр Хотемской. Современные возможности в организации ProtractorJS фреймворка(20)

Continuous Integration for OpenVMS with Jenkins by ecubemarketing
Continuous Integration for OpenVMS with JenkinsContinuous Integration for OpenVMS with Jenkins
Continuous Integration for OpenVMS with Jenkins
ecubemarketing909 views
AngularJS - Architecture decisions in a large project  by Elad Hirsch
AngularJS - Architecture decisionsin a large project AngularJS - Architecture decisionsin a large project 
AngularJS - Architecture decisions in a large project 
Elad Hirsch3.5K views
QA Challenge Accepted 4.0 - Cypress vs. Selenium by Lyudmil Latinov
QA Challenge Accepted 4.0 - Cypress vs. SeleniumQA Challenge Accepted 4.0 - Cypress vs. Selenium
QA Challenge Accepted 4.0 - Cypress vs. Selenium
Lyudmil Latinov3.7K views
Getting Started with Serverless Architectures by Amazon Web Services
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless Architectures
Amazon Web Services4.3K views
Ansible benelux meetup - Amsterdam 27-5-2015 by Pavel Chunyayev
Ansible benelux meetup - Amsterdam 27-5-2015Ansible benelux meetup - Amsterdam 27-5-2015
Ansible benelux meetup - Amsterdam 27-5-2015
Pavel Chunyayev875 views
CFWheels - Pragmatic, Beautiful Code by indiver
CFWheels - Pragmatic, Beautiful CodeCFWheels - Pragmatic, Beautiful Code
CFWheels - Pragmatic, Beautiful Code
indiver2.2K views
Magento 2 Workflows by Ryan Street
Magento 2 WorkflowsMagento 2 Workflows
Magento 2 Workflows
Ryan Street4.7K views
Building a document e-signing workflow with Azure Durable Functions by Joonas Westlin
Building a document e-signing workflow with Azure Durable FunctionsBuilding a document e-signing workflow with Azure Durable Functions
Building a document e-signing workflow with Azure Durable Functions
Joonas Westlin443 views
How do JavaScript frameworks impact the security of applications? by Ksenia Peguero
How do JavaScript frameworks impact the security of applications?How do JavaScript frameworks impact the security of applications?
How do JavaScript frameworks impact the security of applications?
Ksenia Peguero651 views
Play Framework and Activator by Kevin Webber
Play Framework and ActivatorPlay Framework and Activator
Play Framework and Activator
Kevin Webber4.1K views
Lecture05.pptx by MrVMNair
Lecture05.pptxLecture05.pptx
Lecture05.pptx
MrVMNair1 view
Building Awesome APIs with Lumen by Kit Brennan
Building Awesome APIs with LumenBuilding Awesome APIs with Lumen
Building Awesome APIs with Lumen
Kit Brennan1.3K views
Session 41 - Struts 2 Introduction by PawanMM
Session 41 - Struts 2 IntroductionSession 41 - Struts 2 Introduction
Session 41 - Struts 2 Introduction
PawanMM65 views
Struts 2 - Introduction by Hitesh-Java
Struts 2 - Introduction Struts 2 - Introduction
Struts 2 - Introduction
Hitesh-Java207 views
Azure Functions in Action #CodePaLOUsa by Baskar rao Dsn
Azure Functions in Action #CodePaLOUsaAzure Functions in Action #CodePaLOUsa
Azure Functions in Action #CodePaLOUsa
Baskar rao Dsn93 views

More from QAFest

QA Fest 2019. Сергій Короленко. Топ веб вразливостей за 40 хвилин by
QA Fest 2019. Сергій Короленко. Топ веб вразливостей за 40 хвилинQA Fest 2019. Сергій Короленко. Топ веб вразливостей за 40 хвилин
QA Fest 2019. Сергій Короленко. Топ веб вразливостей за 40 хвилинQAFest
979 views44 slides
QA Fest 2019. Анна Чернышова. Self-healing test automation 2.0. The Future by
QA Fest 2019. Анна Чернышова. Self-healing test automation 2.0. The FutureQA Fest 2019. Анна Чернышова. Self-healing test automation 2.0. The Future
QA Fest 2019. Анна Чернышова. Self-healing test automation 2.0. The FutureQAFest
931 views44 slides
QA Fest 2019. Doug Sillars. It's just too Slow: Testing Mobile application pe... by
QA Fest 2019. Doug Sillars. It's just too Slow: Testing Mobile application pe...QA Fest 2019. Doug Sillars. It's just too Slow: Testing Mobile application pe...
QA Fest 2019. Doug Sillars. It's just too Slow: Testing Mobile application pe...QAFest
322 views131 slides
QA Fest 2019. Катерина Спринсян. Параллельное покрытие автотестами и другие и... by
QA Fest 2019. Катерина Спринсян. Параллельное покрытие автотестами и другие и...QA Fest 2019. Катерина Спринсян. Параллельное покрытие автотестами и другие и...
QA Fest 2019. Катерина Спринсян. Параллельное покрытие автотестами и другие и...QAFest
336 views92 slides
QA Fest 2019. Никита Галкин. Как зарабатывать больше by
QA Fest 2019. Никита Галкин. Как зарабатывать большеQA Fest 2019. Никита Галкин. Как зарабатывать больше
QA Fest 2019. Никита Галкин. Как зарабатывать большеQAFest
389 views40 slides
QA Fest 2019. Сергей Пирогов. Why everything is spoiled by
QA Fest 2019. Сергей Пирогов. Why everything is spoiledQA Fest 2019. Сергей Пирогов. Why everything is spoiled
QA Fest 2019. Сергей Пирогов. Why everything is spoiledQAFest
342 views33 slides

More from QAFest(20)

QA Fest 2019. Сергій Короленко. Топ веб вразливостей за 40 хвилин by QAFest
QA Fest 2019. Сергій Короленко. Топ веб вразливостей за 40 хвилинQA Fest 2019. Сергій Короленко. Топ веб вразливостей за 40 хвилин
QA Fest 2019. Сергій Короленко. Топ веб вразливостей за 40 хвилин
QAFest979 views
QA Fest 2019. Анна Чернышова. Self-healing test automation 2.0. The Future by QAFest
QA Fest 2019. Анна Чернышова. Self-healing test automation 2.0. The FutureQA Fest 2019. Анна Чернышова. Self-healing test automation 2.0. The Future
QA Fest 2019. Анна Чернышова. Self-healing test automation 2.0. The Future
QAFest931 views
QA Fest 2019. Doug Sillars. It's just too Slow: Testing Mobile application pe... by QAFest
QA Fest 2019. Doug Sillars. It's just too Slow: Testing Mobile application pe...QA Fest 2019. Doug Sillars. It's just too Slow: Testing Mobile application pe...
QA Fest 2019. Doug Sillars. It's just too Slow: Testing Mobile application pe...
QAFest322 views
QA Fest 2019. Катерина Спринсян. Параллельное покрытие автотестами и другие и... by QAFest
QA Fest 2019. Катерина Спринсян. Параллельное покрытие автотестами и другие и...QA Fest 2019. Катерина Спринсян. Параллельное покрытие автотестами и другие и...
QA Fest 2019. Катерина Спринсян. Параллельное покрытие автотестами и другие и...
QAFest336 views
QA Fest 2019. Никита Галкин. Как зарабатывать больше by QAFest
QA Fest 2019. Никита Галкин. Как зарабатывать большеQA Fest 2019. Никита Галкин. Как зарабатывать больше
QA Fest 2019. Никита Галкин. Как зарабатывать больше
QAFest389 views
QA Fest 2019. Сергей Пирогов. Why everything is spoiled by QAFest
QA Fest 2019. Сергей Пирогов. Why everything is spoiledQA Fest 2019. Сергей Пирогов. Why everything is spoiled
QA Fest 2019. Сергей Пирогов. Why everything is spoiled
QAFest342 views
QA Fest 2019. Сергей Новик. Между мотивацией и выгоранием by QAFest
QA Fest 2019. Сергей Новик. Между мотивацией и выгораниемQA Fest 2019. Сергей Новик. Между мотивацией и выгоранием
QA Fest 2019. Сергей Новик. Между мотивацией и выгоранием
QAFest249 views
QA Fest 2019. Владимир Никонов. Код Шредингера или зачем и как мы тестируем н... by QAFest
QA Fest 2019. Владимир Никонов. Код Шредингера или зачем и как мы тестируем н...QA Fest 2019. Владимир Никонов. Код Шредингера или зачем и как мы тестируем н...
QA Fest 2019. Владимир Никонов. Код Шредингера или зачем и как мы тестируем н...
QAFest338 views
QA Fest 2019. Владимир Трандафилов. GUI automation of WEB application with SV... by QAFest
QA Fest 2019. Владимир Трандафилов. GUI automation of WEB application with SV...QA Fest 2019. Владимир Трандафилов. GUI automation of WEB application with SV...
QA Fest 2019. Владимир Трандафилов. GUI automation of WEB application with SV...
QAFest227 views
QA Fest 2019. Иван Крутов. Bulletproof Selenium Cluster by QAFest
QA Fest 2019. Иван Крутов. Bulletproof Selenium ClusterQA Fest 2019. Иван Крутов. Bulletproof Selenium Cluster
QA Fest 2019. Иван Крутов. Bulletproof Selenium Cluster
QAFest282 views
QA Fest 2019. Николай Мижигурский. Миссия /*не*/выполнима: гуманитарий собесе... by QAFest
QA Fest 2019. Николай Мижигурский. Миссия /*не*/выполнима: гуманитарий собесе...QA Fest 2019. Николай Мижигурский. Миссия /*не*/выполнима: гуманитарий собесе...
QA Fest 2019. Николай Мижигурский. Миссия /*не*/выполнима: гуманитарий собесе...
QAFest251 views
QA Fest 2019. Володимир Стиран. Чим раніше – тим вигідніше, але ніколи не піз... by QAFest
QA Fest 2019. Володимир Стиран. Чим раніше – тим вигідніше, але ніколи не піз...QA Fest 2019. Володимир Стиран. Чим раніше – тим вигідніше, але ніколи не піз...
QA Fest 2019. Володимир Стиран. Чим раніше – тим вигідніше, але ніколи не піз...
QAFest301 views
QA Fest 2019. Дмитрий Прокопук. Mocks and network tricks in UI automation by QAFest
QA Fest 2019. Дмитрий Прокопук. Mocks and network tricks in UI automationQA Fest 2019. Дмитрий Прокопук. Mocks and network tricks in UI automation
QA Fest 2019. Дмитрий Прокопук. Mocks and network tricks in UI automation
QAFest225 views
QA Fest 2019. Екатерина Дядечко. Тестирование медицинского софта — вызовы и в... by QAFest
QA Fest 2019. Екатерина Дядечко. Тестирование медицинского софта — вызовы и в...QA Fest 2019. Екатерина Дядечко. Тестирование медицинского софта — вызовы и в...
QA Fest 2019. Екатерина Дядечко. Тестирование медицинского софта — вызовы и в...
QAFest243 views
QA Fest 2019. Катерина Черникова. Tune your P’s: the pop-art of keeping testa... by QAFest
QA Fest 2019. Катерина Черникова. Tune your P’s: the pop-art of keeping testa...QA Fest 2019. Катерина Черникова. Tune your P’s: the pop-art of keeping testa...
QA Fest 2019. Катерина Черникова. Tune your P’s: the pop-art of keeping testa...
QAFest376 views
QA Fest 2019. Алиса Бойко. Какнезапутаться в коммуникативных сетях IT by QAFest
QA Fest 2019. Алиса Бойко. Какнезапутаться в коммуникативных сетях ITQA Fest 2019. Алиса Бойко. Какнезапутаться в коммуникативных сетях IT
QA Fest 2019. Алиса Бойко. Какнезапутаться в коммуникативных сетях IT
QAFest209 views
QA Fest 2019. Святослав Логин. Как найти уязвимости в мобильном приложении by QAFest
QA Fest 2019. Святослав Логин. Как найти уязвимости в мобильном приложенииQA Fest 2019. Святослав Логин. Как найти уязвимости в мобильном приложении
QA Fest 2019. Святослав Логин. Как найти уязвимости в мобильном приложении
QAFest607 views
QA Fest 2019. Катерина Шепелєва та Інна Оснач. Що українцям потрібно знати пр... by QAFest
QA Fest 2019. Катерина Шепелєва та Інна Оснач. Що українцям потрібно знати пр...QA Fest 2019. Катерина Шепелєва та Інна Оснач. Що українцям потрібно знати пр...
QA Fest 2019. Катерина Шепелєва та Інна Оснач. Що українцям потрібно знати пр...
QAFest321 views
QA Fest 2019. Антон Серпутько. Нагрузочное тестирование распределенных асинхр... by QAFest
QA Fest 2019. Антон Серпутько. Нагрузочное тестирование распределенных асинхр...QA Fest 2019. Антон Серпутько. Нагрузочное тестирование распределенных асинхр...
QA Fest 2019. Антон Серпутько. Нагрузочное тестирование распределенных асинхр...
QAFest296 views
QA Fest 2019. Петр Тарасенко. QA Hackathon - The Cookbook 22 by QAFest
QA Fest 2019. Петр Тарасенко. QA Hackathon - The Cookbook 22QA Fest 2019. Петр Тарасенко. QA Hackathon - The Cookbook 22
QA Fest 2019. Петр Тарасенко. QA Hackathon - The Cookbook 22
QAFest164 views

Recently uploaded

Drama KS5 Breakdown by
Drama KS5 BreakdownDrama KS5 Breakdown
Drama KS5 BreakdownWestHatch
87 views2 slides
Java Simplified: Understanding Programming Basics by
Java Simplified: Understanding Programming BasicsJava Simplified: Understanding Programming Basics
Java Simplified: Understanding Programming BasicsAkshaj Vadakkath Joshy
316 views155 slides
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB... by
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...Nguyen Thanh Tu Collection
73 views113 slides
The Value and Role of Media and Information Literacy in the Information Age a... by
The Value and Role of Media and Information Literacy in the Information Age a...The Value and Role of Media and Information Literacy in the Information Age a...
The Value and Role of Media and Information Literacy in the Information Age a...Naseej Academy أكاديمية نسيج
54 views42 slides
Collective Bargaining and Understanding a Teacher Contract(16793704.1).pptx by
Collective Bargaining and Understanding a Teacher Contract(16793704.1).pptxCollective Bargaining and Understanding a Teacher Contract(16793704.1).pptx
Collective Bargaining and Understanding a Teacher Contract(16793704.1).pptxCenter for Integrated Training & Education
94 views57 slides
AUDIENCE - BANDURA.pptx by
AUDIENCE - BANDURA.pptxAUDIENCE - BANDURA.pptx
AUDIENCE - BANDURA.pptxiammrhaywood
89 views44 slides

Recently uploaded(20)

Drama KS5 Breakdown by WestHatch
Drama KS5 BreakdownDrama KS5 Breakdown
Drama KS5 Breakdown
WestHatch87 views
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB... by Nguyen Thanh Tu Collection
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
AUDIENCE - BANDURA.pptx by iammrhaywood
AUDIENCE - BANDURA.pptxAUDIENCE - BANDURA.pptx
AUDIENCE - BANDURA.pptx
iammrhaywood89 views
Ch. 8 Political Party and Party System.pptx by Rommel Regala
Ch. 8 Political Party and Party System.pptxCh. 8 Political Party and Party System.pptx
Ch. 8 Political Party and Party System.pptx
Rommel Regala53 views
EIT-Digital_Spohrer_AI_Intro 20231128 v1.pptx by ISSIP
EIT-Digital_Spohrer_AI_Intro 20231128 v1.pptxEIT-Digital_Spohrer_AI_Intro 20231128 v1.pptx
EIT-Digital_Spohrer_AI_Intro 20231128 v1.pptx
ISSIP379 views
Psychology KS5 by WestHatch
Psychology KS5Psychology KS5
Psychology KS5
WestHatch103 views
Structure and Functions of Cell.pdf by Nithya Murugan
Structure and Functions of Cell.pdfStructure and Functions of Cell.pdf
Structure and Functions of Cell.pdf
Nithya Murugan701 views
Pharmaceutical Inorganic Chemistry Unit IVMiscellaneous compounds Expectorant... by Ms. Pooja Bhandare
Pharmaceutical Inorganic Chemistry Unit IVMiscellaneous compounds Expectorant...Pharmaceutical Inorganic Chemistry Unit IVMiscellaneous compounds Expectorant...
Pharmaceutical Inorganic Chemistry Unit IVMiscellaneous compounds Expectorant...
Ms. Pooja Bhandare109 views
Use of Probiotics in Aquaculture.pptx by AKSHAY MANDAL
Use of Probiotics in Aquaculture.pptxUse of Probiotics in Aquaculture.pptx
Use of Probiotics in Aquaculture.pptx
AKSHAY MANDAL104 views
Ch. 7 Political Participation and Elections.pptx by Rommel Regala
Ch. 7 Political Participation and Elections.pptxCh. 7 Political Participation and Elections.pptx
Ch. 7 Political Participation and Elections.pptx
Rommel Regala105 views
The Accursed House by Émile Gaboriau by DivyaSheta
The Accursed House  by Émile GaboriauThe Accursed House  by Émile Gaboriau
The Accursed House by Émile Gaboriau
DivyaSheta212 views
Create a Structure in VBNet.pptx by Breach_P
Create a Structure in VBNet.pptxCreate a Structure in VBNet.pptx
Create a Structure in VBNet.pptx
Breach_P75 views
Education and Diversity.pptx by DrHafizKosar
Education and Diversity.pptxEducation and Diversity.pptx
Education and Diversity.pptx
DrHafizKosar177 views
7 NOVEL DRUG DELIVERY SYSTEM.pptx by Sachin Nitave
7 NOVEL DRUG DELIVERY SYSTEM.pptx7 NOVEL DRUG DELIVERY SYSTEM.pptx
7 NOVEL DRUG DELIVERY SYSTEM.pptx
Sachin Nitave61 views

QA Fest 2017. Александр Хотемской. Современные возможности в организации ProtractorJS фреймворка

  • 1. Welcome to presentation wizard Modern Features in ProtractorJS framework Oleksandr Khotemskyi 2017
  • 2. • Async/Await – a hero we deserved • Deprecation of control flow – what to do next? • TypeScript – superset of javascript • Blocking proxy – waitForAngular for everyone • Webdriver-manager features • Bonus
  • 4. Asynchronous code • Harder for humans, easier for computer • Task does not wait for previous task to complete • Order of tasks should be specified explicitly by callbacks • Consumes much less resources than splitting to threads • Asynchronous code allows to work with IO operations much more efficiently
  • 6. Tests are synchronous by their nature • Each step in UI functional tests should be done in strict order • This requires “synchronization” approaches of asynchronous code: • Callbacks • Promises chaining • Generators • Fibers, corutines • Async/Await • other
  • 7. Control Flow • WebdriverJS now uses variation of task queue approach
  • 8. Control Flow • Increased complexity – this module is 3300 lines of code • One of the hardest thing to understand in WebdriverJS • Hard to debug
  • 10. Async/Await • Native approach to synchronize your asynchronous code • Hides internal Promises based implementation • Introduced as part of ECMAscript 7 specification
  • 17. How to enable • NodeJS >7.8 or use Babel • For TypeScript – async/await could be compiled to ES3 compatible code • Set - SELENIUM_PROMISE_MANAGER: false in your protractor config file • DO NOT mix control flow and async/await code – execution flow will be unpredictable
  • 19. Control flow is deprecated • https://github.com/SeleniumHQ/selenium/issues/2969 • Phase 1: allow users to optionally turn off of the control flow • Phase 2: (October 2017) users must turn on the control flow • Phase 3: (October 2018) removing the control flow
  • 20. Be ready for deprecation • Set - SELENIUM_PROMISE_MANAGER: true in your protractor config file explicitly right now (or env variable SELENIUM_PROMISE_MANAGER : 1) • This will give you one year to migrate your code away from control flow • More instructions and tips here: https://github.com/SeleniumHQ/selenium/wiki/WebDri verJs#moving-to-asyncawait SELENIUM_PROMISE_MANAGER
  • 22. TypeScript lang • Developed by Microsoft, open source • Compiles into JavaScript • Optional types • ProtractorJS written with TypeScript
  • 28. Some features • ES6 imports/exports • async/await • Mixins, Enums, Interfaces, Abstract Classes • Iterators/Generators • Generics • Property/class/parameter decorators (experimental)
  • 30. Blocking Proxy • Automatically executes waitForAngular before any selenium action. Blocks actions execution • Works on network level, not language level • Can highlight interactions • Can additionally log requests • Works with any language
  • 33. Webdriver-manager • Can setup Android SDK and virtual mobile devices https://github.com/angular/webdriver- manager/blob/master/docs/mobile.md • Can install Appium • Can download and prepare any version of webdriver and selenium-standalone server • `clean` and `status` - are useful to check what happens
  • 34. Useful links • Modern generator with async/await, TS, and other: https://github.com/Xotabu4/generator-modern- protractor • Some examples from this presentation - https://github.com/Xotabu4/modern_protractor_demo • Blocking-proxy - https://github.com/angular/blocking- proxy • Webdriver-manager - https://github.com/angular/webdriver-manager

Editor's Notes

  1. Проверка типов
  2. Проверка типов
  3. Проверка типов - ANY
  4. Автокомплит
  5. Автокомплит