SlideShare a Scribd company logo
Viacheslau Bushyla
JavaScript in test automation
Viacheslau Bushyla
Senior Software Test Automation Engineer
3
Node js platform to execute JS
Node.JS = V8 + I/O + libraries
V8
- fast
- modern (all standards)
- efficiently uses resources
I/O
- files
- network
- input/output
NPM
- installs libraries
JavaScript and Node js
4
var employee = {
active: true,
age: 20,
name: "Ivan",
skills: ['Java', 'AT', 'JavaScript'],
employer: {company: "Epam"},
workStation: null,
summary: undefined,
toString: function () {
console.log("Name: ", this.name, "Age: ", this.age);
}
}
typeof(employee.active)
"boolean"
typeof(employee.age)
"number"
typeof(employee.name)
"string"
typeof(employee.skills)
"object"
typeof(employee.employer)
"object"
typeof(employee.workStation)
"object"
typeof(employee.summary)
"undefined"
typeof(employee.toString)
"function"
JavaScript types
5
JSON - JavaScript Object Notation
var objectToString = JSON.stringify(employee);
"{
"active":true,
"age":20,
"name":"Ivan",
"skills":["Java","AT","JavaScript"],
"employer":{"company":"Epam"},
"workStation":null
}"
var stringToObject = JSON.parse(objectToString)
Object
Object {active: true, age: 20, name: "Ivan", skills: Array[3], employer: Object…}
HTTP
DB
File
Browser
JavaScript and JSON
6
Stack
Input/Output
console.log("start");
var file = fs.readFile('/etc/passwd')
console.log("done");
main()
readFileconsole.log("end")console.log("done")console.log("start")fs.readFile(cb)
start
done
task queue
console
Synchronous JavaScript
7
Stack
webapis/IO
event loop
cb
console.log("start");
fs.readFile('/etc/passwd', (err, data) => {
if (err) throw err;
console.log("done");
});
console.log("end");
main()
cb
console.log("end")console.log("done")console.log("start")fs.readFile(cb)
start
end
done
task queue
console
Asynchronous JavaScript
8
Stack
driver
console.log("start");
driver.findElement(locator).then(function (q) {
console.log("done");
}).then(function () {
console.log("end");
});
main()
driver.findElementconsole.log("done")console.log("end")console.log("start")driver.findElement()
start
done
end
console
Synchronization with Promises
9
Promise - represents the eventual result of an asynchronous operation.
Then method, which registers callbacks to receive either a promise’s eventual
value or the reason why the promise cannot be fulfilled.
<pending>
fulfilled
rejected
Promises
10
Web Browser Web Server
request url
HTML page
AJAX request
response
constant long polling
requests....
Synchronization
11
● Run test framework with CLI and configuration file
● Integration with popular JavaScript test framework - Jasmine, Cucumber
● Maintains a queue of pending promises to keep execution organized
● Provides Api to locate and perform actions on DOM elements
● Provides synchronization with Angular application
Protractor test framework
12
Page
http pending requests
Browser
Driver
WD request
Sync
Angular
WD response
Synchronization with Angular
13
Runner
Protractor
Selenium
WDApi
Adapter
Jasmine
Cucumber
Mocha
Protractor decomposition
14
// C#
public class LoginPage
{
[FindsBy(How = How.Id, Using = "bbcid_unique")]
private IWebElement userName;
[FindsBy(How = How.Id, Using = "bbcid_password")]
private IWebElement password;
[FindsBy(How = How.Id, Using = "bbcid_submit_button")]
private IWebElement signInButton;
[FindsBy(...)]
private IList<IWebElement> someElements;
public LoginPage()
{
PageFactory.InitElements(DriverManager.getDriver(), this);
}
public void login(string login, string password)
{
userName.SendKeys(login);
password.SendKeys(password);
signInButton.Click();
}
}
// JS
var LoginPage = function() {
this.userName = element(by.id('bbcid_unique'));
this.password = element(by.id('bbcid_password'));
this.signInButton = element(by.id('bbcid_submit_button'));
this.someElements = element.all(by.tagName('img'));
this.login = function (login, password) {
userName.sendKeys;
password.sendKeys(password);
signInButton.click();
};
};
module.exports = LoginPage;
Page Object
15
Page Element
- verifyValidationError
- checkElement
Clickable Element
- click
Custom
Element
- setElement
Dropdown
- setElementByValue
- setElementBydate
- setElementByIndex
Radiogroup
- setElementByIdFragment
- setElementByIndex
Textfield
- fillElement
BooleanRadioGroup
- setElementByIdFragment
Page Elements
16
carRegNumber: {set: {value: 'MF15MYC'}},
findCarButton: 'click',
licenceIssued: {check: {idFragment: 1}},
carRegNumber: {set: {value: false}},
howLongHeldLicenceYear: "verifyValidationError",
Interaction with JSON profile
17
1. Support by Angular community
2. High Level abstraction (built-in factories,
builders, workers etc, configuration through
config file)
3. Supports JS test frameworks (mocha, jasmine,
cucumber)
4. Improved Control Flow (Promises chaining)
5. Integration with CI (Bamboo Atlassian, Jenkins,
Teamcity etc.)
1. Tests quite slow
2. Build in Solutions make you dependent
3. Easy make simple solution build-in for
integration tests
4. You have to create complex solution if create
tests as user do
Protractor pros and cons
18
1. Native support JSON
2. NPM - build in solutions(REST, BD, reports, IO
libraries)
3. Integration with modern web UI solution
4. Integration with services, support and
documentation
5. Popular Node JS ecosystem
6. Easy to start
7. Small community
1. Slower than others platform
2. Doesn’t support strong typisation
3. Slow down development
4. Platform depended
5. Dinamic
6. Async
7. Non-standard approaches and code design
patterns
Conclusions
19
https://developer.mozilla.org/ru/docs/Web/JavaScript - mozila development network
https://nodejs.org - Node JS official
https://www.npmjs.com/ - NPM official
https://www.npmjs.com/package/selenium-webdriver - WebDriver JS official documentation
http://protractortest.org - Protractor official
http://jasmine.github.io/ - Jasmine official
https://cucumber.io/ - Cucumber official
Info sources

