SlideShare a Scribd company logo
Async web testing
The pain and the antidote
Don’t forget to …
Some quick theory
Chapter 1
* Javascript scope
* Javascript closure
* Javascript callbacks
* Angular promises
Some quick theory
Chapter 1
* Javascript scope
* Javascript closure
var add = (function () {
var counter = 0;
return function () {return counter += 1;}
})();
Some quick theory
Chapter 1
browser.wait(function () {
return notification.getText().then(function (tex
return text === aMessage;
});
}, standardPageTimeout, "aMessage should be " +
aMessage);
* Javascript callbacks
Some quick theory
Chapter 1
$http.get("/api/my/name")
.then(
// success
function(response) {
console.log("Your name is: " + response.data);
},
// failure
function(error) {
console.log("The request failed: " + error);
});
* Angular promises
Some quick theory
Chapter 1
* Angular promises, some fun aspects
1. Promises are a core Angular feature
2. They are async
3. In async js, we return control to the browser
4. We call something when a promise has a result
5. That particular ‘when’, we know nothing about
6. Of course, read more please :)
7. Without understanding these, you’ll fail
Some industry
Chapter 2
node.js angular
karma
protractor
jasmine
reporte
rs
restful
node
runner
underscore.js
grunt
Some industry
Chapter 2
About the ‘findElement’ problem … and
how it trashes ‘Page Objects’ setup
when testing Angular
Some industry
Chapter 2
Let’s see our Chapter 1 stuff in ‘Industry’
Some conclusions
Chapter 3
enium, at its current versions, is not enough to test angu
ar UI tests must be developed in JS, to benefit from its p
bjects can still be used, but careful not to drown in a call
Some conclusions
Chapter 3
Many thanks for attending !!!
Is great to meet you all !!!

More Related Content

What's hot

Avoiding Callback Hell with Async.js
Avoiding Callback Hell with Async.jsAvoiding Callback Hell with Async.js
Avoiding Callback Hell with Async.js
cacois
 
Gatling Performance Workshop
Gatling Performance WorkshopGatling Performance Workshop
Gatling Performance Workshop
Sai Krishna
 
Performance tests with gatling
Performance tests with gatlingPerformance tests with gatling
Performance tests with gatling
SoftwareMill
 
JavaScript promise
JavaScript promiseJavaScript promise
JavaScript promise
eslam_me
 
React tips
React tipsReact tips
React tips
Vedran Maršić
 
Reactive Thinking in Java
Reactive Thinking in JavaReactive Thinking in Java
Reactive Thinking in Java
Yakov Fain
 
Martin Anderson - threads v actors
Martin Anderson - threads v actorsMartin Anderson - threads v actors
Martin Anderson - threads v actors
bloodredsun
 
How to add Fixtures into your Django app with Mixer
How to add Fixtures into your Django app with MixerHow to add Fixtures into your Django app with Mixer
How to add Fixtures into your Django app with Mixer
Guinsly Mondesir
 
RxJava on Android
RxJava on AndroidRxJava on Android
RxJava on Android
Dustin Graham
 
Scaling React and Redux at IOOF
Scaling React and Redux at IOOFScaling React and Redux at IOOF
Scaling React and Redux at IOOF
Vivian Farrell
 
RxJava Applied
RxJava AppliedRxJava Applied
RxJava Applied
Igor Lozynskyi
 
Node.js: Continuation-Local-Storage and the Magic of AsyncListener
Node.js: Continuation-Local-Storage and the Magic of AsyncListenerNode.js: Continuation-Local-Storage and the Magic of AsyncListener
Node.js: Continuation-Local-Storage and the Magic of AsyncListener
Islam Sharabash
 
React js use contexts and useContext hook
React js use contexts and useContext hookReact js use contexts and useContext hook
React js use contexts and useContext hook
Piyush Jamwal
 
Workshop 22: React-Redux Middleware
Workshop 22: React-Redux MiddlewareWorkshop 22: React-Redux Middleware
Workshop 22: React-Redux Middleware
Visual Engineering
 
Mobile Day - React Native
Mobile Day - React NativeMobile Day - React Native
Mobile Day - React Native
Software Guru
 
Intro to RxJava/RxAndroid - GDG Munich Android
Intro to RxJava/RxAndroid - GDG Munich AndroidIntro to RxJava/RxAndroid - GDG Munich Android
Intro to RxJava/RxAndroid - GDG Munich Android
Egor Andreevich
 
Angular & RXJS: examples and use cases
Angular & RXJS: examples and use casesAngular & RXJS: examples and use cases
Angular & RXJS: examples and use cases
Fabio Biondi
 
The Road To Reactive with RxJava JEEConf 2016
The Road To Reactive with RxJava JEEConf 2016The Road To Reactive with RxJava JEEConf 2016
The Road To Reactive with RxJava JEEConf 2016
Frank Lyaruu
 

What's hot (20)

Callback Function
Callback FunctionCallback Function
Callback Function
 
Avoiding Callback Hell with Async.js
Avoiding Callback Hell with Async.jsAvoiding Callback Hell with Async.js
Avoiding Callback Hell with Async.js
 
