Luca Ferretti illustra Protractor: il framework JavaScript indispensabile alla realizzazione di completi test e2e per web app AngularJS (e non solo).
Iscriviti qui per partecipare ad altri Tech Webinar gratuiti: http://goo.gl/iW81VD
Scrivici a: training@codemotion.it
Tw: http://twitter.com/CodemotionTR
Sviluppo guidato dai tests in ambiente WordPress. La prima parte della frase fa aggrottare la fronte in condizioni normali: in ambiente WordPress assume un che di mistico ed irraggiungibile. Non è così.
Sviluppo guidato dai tests in ambiente WordPress. La prima parte della frase fa aggrottare la fronte in condizioni normali: in ambiente WordPress assume un che di mistico ed irraggiungibile. Non è così.
Workshop Ideare e creare Web Applications, Introduzione ad AngularJSGiovanni Buffa
Gli argomenti trattati durante il Workshop gratuito sull'ideazione e creazione di Web Applications con AngularJS:
- Metodologie innovative di ideazione e creazione di Web Applications;
- Sfide e problemi del lavoro in team;
- Introduzione ad AngularJS e alle sue componenti principali;
- Dimostrazione pratica di una WebApp
Una panoramica delle caratteristiche e delle possibilità che hanno reso Angular uno dei framework più importanti sulla scena frontend.
N.B. Le slides sono aggiornate sino ad Angular 6.
Think horizontally - Giuliano and De DonatoCodemotion
The document discusses ideas around software development and architecture. It contains a series of tweets from two individuals, Andrea Giuliano and Giulio De Donato, that focus on thinking horizontally, thinking about different approaches like procedural vs object-oriented, thinking about principles like SOLID, dependency injection, and domain-driven design. References are also provided related to clean architecture, domain-driven design, and behavior-driven development.
Native Javascript apps with Phonegap - De KeijzerCodemotion
PhoneGap allows developers to wrap HTML, CSS, and JavaScript mobile applications into native mobile applications. It uses a JavaScript API to access native device functionality like the camera, contacts, and notifications. Plugins can be added to PhoneGap to access even more native functionality. PhoneGap Build provides a cloud-based service for easily building and deploying PhoneGap applications without needing to install any tools locally.
Building modular Java application in the cloud age - ErtmanCodemotion
The document discusses a talk given by Bert Ertman on building modular Java applications in the cloud age at a conference in Rome from April 11-12, 2014. The talk focused on strategies for constructing Java applications that can take advantage of cloud computing resources. Bert Ertman presented on this topic and provided a survey for attendees to provide feedback on the talk.
Introduction to Web application development with Vaadin 7.1 - TzukanovCodemotion
This document provides an introduction to web application development with Vaadin, a Java-based framework for building rich client web apps. It discusses what Vaadin is, why it was created, and how to get started using it. Key points include that Vaadin allows building UIs with rich Java components that work across devices, has a client-server architecture with the UI running on the server, and embraces the Java programming language.
Meeting the critical needs of older peoplelocalinsight
The document summarizes a presentation about meeting the critical needs of older people, particularly those living in fuel poverty. It discusses mosaic mapping to identify areas with higher rates of vulnerability. It presents a "Circle of Need" framework to holistically understand an individual's needs beyond just issues of income and housing. Some quick wins and an ongoing pilot program are mentioned to raise awareness and better coordinate services for vulnerable older residents.
A group of parents in a neighborhood were concerned about gang violence, drug dealing, and other unsafe conditions. They decided to take action by holding weekly meetings and inviting a community intervention specialist to develop a plan. The presentation outlines strategies for an effective intervention program, including involving schools, parents, and the community to address violence and its consequences. It suggests developing self-esteem, communication skills, and offering self-defense classes to foster resilience and protect against victimization. The program aims to be inclusive of all ages, genders, and diverse groups in the community.
The document summarizes a customer insight workshop focused on engaging with young people in Knowsley, England. It outlines the project's goals of understanding young people's values and behaviors, using that information to shape services and activities, and increasing opportunities for youth involvement. The main project areas include ethnographic research, consultation with young people, and developing an engagement program. Customer insight tools are being used to better understand community needs and deliver joined-up, customer-focused services.
DevOpsHeroes 2016 - Realizzare Continouous Integration con SQL Server e Visua...Alessandro Alpi
In questa serie di slide vedremo come creare i build step su Visual Studio Team Services sfruttando gli add-on forniti da Red Gate, come DLM Automation 2: Build.
XeDotNet meeting del 5 Marzo 2013
In questa sessione vedremo come Knockout.js permetta di scrivere codice JavaScript in modo pulito e organizzato, semplificando la scrittura del codice e la sua manutenzione. Come lo si utilizza KO? Quali vantaggi ci offre? Quali librerie ci vengono in aiuto? Quali sarebbe meglio evitare?
Rich client application: MVC4 + MVVM = Knockout.jsGiorgio Di Nardo
La sempre maggiore diffusione di device diversificati (PC, Notebook, Tablet, Smartphone, ecc.) su piattaforme diverse, rilancia l'utilizzo delle Web Application come strumento per raggiungere il maggior numero di potenziali clienti con il minimo sforzo. Le capacità avanzate dei nuovi device e le ultime tecnologie ci consentono però di evolvere il concetto classico di applicazione Web in una declinazione più veloce, più responsiva, più accattivante: vediamo come.
PASS Virtual Chapter - SQL Server Continuous IntegrationAlessandro Alpi
Build automatizzate, esecuzione di unit test, creazione di un pacchetto nuget, ecco cosa serve per essere pronti con SQL Server e la continuous integration
Workshop Ideare e creare Web Applications, Introduzione ad AngularJSGiovanni Buffa
Gli argomenti trattati durante il Workshop gratuito sull'ideazione e creazione di Web Applications con AngularJS:
- Metodologie innovative di ideazione e creazione di Web Applications;
- Sfide e problemi del lavoro in team;
- Introduzione ad AngularJS e alle sue componenti principali;
- Dimostrazione pratica di una WebApp
Una panoramica delle caratteristiche e delle possibilità che hanno reso Angular uno dei framework più importanti sulla scena frontend.
N.B. Le slides sono aggiornate sino ad Angular 6.
Think horizontally - Giuliano and De DonatoCodemotion
The document discusses ideas around software development and architecture. It contains a series of tweets from two individuals, Andrea Giuliano and Giulio De Donato, that focus on thinking horizontally, thinking about different approaches like procedural vs object-oriented, thinking about principles like SOLID, dependency injection, and domain-driven design. References are also provided related to clean architecture, domain-driven design, and behavior-driven development.
Native Javascript apps with Phonegap - De KeijzerCodemotion
PhoneGap allows developers to wrap HTML, CSS, and JavaScript mobile applications into native mobile applications. It uses a JavaScript API to access native device functionality like the camera, contacts, and notifications. Plugins can be added to PhoneGap to access even more native functionality. PhoneGap Build provides a cloud-based service for easily building and deploying PhoneGap applications without needing to install any tools locally.
Building modular Java application in the cloud age - ErtmanCodemotion
The document discusses a talk given by Bert Ertman on building modular Java applications in the cloud age at a conference in Rome from April 11-12, 2014. The talk focused on strategies for constructing Java applications that can take advantage of cloud computing resources. Bert Ertman presented on this topic and provided a survey for attendees to provide feedback on the talk.
Introduction to Web application development with Vaadin 7.1 - TzukanovCodemotion
This document provides an introduction to web application development with Vaadin, a Java-based framework for building rich client web apps. It discusses what Vaadin is, why it was created, and how to get started using it. Key points include that Vaadin allows building UIs with rich Java components that work across devices, has a client-server architecture with the UI running on the server, and embraces the Java programming language.
Meeting the critical needs of older peoplelocalinsight
The document summarizes a presentation about meeting the critical needs of older people, particularly those living in fuel poverty. It discusses mosaic mapping to identify areas with higher rates of vulnerability. It presents a "Circle of Need" framework to holistically understand an individual's needs beyond just issues of income and housing. Some quick wins and an ongoing pilot program are mentioned to raise awareness and better coordinate services for vulnerable older residents.
A group of parents in a neighborhood were concerned about gang violence, drug dealing, and other unsafe conditions. They decided to take action by holding weekly meetings and inviting a community intervention specialist to develop a plan. The presentation outlines strategies for an effective intervention program, including involving schools, parents, and the community to address violence and its consequences. It suggests developing self-esteem, communication skills, and offering self-defense classes to foster resilience and protect against victimization. The program aims to be inclusive of all ages, genders, and diverse groups in the community.
The document summarizes a customer insight workshop focused on engaging with young people in Knowsley, England. It outlines the project's goals of understanding young people's values and behaviors, using that information to shape services and activities, and increasing opportunities for youth involvement. The main project areas include ethnographic research, consultation with young people, and developing an engagement program. Customer insight tools are being used to better understand community needs and deliver joined-up, customer-focused services.
DevOpsHeroes 2016 - Realizzare Continouous Integration con SQL Server e Visua...Alessandro Alpi
In questa serie di slide vedremo come creare i build step su Visual Studio Team Services sfruttando gli add-on forniti da Red Gate, come DLM Automation 2: Build.
XeDotNet meeting del 5 Marzo 2013
In questa sessione vedremo come Knockout.js permetta di scrivere codice JavaScript in modo pulito e organizzato, semplificando la scrittura del codice e la sua manutenzione. Come lo si utilizza KO? Quali vantaggi ci offre? Quali librerie ci vengono in aiuto? Quali sarebbe meglio evitare?
Rich client application: MVC4 + MVVM = Knockout.jsGiorgio Di Nardo
La sempre maggiore diffusione di device diversificati (PC, Notebook, Tablet, Smartphone, ecc.) su piattaforme diverse, rilancia l'utilizzo delle Web Application come strumento per raggiungere il maggior numero di potenziali clienti con il minimo sforzo. Le capacità avanzate dei nuovi device e le ultime tecnologie ci consentono però di evolvere il concetto classico di applicazione Web in una declinazione più veloce, più responsiva, più accattivante: vediamo come.
PASS Virtual Chapter - SQL Server Continuous IntegrationAlessandro Alpi
Build automatizzate, esecuzione di unit test, creazione di un pacchetto nuget, ecco cosa serve per essere pronti con SQL Server e la continuous integration
Event: Giffoni Open Makers Day 2013
Speaker: Fabrizio Lapiello
Questo talk è strutturato "Step by Step" per presentare in modo semplice ed intuitivo il framework Django, gli step sono incentrati sugli aspetti più appetibili e funzionali del framework fornendo informazioni di base su come utilizzarlo in ambiente Google App Engine.
Andrea Ceroni - Alexa, please deploy my Azure architecture - Codemotion Rome ...Codemotion
What about the possibility to scaffold and deploy your architecture using the voice? During this talk we'll see how this can be possible. We'll take Alexa and Azure as an example but ideally you can do the same with other technologies. Maybe soon this task will be much more fun!
Selenium e testing web - di Alessio BenedettiGiuneco S.r.l
Selenium framework: Selenium è un framework open-source per l'automazione e il testing di applicazioni web che permette di controllare in remoto le istanze del browser ed emulare l'interazione di un utente.
Il buon programmatore - consigli pratici per una vita feliceAndrea Dottor
Lavorando come consulente mi sono trovato spesso di fronte a problematiche (a volte banali), ma che erano la causa di gravi problemi di performance dell'appliccazione realizzata, oppure più banali, ma che rendevano il codice meno manutenibile e gestibile, specialmente lavorando in team. Vedere che nel tempo, persone/realtà diverse, commettono gli stessi errori mi ha fatto pensare a questa sessione...dove intendo elencare i problemi più comuni, che per causa di tempo o scarsa conoscenza, vengono commessi, e proporre delle soluzioni semplici da poter applicare fin da subito. (ASP.NET, ma non solo)
Applicazioni Web ultra-performanti con Vue.js e DelphiMarco Breveglieri
Vue.js è un framework per creare interfacce utente estremamente performanti e che può essere introdotto progressivamente nelle vostre applicazioni Web, nel modo meno invasivo possibile. In questo talk scoprirete come utilizzarlo con Delphi creando una soluzione frontend e backend ad elevate prestazioni.
Similar to Tech Webinar: Test e2e per AngularJS e non solo (20)
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...Codemotion
Increased complexity makes it very hard and time-consuming to keep your software bug-free and secure. We introduce fuzz-testing as a method for automatically and continuously discovering vulnerabilities hidden in your code. The talk will explain how fuzzing works and how to integrate fuzz-testing into your Software Development Life Cycle to increase your code’s security.
Pompili - From hero to_zero: The FatalNoise neverending storyCodemotion
It was 1993 when we decided to venture in a beat'em up game for Amiga. The Catalypse's success story pushed me and my comrade to create something astonishing for this incredible game machine... but things went harder, assumptions were slightly different, and italian competitors appeared out of nowhere... the project died in 1996. Story ended? Probably not...
Il Commodore 65 è un prototipo di personal computer che Commodore avrebbe dovuto mettere in commercio quale successore del Commodore 64. Purtroppo la sua realizzazione si fermò appunto allo stadio prototipale. Racconterò l'affascinante storia del suo sviluppo ed il perchè della soppressione del progetto ormai ad un passo dalla immissione in commercio.
Rivivere l'ebbrezza di progettare un vecchio computer o una consolle da bar è oggi possibile sfruttando le FPGA, ovvero logiche programmabili che consentono a chiunque di progettare il proprio hardware o di ricrearne uno del passato. In questa sessione si racconta come dal reverse engineering dell'hardware di vecchie glorie come il Commodore 64 e lo ZX Spectrum sia stato possibile farle rivivere attraverso tecnologie oggi alla portata di tutti.
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...Codemotion
There's a lot of talk about blockchain, but how does the technology behind it actually work? For developers, getting some hands-on experience is the fastest way to get familiair with new technologies. So let's build a blockchain, then! In this session, we're going to build one in plain old Java, and have it working in 40 minutes. We'll cover key concepts of a blockchain: transactions, blocks, mining, proof-of-work, and reaching consensus in the blockchain network. After this session, you'll have a better understanding of core aspects of blockchain technology.
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019Codemotion
When was the last time you were truly lost? Thanks to the maps and location technology in our phones, a whole generation has now grown up in a world where getting lost is truly a thing of the past. Location technology goes far beyond maps in the palm of our hand, however. In this talk, we will explore how a ridesharing app works. How do we discover our destination?How do we find the closest driver? How do we display this information on a map? How do we find the best route?To answer these questions,we will be learning about a variety of location APIs, including Maps, Positioning, Geocoding etc.
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019Codemotion
Eward Driehuis, SecureLink's research chief, will guide you through the bumpy ride we call the cyber threat landscape. As the industry has over a decade of experience of dealing with increasingly sophisticated attacks, you might be surprised to hear more attacks slip through the cracks than ever. From analyzing 20.000 of them in 2018, backed by a quarter of a million security events and over ten trillion data points, Eward will outline why this happens, how attacks are changing, and why it doesn't matter how neatly or securely you code.
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 - Codemotion
IoT revolution is ended. Thanks to hardware improvement, building an intelligent ecosystem is easier than never before for both startups and large-scale enterprises. The real challenge is now to connect, process, store and analyze data: in the cloud, but also, at the edge. We’ll give a quick look on frameworks that aggregate dispersed devices data into a single global optimized system allowing to improve operational efficiency, to predict maintenance, to track asset in real-time, to secure cloud-connected devices and much more.
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...Codemotion
What if Virtual Reality glasses could transform your environment into a three-dimensional work of art in realtime in the style of a painting from Van Gogh? One of the many interesting developments in the field of Deep Learning is the so called "Style Transfer". It describes a possibility to create a patchwork (or pastiche) from two images. While one of these images defines the the artistic style of the result picture, the other one is used for extracting the image content. A team from TNG Technology Consulting managed to build an AI showcase using OpenCV and Tensorflow to realize such goggles.
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...Codemotion
The document summarizes some of the security issues with blockchain technology. It discusses how blockchain is not a "silver bullet" and does not inherently solve problems like privacy and security of smart devices. It outlines various application security issues with complex code, protocols, and difficulty of updates on blockchains. Concerns over data immutability and security of smart contracts are also covered. The document questions whether blockchain truly provides the level of decentralization and anonymity claimed, and outlines some impossibility results and limitations of existing approaches to achieving security and privacy in blockchain systems.
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...Codemotion
The document provides an overview of the HTTP network protocol in its early stages of development. It summarizes the initial IMP (Interface Message Processor) software used to establish connections and transmit messages over the ARPANET. It outlines some early requirements for host-to-host software to enable simple and advanced use between computer systems. The document also describes the initial host software specifications, including establishing connections, transmitting data efficiently, and implementing error checking between connected systems. This was one of the first documents to define core aspects of the early HTTP network protocol to enable information exchange over the fledgling internet.
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...Codemotion
Performance tests are not only an important instrument for understanding a system and its runtime environment. It is also essential in order to check stability and scalability – non-functional requirements that might be decisive for success. But won't my cloud hosting service scale for me as long as I can afford it? Yes, but… It only operates and scales resources. It won't automatically make your system fast, stable and scalable. This talk shows how such and comparable questions can be clarified with performance tests and how DevOps teams benefit from regular test practise.
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019Codemotion
Sascha will demonstrate the opportunities and challenges of Conversational AI learned from the practice. Both Technology and User Experience will be covered introducing a process finding micro-moments, writing happy paths, gathering intents, designing the conversational flow, and finally publishing on almost all channels including Voice Services and Chatbots. Valuable for enterprises, developers, and designers. All live on stage in just minutes and with almost no code.
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019Codemotion
A key challenge we face at Pacmed is quickly calibrating and deploying our tools for clinical decision support in different hospitals, where data formats may vary greatly. Using Intensive Care Units as a case study, I’ll delve into our scalable Python pipeline, which leverages Pandas’ split-apply-combine approach to perform complex feature engineering and automatic quality checks on large time-varying data, e.g. vital signs. I’ll show how we use the resulting flexible and interpretable dataframes to quickly (re)train our models to predict mortality, discharge, and medical complications.
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019Codemotion
Coolblue is a proud Dutch company, with a large internal development department; one that truly takes CI/CD to heart. Empowerment through automation is at the heart of these development teams, and with more than 1000 deployments a day, we think it's working out quite well. In this session, Pat Hermens (a Development Managers) will step you through what enables us to move so quickly, which tools we use, and most importantly, the mindset that is required to enable development teams to deliver at such a rapid pace.
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...Codemotion
Quantum computers can use all of the possible pathways generated by quantum decisions to solve problems that will forever remain intractable to classical compute power. As the mega players vie for quantum supremacy and Rigetti announces its $1M "quantum advantage" prize, we live in exciting times. IBM-Q and Microsoft Q# are two ways you can learn to program quantum computers so that you're ready when the quantum revolution comes. I'll demonstrate some quantum solutions to problems that will forever be out of reach of classical, including organic chemistry and large number factorisation.
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...Codemotion
Chinese food exploded across America in the early 20th century, rapidly adapting to local tastes while also spreading like wildfire. How was it able to spread so fast? The GY6 is a family of scooter engines that has achieved near total ubiquity in Europe. It is reliable and cheap to manufacture, and it's made in factories across China. How are these factories able to remain afloat? Chinese-American food and the GY6 are both riveting studies in product-market fit, and both are the product of a distributed open source-like development model. What lessons can we learn for open source software?
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019Codemotion
The design space has exploded in size within the last few years and Sketch is one of the most important milestones to represent the phenomenon. But behind the scenes of this growing reality there is a remote team that revolutionizes the design space all without leaving the home office. This talk will present how Sketch has grown to become a modern, product designer's tool.
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019Codemotion
Would you fly in a plane designed by a craftsman or would you prefer your aircraft to be designed by engineers? We are learning that science and empiricism works in software development, maybe now is the time to redefine what “Software Engineering” really means. Software isn't bridge-building, it is not car or aircraft development either, but then neither is Chemical Engineering. Engineering is different in different disciplines. Maybe it is time for us to begin thinking about retrieving the term "Software Engineering" maybe it is time to define what our "Engineering" discipline should be.
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019Codemotion
What is the job of a CTO and how does it change as a startup grows in size and scale? As a CTO, where should you spend your focus? As an engineer aspiring to be a CTO, what skills should you pursue? In this inspiring and personal talk, I describe my journey from early Red Hat engineer to CTO at Bloomon. I will share my view on what it means to be a CTO, and ultimately answer the question: Should the CTO be coding?
3. Hello world!
Io sono Luca Ferretti
Sono qui perché tutti i giorni
mi pagano per rompere siti, con
dedizione, metodo e disciplina
Nel tempo libero provo a rompere
anche ambienti desktop e
applicazioni OpenSource
Potete trovarmi su internet come
elle.uca (o elleuca … non tutti
amano il punto nell’username)
6. end-to-end test framework for AngularJS
applications
runs tests against your application
running in a real browser, interacting
with it as a user would
da http://protractortest.org
7. Introdotto durante la presentazione
AngularJS 1.2 and Beyond (giugno 2013)
Versione 1.0 rilasciata a luglio 2014
Ultima versione 1.6.x (gennaio 2015)
8. Tecnicamente è un programma Node.js
Dato un file di configurazione, esegue una
o più specifiche
È anche una API che estende WebDriverJS
27. Se WebDriver
API per guidare i browser
Se IDE & Se RC
Old and deprecated
Se Server/Grid
Servizio per impostare un parco
browser
28. COSA OFFRE ESATTAMENTE SELENIUM API
NAVIGAZIONE
Apri un URL, vai
indietro, vai avanti,
aggiorna.
INTERROGAZIONE
Dimmi l’URL o il titolo,
cerca uno specifico
elemento, dimmi lo stato
di certo elemento.
MANIPOLAZIONE
Fai clic, digita del
testo, trascina.
SINCRONIZZAZIONE
Aspetta a interrogare o a
manipolare la pagina fino
a che non è verificata una
certa condizione.
Varie & Eventuali
Alert, iframe, cookie,
javascript, html5, ...
Browser Caps
Usa un browser locale o
remoto con determinate
capability.
29. Do It Yourself
Scegliere il framework più
opportuno per
runner/assertion/other
(Cucumber, JUnit, …)
31. Choose a browser to start
“interface's
invocations and
responses that are
to be used by
browser vendors to
ensure
interoperability”
W3C WebDriver vs Se WebDriver
“this specification is strongly based on an existing
Open Source project, Selenium WebDriver”
48. Interrogazione - elementi
▪ element(by.locator)
▪ element(…).element(by.locator)
▪ element.all(by.locator)
In realtà sono degli ElementFinder
(ElementArrayFinder) per i
WebElement di WebDriver, la
conversione è trasparente.
49. Interrogazione - locator
▪ binding, model, repeater …
▪ id, css, tagName …
I locator più classici sono estesi
da locator specifici per AngularJS.
Funzionano per strategia + target
es: element(by.id(‘login-psw’))
50. Interrogazione - stati
▪ getQualcosa()
▪ isUncertoStato()
Attributi, posizioni, presenza,
visibilità e altro.
In pratica tutto quello che sa il
browser di un certo elemento del
DOM (notare: il browser)
51. Manipolazione - I
▪ el1.click()
▪ el2.clear().sendKeys(‘abc’)
▪ form.submit()
Asincrone + fluent (ove possibile),
si limitano alle azioni base che si
può eseguire su un elemento.
Non fidatevi del sendKeys() :P
59. QUESTO NON È UN FRAMEWORK PER UNIT TEST
Usa i test
funzionali per
codificare le user
story, mantienili
semplici da leggere,
verifica solo gli
“happy path”.
Mantienili
aggiornati o muori.
60. TIMEOUT E SINCRONIZZAZIONE
Emulare le azioni di
un utente non vuol
dire farle alla
stessa velocità.
Prima di interagire
con un elemento
accertati che sia
nello stato in cui
dovrebbe essere.
select1.click()
select1.option1.click()
select2.click()
browser.wait(...).then(...)
62. USA I PAGE OBJECT, GIOVANE PADAWAN
Crea degli oggetti
che interagiscano
con gli “elementi”
della pagina, usa i
loro metodi nei file
spec.
var Login = function() {
this.user = element(...);
this.pwd = element(...);
this.btn = element(...);
this.do = function(){...}
};
module.exports = Login;
-----
var lg = new Login();
login.do();
expect(hp.isIn()).toBeTruty()
63. TELL DON’T ASK, SE SEI UN JEDI
Se hai creato un
page object, lascia
che tutta la logica
sia nel page object.
Gli expect nella
spec possono essere
sostituiti da errori
gestiti nel page
object.
homepage.load()
homepage.doLogin()
-----
this.doLogin = function() {
...
login.do();
// start checks here
this.userMenu.isPresent()
this.userMenu.isDisplayed()
...
}
64. Facciamo un po’ di pratica
dal vivo?
https://github.com/elleuca/codemotion-webinar-ferretti
Go Live!
65. RIFERIMENTI
Un po’ di link sparsi con risorse importanti da
approfondire:
▪ https://code.google.com/p/selenium/wiki/WebDriverJs
▪ https://github.
com/angular/protractor/blob/master/docs/referenceConf.
js
▪ http://angular.github.io/protractor/#/api
▪ https://code.google.
com/p/selenium/wiki/InternetExplorerDriver
▪ http://martinfowler.com/bliki/PageObject.html
▪ http://martinfowler.com/bliki/TellDontAsk.html
e mi raccomando, non credete mai troppo a quello che
trovate scritto su Internet
66. CREDITS
Un grazie speciale al team di Codemotion e Codemotion
Training
Un dovuto riconoscimento a
▪ Busy Icons di Olly Holovchenko
▪ Il template di SlidesCarnival
▪ Le fotografie di Dean Hochman
▪ The Internet Chuck Norris Database
67. Thanks!
join the code side
(we have cookies)
potete trovarmi:
@elleuca
elle.uca@gmail.com