More Related Content

What's hot

Javascript Test Automation Workshop (21.08.2014)
Javascript Test Automation Workshop (21.08.2014)Javascript Test Automation Workshop (21.08.2014)
Javascript Test Automation Workshop (21.08.2014)
Deutsche Post
 
Vuejs testing
Vuejs testingVuejs testing
Vuejs testing
Greg TAPPERO
 
Backbone.js
Backbone.jsBackbone.js
Backbone.js
VO Tho
 
[FEConf Korea 2017]Angular 컴포넌트 대화법
[FEConf Korea 2017]Angular 컴포넌트 대화법[FEConf Korea 2017]Angular 컴포넌트 대화법
[FEConf Korea 2017]Angular 컴포넌트 대화법
Jeado Ko
 
Odoo Experience 2018 - The Odoo JS Framework
Odoo Experience 2018 - The Odoo JS FrameworkOdoo Experience 2018 - The Odoo JS Framework
Odoo Experience 2018 - The Odoo JS Framework
ElínAnna Jónasdóttir
 
Easy tests with Selenide and Easyb
Easy tests with Selenide and EasybEasy tests with Selenide and Easyb
Easy tests with Selenide and Easyb
Iakiv Kramarenko
 
Workshop 12: AngularJS Parte I
Workshop 12: AngularJS Parte IWorkshop 12: AngularJS Parte I
Workshop 12: AngularJS Parte I
Visual Engineering
 
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Jeado Ko
 
IndexedDB - Querying and Performance
IndexedDB - Querying and PerformanceIndexedDB - Querying and Performance
IndexedDB - Querying and Performance
Parashuram N
 
Testing Ext JS and Sencha Touch
Testing Ext JS and Sencha TouchTesting Ext JS and Sencha Touch
Testing Ext JS and Sencha Touch
Mats Bryntse
 
Intro To JavaScript Unit Testing - Ran Mizrahi
Intro To JavaScript Unit Testing - Ran MizrahiIntro To JavaScript Unit Testing - Ran Mizrahi
Intro To JavaScript Unit Testing - Ran Mizrahi
Ran Mizrahi
 
Sane Async Patterns
Sane Async PatternsSane Async Patterns
Sane Async Patterns
TrevorBurnham
 
AngularJS Architecture
AngularJS ArchitectureAngularJS Architecture
AngularJS Architecture
Eyal Vardi
 
Backbone.js
Backbone.jsBackbone.js
Backbone.js
Omnia Helmi
 
End-to-end testing with geb
End-to-end testing with gebEnd-to-end testing with geb
End-to-end testing with geb
Jesús L. Domínguez Muriel
 
Javascript unit testing, yes we can e big
Javascript unit testing, yes we can   e bigJavascript unit testing, yes we can   e big
Javascript unit testing, yes we can e big
Andy Peterson
 
Kiss PageObjects [01-2017]
Kiss PageObjects [01-2017]Kiss PageObjects [01-2017]
Kiss PageObjects [01-2017]
Iakiv Kramarenko
 