rx-java-presentation
rx-java-presentationrx-java-presentation
rx-java-presentation
 
Gatling Performance Workshop
Gatling Performance WorkshopGatling Performance Workshop
Gatling Performance Workshop
 
Performance tests with gatling
Performance tests with gatlingPerformance tests with gatling
Performance tests with gatling
 
JavaScript promise
JavaScript promiseJavaScript promise
JavaScript promise
 
React tips
React tipsReact tips
React tips
 
Reactive Thinking in Java
Reactive Thinking in JavaReactive Thinking in Java
Reactive Thinking in Java
 
Martin Anderson - threads v actors
Martin Anderson - threads v actorsMartin Anderson - threads v actors
Martin Anderson - threads v actors
 
How to add Fixtures into your Django app with Mixer
How to add Fixtures into your Django app with MixerHow to add Fixtures into your Django app with Mixer
How to add Fixtures into your Django app with Mixer
 
RxJava on Android
RxJava on AndroidRxJava on Android
RxJava on Android
 
Scaling React and Redux at IOOF
Scaling React and Redux at IOOFScaling React and Redux at IOOF
Scaling React and Redux at IOOF
 
RxJava Applied
RxJava AppliedRxJava Applied
RxJava Applied
 
Node.js: Continuation-Local-Storage and the Magic of AsyncListener
Node.js: Continuation-Local-Storage and the Magic of AsyncListenerNode.js: Continuation-Local-Storage and the Magic of AsyncListener
Node.js: Continuation-Local-Storage and the Magic of AsyncListener
 
React js use contexts and useContext hook
React js use contexts and useContext hookReact js use contexts and useContext hook
React js use contexts and useContext hook
 
Workshop 22: React-Redux Middleware
Workshop 22: React-Redux MiddlewareWorkshop 22: React-Redux Middleware
Workshop 22: React-Redux Middleware
 
Mobile Day - React Native
Mobile Day - React NativeMobile Day - React Native
Mobile Day - React Native
 
Intro to RxJava/RxAndroid - GDG Munich Android
Intro to RxJava/RxAndroid - GDG Munich AndroidIntro to RxJava/RxAndroid - GDG Munich Android
Intro to RxJava/RxAndroid - GDG Munich Android
 
Angular & RXJS: examples and use cases
Angular & RXJS: examples and use casesAngular & RXJS: examples and use cases
Angular & RXJS: examples and use cases
 
The Road To Reactive with RxJava JEEConf 2016
The Road To Reactive with RxJava JEEConf 2016The Road To Reactive with RxJava JEEConf 2016
The Road To Reactive with RxJava JEEConf 2016
 

Similar to Async Web QA

Java script for web developer
Java script for web developerJava script for web developer
Java script for web developer
Chalermpon Areepong
 
Expert JavaScript tricks of the masters
Expert JavaScript  tricks of the mastersExpert JavaScript  tricks of the masters
Expert JavaScript tricks of the masters
Ara Pehlivanian
 
Async History - javascript
Async History - javascriptAsync History - javascript
Async History - javascript
Nishchit Dhanani
 
Promises look into the async future
Promises look into the async futurePromises look into the async future
Promises look into the async futureslicejs
 
JavaScript Multithread or Single Thread.pptx
JavaScript Multithread or Single Thread.pptxJavaScript Multithread or Single Thread.pptx
JavaScript Multithread or Single Thread.pptx
RAHITNATH
 
JavaScript Promises
JavaScript PromisesJavaScript Promises
JavaScript Promises
L&T Technology Services Limited
 
The Promised Land (in Angular)
The Promised Land (in Angular)The Promised Land (in Angular)
The Promised Land (in Angular)
Domenic Denicola
 
Intro to Javascript
Intro to JavascriptIntro to Javascript
Intro to Javascript
Anjan Banda
 
Introduction to Protractor
Introduction to ProtractorIntroduction to Protractor
Introduction to Protractor
Jie-Wei Wu
 
Asynchronous programming done right - Node.js
Asynchronous programming done right - Node.jsAsynchronous programming done right - Node.js
Asynchronous programming done right - Node.js
Piotr Pelczar
 
Promise: async programming hero
Promise: async programming heroPromise: async programming hero
Promise: async programming hero
The Software House
 
JavaScript Interview Questions 2023
JavaScript Interview Questions 2023JavaScript Interview Questions 2023
JavaScript Interview Questions 2023
Laurence Svekis ✔
 
Event driven javascript
Event driven javascriptEvent driven javascript
Event driven javascript
Francesca1980
 
Event driven javascript
Event driven javascriptEvent driven javascript
Event driven javascript
Francesca1980
 
4 mishchevskii - testing stage18-
4   mishchevskii - testing stage18-4   mishchevskii - testing stage18-
4 mishchevskii - testing stage18-
Ievgenii Katsan
 
What's new in jQuery 1.5
What's new in jQuery 1.5What's new in jQuery 1.5
What's new in jQuery 1.5
Martin Kleppe
 