The AngularJS way
The AngularJS wayThe AngularJS way
The AngularJS way
Boyan Mihaylov
 
Code ceptioninstallation
Code ceptioninstallationCode ceptioninstallation
Code ceptioninstallation
Andrii Lagovskiy
 
Developing large scale JavaScript applications
Developing large scale JavaScript applicationsDeveloping large scale JavaScript applications
Developing large scale JavaScript applications
Milan Korsos
 

What's hot (20)

Javascript Test Automation Workshop (21.08.2014)
Javascript Test Automation Workshop (21.08.2014)Javascript Test Automation Workshop (21.08.2014)
Javascript Test Automation Workshop (21.08.2014)
 
Vuejs testing
Vuejs testingVuejs testing
Vuejs testing
 
Backbone.js
Backbone.jsBackbone.js
Backbone.js
 
[FEConf Korea 2017]Angular 컴포넌트 대화법
[FEConf Korea 2017]Angular 컴포넌트 대화법[FEConf Korea 2017]Angular 컴포넌트 대화법
[FEConf Korea 2017]Angular 컴포넌트 대화법
 
Odoo Experience 2018 - The Odoo JS Framework
Odoo Experience 2018 - The Odoo JS FrameworkOdoo Experience 2018 - The Odoo JS Framework
Odoo Experience 2018 - The Odoo JS Framework
 
Easy tests with Selenide and Easyb
Easy tests with Selenide and EasybEasy tests with Selenide and Easyb
Easy tests with Selenide and Easyb
 
Workshop 12: AngularJS Parte I
Workshop 12: AngularJS Parte IWorkshop 12: AngularJS Parte I
Workshop 12: AngularJS Parte I
 
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
 
IndexedDB - Querying and Performance
IndexedDB - Querying and PerformanceIndexedDB - Querying and Performance
IndexedDB - Querying and Performance
 
Testing Ext JS and Sencha Touch
Testing Ext JS and Sencha TouchTesting Ext JS and Sencha Touch
Testing Ext JS and Sencha Touch
 
Intro To JavaScript Unit Testing - Ran Mizrahi
Intro To JavaScript Unit Testing - Ran MizrahiIntro To JavaScript Unit Testing - Ran Mizrahi
Intro To JavaScript Unit Testing - Ran Mizrahi
 
Sane Async Patterns
Sane Async PatternsSane Async Patterns
Sane Async Patterns
 
AngularJS Architecture
AngularJS ArchitectureAngularJS Architecture
AngularJS Architecture
 
Backbone.js
Backbone.jsBackbone.js
Backbone.js
 
End-to-end testing with geb
End-to-end testing with gebEnd-to-end testing with geb
End-to-end testing with geb
 
Javascript unit testing, yes we can e big
Javascript unit testing, yes we can   e bigJavascript unit testing, yes we can   e big
Javascript unit testing, yes we can e big
 
Kiss PageObjects [01-2017]
Kiss PageObjects [01-2017]Kiss PageObjects [01-2017]
Kiss PageObjects [01-2017]
 
The AngularJS way
The AngularJS wayThe AngularJS way
The AngularJS way
 
Code ceptioninstallation
Code ceptioninstallationCode ceptioninstallation
Code ceptioninstallation
 
Developing large scale JavaScript applications
Developing large scale JavaScript applicationsDeveloping large scale JavaScript applications
Developing large scale JavaScript applications
 

Similar to Обзор автоматизации тестирования на JavaScript

Geb qa fest2017
Geb qa fest2017Geb qa fest2017
Geb qa fest2017
Sviatkin Yaroslav
 
QA Fest 2017. Ярослав Святкин. Тестовый фреймворк GEB для тестирования WEB пр...
QA Fest 2017. Ярослав Святкин. Тестовый фреймворк GEB для тестирования WEB пр...QA Fest 2017. Ярослав Святкин. Тестовый фреймворк GEB для тестирования WEB пр...
QA Fest 2017. Ярослав Святкин. Тестовый фреймворк GEB для тестирования WEB пр...
QAFest
 
jQuery Data Manipulate API - A source code dissecting journey
jQuery Data Manipulate API - A source code dissecting journeyjQuery Data Manipulate API - A source code dissecting journey
jQuery Data Manipulate API - A source code dissecting journey
Huiyi Yan
 
The next step, part 2
The next step, part 2The next step, part 2
The next step, part 2
Pat Cavit
 
meet.js - QooXDoo
meet.js - QooXDoomeet.js - QooXDoo
meet.js - QooXDoo
Radek Benkel
 
Form demoinplaywithmysql
Form demoinplaywithmysqlForm demoinplaywithmysql
Form demoinplaywithmysql
Knoldus Inc.
 
Getting classy with ES6
Getting classy with ES6Getting classy with ES6
Getting classy with ES6
Andy Sharman
 
КОСТЯНТИН КЛЮЄВ «Cypress.io : Let’s go farther» Online QADay 2022
КОСТЯНТИН КЛЮЄВ «Cypress.io : Let’s go farther» Online QADay 2022КОСТЯНТИН КЛЮЄВ «Cypress.io : Let’s go farther» Online QADay 2022
КОСТЯНТИН КЛЮЄВ «Cypress.io : Let’s go farther» Online QADay 2022
QADay
 
A test framework out of the box - Geb for Web and mobile
A test framework out of the box - Geb for Web and mobileA test framework out of the box - Geb for Web and mobile
A test framework out of the box - Geb for Web and mobile
GlobalLogic Ukraine
 
jQuery secrets
jQuery secretsjQuery secrets
jQuery secrets
Bastian Feder
 
Week 4 - jQuery + Ajax
Week 4 - jQuery + AjaxWeek 4 - jQuery + Ajax
Week 4 - jQuery + Ajax
baygross
 
JSP
JSPJSP
Testable, Object-Oriented JavaScript
Testable, Object-Oriented JavaScriptTestable, Object-Oriented JavaScript
Testable, Object-Oriented JavaScript
Jon Kruger
 
Clean Javascript
Clean JavascriptClean Javascript
Clean Javascript
Ryunosuke SATO
 
第一次用Parse就深入淺出
第一次用Parse就深入淺出第一次用Parse就深入淺出
第一次用Parse就深入淺出
Ymow Wu
 
The Beauty of Java Script
The Beauty of Java ScriptThe Beauty of Java Script
The Beauty of Java Script
Michael Girouard
 
Javascript
JavascriptJavascript
Javascript
Rajavel Dhandabani
 
Paris js extensions
Paris js extensionsParis js extensions
Paris js extensions
erwanl
 
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-
Tsuyoshi Yamamoto
 
jQuery Foot-Gun Features
jQuery Foot-Gun FeaturesjQuery Foot-Gun Features
jQuery Foot-Gun Features
dmethvin
 

Similar to Обзор автоматизации тестирования на JavaScript (20)

Geb qa fest2017
Geb qa fest2017Geb qa fest2017
Geb qa fest2017
 
QA Fest 2017. Ярослав Святкин. Тестовый фреймворк GEB для тестирования WEB пр...
QA Fest 2017. Ярослав Святкин. Тестовый фреймворк GEB для тестирования WEB пр...QA Fest 2017. Ярослав Святкин. Тестовый фреймворк GEB для тестирования WEB пр...
QA Fest 2017. Ярослав Святкин. Тестовый фреймворк GEB для тестирования WEB пр...
 
jQuery Data Manipulate API - A source code dissecting journey
jQuery Data Manipulate API - A source code dissecting journeyjQuery Data Manipulate API - A source code dissecting journey
jQuery Data Manipulate API - A source code dissecting journey
 
The next step, part 2
The next step, part 2The next step, part 2
The next step, part 2
 
meet.js - QooXDoo
meet.js - QooXDoomeet.js - QooXDoo
meet.js - QooXDoo
 
Form demoinplaywithmysql
Form demoinplaywithmysqlForm demoinplaywithmysql
Form demoinplaywithmysql
 
Getting classy with ES6
Getting classy with ES6Getting classy with ES6
Getting classy with ES6
 
КОСТЯНТИН КЛЮЄВ «Cypress.io : Let’s go farther» Online QADay 2022
КОСТЯНТИН КЛЮЄВ «Cypress.io : Let’s go farther» Online QADay 2022КОСТЯНТИН КЛЮЄВ «Cypress.io : Let’s go farther» Online QADay 2022
КОСТЯНТИН КЛЮЄВ «Cypress.io : Let’s go farther» Online QADay 2022
 
A test framework out of the box - Geb for Web and mobile
A test framework out of the box - Geb for Web and mobileA test framework out of the box - Geb for Web and mobile
A test framework out of the box - Geb for Web and mobile
 
jQuery secrets
jQuery secretsjQuery secrets
jQuery secrets
 
Week 4 - jQuery + Ajax
Week 4 - jQuery + AjaxWeek 4 - jQuery + Ajax
Week 4 - jQuery + Ajax
 
JSP
JSPJSP
JSP
 