An Introduction to AngularJs Unittesting
An Introduction to AngularJs UnittestingAn Introduction to AngularJs Unittesting
An Introduction to AngularJs UnittestingInthra onsap
 
Sane Async Patterns
Sane Async PatternsSane Async Patterns
Sane Async Patterns
TrevorBurnham
 
The evolution of java script asynchronous calls
The evolution of java script asynchronous callsThe evolution of java script asynchronous calls
The evolution of java script asynchronous calls
Huy Hoàng Phạm
 
Douglas Crockford: Serversideness
Douglas Crockford: ServersidenessDouglas Crockford: Serversideness
Douglas Crockford: Serversideness
WebExpo
 

Similar to Async Web QA (20)

Java script for web developer
Java script for web developerJava script for web developer
Java script for web developer
 
Expert JavaScript tricks of the masters
Expert JavaScript  tricks of the mastersExpert JavaScript  tricks of the masters
Expert JavaScript tricks of the masters
 
Async History - javascript
Async History - javascriptAsync History - javascript
Async History - javascript
 
Promises look into the async future
Promises look into the async futurePromises look into the async future
Promises look into the async future
 
JavaScript Multithread or Single Thread.pptx
JavaScript Multithread or Single Thread.pptxJavaScript Multithread or Single Thread.pptx
JavaScript Multithread or Single Thread.pptx
 
JavaScript Promises
JavaScript PromisesJavaScript Promises
JavaScript Promises
 
The Promised Land (in Angular)
The Promised Land (in Angular)The Promised Land (in Angular)
The Promised Land (in Angular)
 
Intro to Javascript
Intro to JavascriptIntro to Javascript
Intro to Javascript
 
Introduction to Protractor
Introduction to ProtractorIntroduction to Protractor
Introduction to Protractor
 
Asynchronous programming done right - Node.js
Asynchronous programming done right - Node.jsAsynchronous programming done right - Node.js
Asynchronous programming done right - Node.js
 
Promise: async programming hero
Promise: async programming heroPromise: async programming hero
Promise: async programming hero
 
JavaScript Interview Questions 2023
JavaScript Interview Questions 2023JavaScript Interview Questions 2023
JavaScript Interview Questions 2023
 
Event driven javascript
Event driven javascriptEvent driven javascript
Event driven javascript
 
Event driven javascript
Event driven javascriptEvent driven javascript
Event driven javascript
 
4 mishchevskii - testing stage18-
4   mishchevskii - testing stage18-4   mishchevskii - testing stage18-
4 mishchevskii - testing stage18-
 
What's new in jQuery 1.5
What's new in jQuery 1.5What's new in jQuery 1.5
What's new in jQuery 1.5
 
An Introduction to AngularJs Unittesting
An Introduction to AngularJs UnittestingAn Introduction to AngularJs Unittesting
An Introduction to AngularJs Unittesting
 
Sane Async Patterns
Sane Async PatternsSane Async Patterns
Sane Async Patterns
 
The evolution of java script asynchronous calls
The evolution of java script asynchronous callsThe evolution of java script asynchronous calls
The evolution of java script asynchronous calls
 
Douglas Crockford: Serversideness
Douglas Crockford: ServersidenessDouglas Crockford: Serversideness
Douglas Crockford: Serversideness
 

Async Web QA

  • 1. Async web testing The pain and the antidote
  • 2.
  • 4. Some quick theory Chapter 1 * Javascript scope * Javascript closure * Javascript callbacks * Angular promises
  • 5. Some quick theory Chapter 1 * Javascript scope * Javascript closure var add = (function () { var counter = 0; return function () {return counter += 1;} })();
  • 6. Some quick theory Chapter 1 browser.wait(function () { return notification.getText().then(function (tex return text === aMessage; }); }, standardPageTimeout, "aMessage should be " + aMessage); * Javascript callbacks
  • 7. Some quick theory Chapter 1 $http.get("/api/my/name") .then( // success function(response) { console.log("Your name is: " + response.data); }, // failure function(error) { console.log("The request failed: " + error); }); * Angular promises
  • 8. Some quick theory Chapter 1 * Angular promises, some fun aspects 1. Promises are a core Angular feature 2. They are async 3. In async js, we return control to the browser 4. We call something when a promise has a result 5. That particular ‘when’, we know nothing about 6. Of course, read more please :) 7. Without understanding these, you’ll fail
  • 9. Some industry Chapter 2 node.js angular karma protractor jasmine reporte rs restful node runner underscore.js grunt
  • 10. Some industry Chapter 2 About the ‘findElement’ problem … and how it trashes ‘Page Objects’ setup when testing Angular
  • 11. Some industry Chapter 2 Let’s see our Chapter 1 stuff in ‘Industry’
  • 12. Some conclusions Chapter 3 enium, at its current versions, is not enough to test angu ar UI tests must be developed in JS, to benefit from its p bjects can still be used, but careful not to drown in a call
  • 13.
  • 14. Some conclusions Chapter 3 Many thanks for attending !!! Is great to meet you all !!!