Testable, Object-Oriented JavaScript
Testable, Object-Oriented JavaScriptTestable, Object-Oriented JavaScript
Testable, Object-Oriented JavaScript
 
Clean Javascript
Clean JavascriptClean Javascript
Clean Javascript
 
第一次用Parse就深入淺出
第一次用Parse就深入淺出第一次用Parse就深入淺出
第一次用Parse就深入淺出
 
The Beauty of Java Script
The Beauty of Java ScriptThe Beauty of Java Script
The Beauty of Java Script
 
Javascript
JavascriptJavascript
Javascript
 
Paris js extensions
Paris js extensionsParis js extensions
Paris js extensions
 
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-
 
jQuery Foot-Gun Features
jQuery Foot-Gun FeaturesjQuery Foot-Gun Features
jQuery Foot-Gun Features
 

More from COMAQA.BY

Тестирование аналогов инсталлируемых приложений (Android Instant Apps, Progre...
Тестирование аналогов инсталлируемых приложений (Android Instant Apps, Progre...Тестирование аналогов инсталлируемых приложений (Android Instant Apps, Progre...
Тестирование аналогов инсталлируемых приложений (Android Instant Apps, Progre...
COMAQA.BY
 
Anton semenchenko. Comaqa Spring 2018. Nine circles of hell. Antipatterns in ...
Anton semenchenko. Comaqa Spring 2018. Nine circles of hell. Antipatterns in ...Anton semenchenko. Comaqa Spring 2018. Nine circles of hell. Antipatterns in ...
Anton semenchenko. Comaqa Spring 2018. Nine circles of hell. Antipatterns in ...
COMAQA.BY
 
Vivien Ibironke Ibiyemi. Comaqa Spring 2018. Enhance your Testing Skills With...
Vivien Ibironke Ibiyemi. Comaqa Spring 2018. Enhance your Testing Skills With...Vivien Ibironke Ibiyemi. Comaqa Spring 2018. Enhance your Testing Skills With...
Vivien Ibironke Ibiyemi. Comaqa Spring 2018. Enhance your Testing Skills With...
COMAQA.BY
 
Roman Soroka. Comaqa Spring 2018. Глобальный обзор процесса QA и его важность
Roman Soroka. Comaqa Spring 2018. Глобальный обзор процесса QA и его важностьRoman Soroka. Comaqa Spring 2018. Глобальный обзор процесса QA и его важность
Roman Soroka. Comaqa Spring 2018. Глобальный обзор процесса QA и его важность
COMAQA.BY
 
Roman Iovlev. Comaqa Spring 2018. Архитектура Open Source решений для автомат...
Roman Iovlev. Comaqa Spring 2018. Архитектура Open Source решений для автомат...Roman Iovlev. Comaqa Spring 2018. Архитектура Open Source решений для автомат...
Roman Iovlev. Comaqa Spring 2018. Архитектура Open Source решений для автомат...
COMAQA.BY
 
Vladimir Polyakov. Comaqa Spring 2018. Особенности тестирования ПО в предметн...
Vladimir Polyakov. Comaqa Spring 2018. Особенности тестирования ПО в предметн...Vladimir Polyakov. Comaqa Spring 2018. Особенности тестирования ПО в предметн...
Vladimir Polyakov. Comaqa Spring 2018. Особенности тестирования ПО в предметн...
COMAQA.BY
 
Kimmo Hakala. Comaqa Spring 2018. Challenges and good QA practices in softwar...
Kimmo Hakala. Comaqa Spring 2018. Challenges and good QA practices in softwar...Kimmo Hakala. Comaqa Spring 2018. Challenges and good QA practices in softwar...
Kimmo Hakala. Comaqa Spring 2018. Challenges and good QA practices in softwar...
COMAQA.BY
 
Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...
Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...
Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...
COMAQA.BY
 
Ivan Katunov. Comaqa Spring 2018. Test Design and Automation for Rest API.
Ivan Katunov. Comaqa Spring 2018. Test Design and Automation for Rest API.Ivan Katunov. Comaqa Spring 2018. Test Design and Automation for Rest API.
Ivan Katunov. Comaqa Spring 2018. Test Design and Automation for Rest API.
COMAQA.BY
 
Vadim Zubovich. Comaqa Spring 2018. Красивое тестирование производительности.
Vadim Zubovich. Comaqa Spring 2018. Красивое тестирование производительности.Vadim Zubovich. Comaqa Spring 2018. Красивое тестирование производительности.
Vadim Zubovich. Comaqa Spring 2018. Красивое тестирование производительности.
COMAQA.BY
 
Alexander Andelkovic. Comaqa Spring 2018. Using Artificial Intelligence to Te...
Alexander Andelkovic. Comaqa Spring 2018. Using Artificial Intelligence to Te...Alexander Andelkovic. Comaqa Spring 2018. Using Artificial Intelligence to Te...
Alexander Andelkovic. Comaqa Spring 2018. Using Artificial Intelligence to Te...
COMAQA.BY
 
Моя роль в конфликте
Моя роль в конфликтеМоя роль в конфликте
Моя роль в конфликте
COMAQA.BY
 
Организация приемочного тестирования силами матерых тестировщиков
Организация приемочного тестирования силами матерых тестировщиковОрганизация приемочного тестирования силами матерых тестировщиков
Организация приемочного тестирования силами матерых тестировщиков
COMAQA.BY
 
Развитие или смерть
Развитие или смертьРазвитие или смерть
Развитие или смерть
COMAQA.BY
 
Системный взгляд на параллельный запуск Selenium тестов
Системный взгляд на параллельный запуск Selenium тестовСистемный взгляд на параллельный запуск Selenium тестов
Системный взгляд на параллельный запуск Selenium тестов
COMAQA.BY
 
Эффективная работа с рутинными задачами
Эффективная работа с рутинными задачамиЭффективная работа с рутинными задачами
Эффективная работа с рутинными задачами
COMAQA.BY
 
Как стать синьором
Как стать синьоромКак стать синьором
Как стать синьором
COMAQA.BY
 
Open your mind for OpenSource
Open your mind for OpenSourceOpen your mind for OpenSource
Open your mind for OpenSource
COMAQA.BY
 
JDI 2.0. Not only UI testing
JDI 2.0. Not only UI testingJDI 2.0. Not only UI testing
JDI 2.0. Not only UI testing
COMAQA.BY
 
Out of box page object design pattern, java
Out of box page object design pattern, javaOut of box page object design pattern, java
Out of box page object design pattern, java
COMAQA.BY
 

More from COMAQA.BY (20)

Тестирование аналогов инсталлируемых приложений (Android Instant Apps, Progre...
Тестирование аналогов инсталлируемых приложений (Android Instant Apps, Progre...Тестирование аналогов инсталлируемых приложений (Android Instant Apps, Progre...
Тестирование аналогов инсталлируемых приложений (Android Instant Apps, Progre...
 
Anton semenchenko. Comaqa Spring 2018. Nine circles of hell. Antipatterns in ...
Anton semenchenko. Comaqa Spring 2018. Nine circles of hell. Antipatterns in ...Anton semenchenko. Comaqa Spring 2018. Nine circles of hell. Antipatterns in ...
Anton semenchenko. Comaqa Spring 2018. Nine circles of hell. Antipatterns in ...
 
Vivien Ibironke Ibiyemi. Comaqa Spring 2018. Enhance your Testing Skills With...
Vivien Ibironke Ibiyemi. Comaqa Spring 2018. Enhance your Testing Skills With...Vivien Ibironke Ibiyemi. Comaqa Spring 2018. Enhance your Testing Skills With...
Vivien Ibironke Ibiyemi. Comaqa Spring 2018. Enhance your Testing Skills With...
 
Roman Soroka. Comaqa Spring 2018. Глобальный обзор процесса QA и его важность
Roman Soroka. Comaqa Spring 2018. Глобальный обзор процесса QA и его важностьRoman Soroka. Comaqa Spring 2018. Глобальный обзор процесса QA и его важность
Roman Soroka. Comaqa Spring 2018. Глобальный обзор процесса QA и его важность
 
Roman Iovlev. Comaqa Spring 2018. Архитектура Open Source решений для автомат...
Roman Iovlev. Comaqa Spring 2018. Архитектура Open Source решений для автомат...Roman Iovlev. Comaqa Spring 2018. Архитектура Open Source решений для автомат...
Roman Iovlev. Comaqa Spring 2018. Архитектура Open Source решений для автомат...
 
Vladimir Polyakov. Comaqa Spring 2018. Особенности тестирования ПО в предметн...
Vladimir Polyakov. Comaqa Spring 2018. Особенности тестирования ПО в предметн...Vladimir Polyakov. Comaqa Spring 2018. Особенности тестирования ПО в предметн...
Vladimir Polyakov. Comaqa Spring 2018. Особенности тестирования ПО в предметн...
 
Kimmo Hakala. Comaqa Spring 2018. Challenges and good QA practices in softwar...
Kimmo Hakala. Comaqa Spring 2018. Challenges and good QA practices in softwar...Kimmo Hakala. Comaqa Spring 2018. Challenges and good QA practices in softwar...
Kimmo Hakala. Comaqa Spring 2018. Challenges and good QA practices in softwar...
 
Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...
Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...
Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...
 
Ivan Katunov. Comaqa Spring 2018. Test Design and Automation for Rest API.
Ivan Katunov. Comaqa Spring 2018. Test Design and Automation for Rest API.Ivan Katunov. Comaqa Spring 2018. Test Design and Automation for Rest API.
Ivan Katunov. Comaqa Spring 2018. Test Design and Automation for Rest API.
 
Vadim Zubovich. Comaqa Spring 2018. Красивое тестирование производительности.
Vadim Zubovich. Comaqa Spring 2018. Красивое тестирование производительности.Vadim Zubovich. Comaqa Spring 2018. Красивое тестирование производительности.
Vadim Zubovich. Comaqa Spring 2018. Красивое тестирование производительности.
 
Alexander Andelkovic. Comaqa Spring 2018. Using Artificial Intelligence to Te...
Alexander Andelkovic. Comaqa Spring 2018. Using Artificial Intelligence to Te...Alexander Andelkovic. Comaqa Spring 2018. Using Artificial Intelligence to Te...
Alexander Andelkovic. Comaqa Spring 2018. Using Artificial Intelligence to Te...
 
Моя роль в конфликте
Моя роль в конфликтеМоя роль в конфликте
Моя роль в конфликте
 
Организация приемочного тестирования силами матерых тестировщиков
Организация приемочного тестирования силами матерых тестировщиковОрганизация приемочного тестирования силами матерых тестировщиков
Организация приемочного тестирования силами матерых тестировщиков
 
Развитие или смерть
Развитие или смертьРазвитие или смерть
Развитие или смерть
 
Системный взгляд на параллельный запуск Selenium тестов
Системный взгляд на параллельный запуск Selenium тестовСистемный взгляд на параллельный запуск Selenium тестов
Системный взгляд на параллельный запуск Selenium тестов
 
Эффективная работа с рутинными задачами
Эффективная работа с рутинными задачамиЭффективная работа с рутинными задачами
Эффективная работа с рутинными задачами
 
Как стать синьором
Как стать синьоромКак стать синьором
Как стать синьором
 
Open your mind for OpenSource
Open your mind for OpenSourceOpen your mind for OpenSource
Open your mind for OpenSource
 
JDI 2.0. Not only UI testing
JDI 2.0. Not only UI testingJDI 2.0. Not only UI testing
JDI 2.0. Not only UI testing
 
Out of box page object design pattern, java
Out of box page object design pattern, javaOut of box page object design pattern, java
Out of box page object design pattern, java
 

Recently uploaded

Project Management Semester Long Project - Acuity
Project Management Semester Long Project - AcuityProject Management Semester Long Project - Acuity
Project Management Semester Long Project - Acuity
jpupo2018
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
Postman
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
Webinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data WarehouseWebinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data Warehouse
Federico Razzoli
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Jeffrey Haguewood
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
SitimaJohn
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 

Recently uploaded (20)

Project Management Semester Long Project - Acuity
Project Management Semester Long Project - AcuityProject Management Semester Long Project - Acuity
Project Management Semester Long Project - Acuity
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
Webinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data WarehouseWebinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data Warehouse
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 

Обзор автоматизации тестирования на JavaScript

  • 2. Viacheslau Bushyla Senior Software Test Automation Engineer
  • 3. 3 Node js platform to execute JS Node.JS = V8 + I/O + libraries V8 - fast - modern (all standards) - efficiently uses resources I/O - files - network - input/output NPM - installs libraries JavaScript and Node js
  • 4. 4 var employee = { active: true, age: 20, name: "Ivan", skills: ['Java', 'AT', 'JavaScript'], employer: {company: "Epam"}, workStation: null, summary: undefined, toString: function () { console.log("Name: ", this.name, "Age: ", this.age); } } typeof(employee.active) "boolean" typeof(employee.age) "number" typeof(employee.name) "string" typeof(employee.skills) "object" typeof(employee.employer) "object" typeof(employee.workStation) "object" typeof(employee.summary) "undefined" typeof(employee.toString) "function" JavaScript types
  • 5. 5 JSON - JavaScript Object Notation var objectToString = JSON.stringify(employee); "{ "active":true, "age":20, "name":"Ivan", "skills":["Java","AT","JavaScript"], "employer":{"company":"Epam"}, "workStation":null }" var stringToObject = JSON.parse(objectToString) Object Object {active: true, age: 20, name: "Ivan", skills: Array[3], employer: Object…} HTTP DB File Browser JavaScript and JSON
  • 6. 6 Stack Input/Output console.log("start"); var file = fs.readFile('/etc/passwd') console.log("done"); main() readFileconsole.log("end")console.log("done")console.log("start")fs.readFile(cb) start done task queue console Synchronous JavaScript
  • 7. 7 Stack webapis/IO event loop cb console.log("start"); fs.readFile('/etc/passwd', (err, data) => { if (err) throw err; console.log("done"); }); console.log("end"); main() cb console.log("end")console.log("done")console.log("start")fs.readFile(cb) start end done task queue console Asynchronous JavaScript
  • 8. 8 Stack driver console.log("start"); driver.findElement(locator).then(function (q) { console.log("done"); }).then(function () { console.log("end"); }); main() driver.findElementconsole.log("done")console.log("end")console.log("start")driver.findElement() start done end console Synchronization with Promises
  • 9. 9 Promise - represents the eventual result of an asynchronous operation. Then method, which registers callbacks to receive either a promise’s eventual value or the reason why the promise cannot be fulfilled. <pending> fulfilled rejected Promises
  • 10. 10 Web Browser Web Server request url HTML page AJAX request response constant long polling requests.... Synchronization
  • 11. 11 ● Run test framework with CLI and configuration file ● Integration with popular JavaScript test framework - Jasmine, Cucumber ● Maintains a queue of pending promises to keep execution organized ● Provides Api to locate and perform actions on DOM elements ● Provides synchronization with Angular application Protractor test framework
  • 12. 12 Page http pending requests Browser Driver WD request Sync Angular WD response Synchronization with Angular
  • 14. 14 // C# public class LoginPage { [FindsBy(How = How.Id, Using = "bbcid_unique")] private IWebElement userName; [FindsBy(How = How.Id, Using = "bbcid_password")] private IWebElement password; [FindsBy(How = How.Id, Using = "bbcid_submit_button")] private IWebElement signInButton; [FindsBy(...)] private IList<IWebElement> someElements; public LoginPage() { PageFactory.InitElements(DriverManager.getDriver(), this); } public void login(string login, string password) { userName.SendKeys(login); password.SendKeys(password); signInButton.Click(); } } // JS var LoginPage = function() { this.userName = element(by.id('bbcid_unique')); this.password = element(by.id('bbcid_password')); this.signInButton = element(by.id('bbcid_submit_button')); this.someElements = element.all(by.tagName('img')); this.login = function (login, password) { userName.sendKeys; password.sendKeys(password); signInButton.click(); }; }; module.exports = LoginPage; Page Object
  • 15. 15 Page Element - verifyValidationError - checkElement Clickable Element - click Custom Element - setElement Dropdown - setElementByValue - setElementBydate - setElementByIndex Radiogroup - setElementByIdFragment - setElementByIndex Textfield - fillElement BooleanRadioGroup - setElementByIdFragment Page Elements
  • 16. 16 carRegNumber: {set: {value: 'MF15MYC'}}, findCarButton: 'click', licenceIssued: {check: {idFragment: 1}}, carRegNumber: {set: {value: false}}, howLongHeldLicenceYear: "verifyValidationError", Interaction with JSON profile
  • 17. 17 1. Support by Angular community 2. High Level abstraction (built-in factories, builders, workers etc, configuration through config file) 3. Supports JS test frameworks (mocha, jasmine, cucumber) 4. Improved Control Flow (Promises chaining) 5. Integration with CI (Bamboo Atlassian, Jenkins, Teamcity etc.) 1. Tests quite slow 2. Build in Solutions make you dependent 3. Easy make simple solution build-in for integration tests 4. You have to create complex solution if create tests as user do Protractor pros and cons
  • 18. 18 1. Native support JSON 2. NPM - build in solutions(REST, BD, reports, IO libraries) 3. Integration with modern web UI solution 4. Integration with services, support and documentation 5. Popular Node JS ecosystem 6. Easy to start 7. Small community 1. Slower than others platform 2. Doesn’t support strong typisation 3. Slow down development 4. Platform depended 5. Dinamic 6. Async 7. Non-standard approaches and code design patterns Conclusions
  • 19. 19 https://developer.mozilla.org/ru/docs/Web/JavaScript - mozila development network https://nodejs.org - Node JS official https://www.npmjs.com/ - NPM official https://www.npmjs.com/package/selenium-webdriver - WebDriver JS official documentation http://protractortest.org - Protractor official http://jasmine.github.io/ - Jasmine official https://cucumber.io/ - Cucumber official Info sources