SlideShare uma empresa Scribd logo
1 de 45
Baixar para ler offline
Front-end Automated TestingFront-end Automated Testing
#drupal-fat#drupal-fat
I don't know
what I like
more: Drupal
or Beer
@rteijeiro
Ruben TeijeiroRuben Teijeiro
@rteijeiro
Web DevelopmentWeb Development
I'm configuring the
server. It will be ready
in a few weeks.
Dev OpsDev Ops
WTF!!
This design is really
fancy. I made it shiny
and edgy. Now it pops!!
DesignersDesigners
So what?
Content ManagersContent Managers
In-place Content Authoring
Holy shit!
We want
something like
Facebook, but we
need it yesterday.
And banners with
kittens. Everyone
loves kittens.
We should use
Comic Sans, it's
such a fancy and
funny font.
CustomersCustomers
OMG!!
BrowsersBrowsers
CSSCSS
I said "float: left"!!!
RefactoringRefactoring
Fixed Fixed
Fixed
Fixed
Fixed
Fixed
Fixed
Final ResultFinal Result
And now I will show
you how it looks in
Internet Explorer 7
Now
what?!!
FATFAT
Front-end Automated TestingFront-end Automated Testing
Because people likes code that works
Continuous IntegrationContinuous Integration
● Automated
● Repeteable
● Easy to understand
● Incremental
● Easy to run
● Fast
Unit TestUnit Test
● QUnit
● Selenium
● Jasmine
● PhantomJS
● YUI Test
Testing ToolsTesting Tools
QUnitQUnit
getInfo: function() {
return {
name: 'Drupal Test',
description: 'My first Drupal test',
group: 'Tests'
};
}
Test ConfigurationTest Configuration
Test ConfigurationTest Configuration
setup: function() {
this.bbq = "Put some bacon here...";
}
Test ConfigurationTest Configuration
teardown: function() {
this.bbq = "More bacon for the bbq.";
}
● ok
● equal
● notEqual
● deepEqual
● notDeepEqual
● strictEqual
● notStrictEqual
● throws
AssertionsAssertions
this.bbq = true;
QUnit.ok(this.bbq,
Drupal.t('We have barbecue.'));
QUnit.okQUnit.ok
this.bbq = 'Bacon';
QUnit.equal(this.bbq, 'Bacon',
Drupal.t('This is a Bacon Barbecue'));
QUnit.equalQUnit.equal
this.bbq = 'Bacon';
QUnit.notEqual(this.bbq, 'Chicken',
Drupal.t('This is not a Chicken Barbecue'));
QUnit.notEqualQUnit.notEqual
this.bbq = { meat: 'Bacon' };
QUnit.deepEqual(this.bbq, {meat: 'Bacon' },
Drupal.t('This is a Bacon Barbecue'));
QUnit.deepEqualQUnit.deepEqual
this.bbq = { meat: 'Chicken' };
QUnit.notDeepEqual(this.bbq, {meat: 'Bacon' },
Drupal.t('This is not a Bacon Barbecue'));
QUnit.notDeepEqualQUnit.notDeepEqual
this.bbq = 'Bacon';
QUnit.strictEqual(this.bbq, 'Bacon',
Drupal.t('This is a Bacon Barbecue'));
QUnit.strictEqualQUnit.strictEqual
this.bbq = 5;
QUnit.notStrictEqual(this.bbq, '5',
Drupal.t('This is not a Barbecue for 5'));
QUnit.notStrictEqualQUnit.notStrictEqual
throws(
function() {
throw "No barbecue."
},
"There is no barbecue."
);
QUnit.throwsQUnit.throws
Synchronous CallbacksSynchronous Callbacks
QUnit.expect(3);
this.bbq = 'Bacon';
QUnit.ok(this.bbq = 'Bacon', Drupal.t('Bacon barbecue.'));
QUnit.equal(this.bbq, 'Bacon', Drupal.t('Bacon barbecue.'));
QUnit.deepEqual(this.bbq, 'Bacon', Drupal.t('Bacon
barbecue.'));
Asynchronous CallbacksAsynchronous Callbacks
var delay = 1000;
this.bbq = 'Bacon';
QUnit.stop();
setTimeout( function() {
QUnit.ok(this.bbq == 'Bacon', Drupal.t('1 second barbecue.');
QUnit.start();
}, delay);
Testing User ActionsTesting User Actions
this.bbq.val('Bacon').trigger('keyup');
QUnit.ok(this.bbq.val == 'Bacon',
Drupal.t('Barbecue with keyup.'));
ResourcesResources
http://drupal.org/project/fat
TestSwarmTestSwarm
http://drupal.org/project/testswarm
BrowserStackBrowserStack
http://www.browserstack.com
DemoDemo
QuestionsQuestions
?
rteijeiro@drewpull.com

Mais conteúdo relacionado

Mais procurados

UI Testing Automation
UI Testing AutomationUI Testing Automation
UI Testing Automation
AgileEngine
 

Mais procurados (20)

Nightwatch JS for End to End Tests
Nightwatch JS for End to End TestsNightwatch JS for End to End Tests
Nightwatch JS for End to End Tests
 
Automated Frontend Testing
Automated Frontend TestingAutomated Frontend Testing
Automated Frontend Testing
 
Nightwatch at Tilt
Nightwatch at TiltNightwatch at Tilt
Nightwatch at Tilt
 
Protractor Tutorial Quality in Agile 2015
Protractor Tutorial Quality in Agile 2015Protractor Tutorial Quality in Agile 2015
Protractor Tutorial Quality in Agile 2015
 
High Performance JavaScript 2011
High Performance JavaScript 2011High Performance JavaScript 2011
High Performance JavaScript 2011
 
Jellyfish, JSCONF 2011
Jellyfish, JSCONF 2011Jellyfish, JSCONF 2011
Jellyfish, JSCONF 2011
 
Automated Testing using JavaScript
Automated Testing using JavaScriptAutomated Testing using JavaScript
Automated Testing using JavaScript
 
Carmen Popoviciu - Protractor styleguide | Codemotion Milan 2015
Carmen Popoviciu - Protractor styleguide | Codemotion Milan 2015Carmen Popoviciu - Protractor styleguide | Codemotion Milan 2015
Carmen Popoviciu - Protractor styleguide | Codemotion Milan 2015
 
Introduction To Web Application Testing
Introduction To Web Application TestingIntroduction To Web Application Testing
Introduction To Web Application Testing
 
AngularJS and Protractor
AngularJS and ProtractorAngularJS and Protractor
AngularJS and Protractor
 
20160905 - BrisJS - nightwatch testing
20160905 - BrisJS - nightwatch testing20160905 - BrisJS - nightwatch testing
20160905 - BrisJS - nightwatch testing
 
Protractor for angularJS
Protractor for angularJSProtractor for angularJS
Protractor for angularJS
 
Automated Web Testing using JavaScript
Automated Web Testing using JavaScriptAutomated Web Testing using JavaScript
Automated Web Testing using JavaScript
 
Automated Testing with Cucumber, PhantomJS and Selenium
Automated Testing with Cucumber, PhantomJS and SeleniumAutomated Testing with Cucumber, PhantomJS and Selenium
Automated Testing with Cucumber, PhantomJS and Selenium
 
APIs: A Better Alternative to Page Objects
APIs: A Better Alternative to Page ObjectsAPIs: A Better Alternative to Page Objects
APIs: A Better Alternative to Page Objects
 
How to Use Selenium, Successfully
How to Use Selenium, SuccessfullyHow to Use Selenium, Successfully
How to Use Selenium, Successfully
 
Better End-to-End Testing with Page Objects Model using Protractor
Better End-to-End Testing with Page Objects Model using ProtractorBetter End-to-End Testing with Page Objects Model using Protractor
Better End-to-End Testing with Page Objects Model using Protractor
 
Testing with Codeception (Webelement #30)
Testing with Codeception (Webelement #30)Testing with Codeception (Webelement #30)
Testing with Codeception (Webelement #30)
 
UI Testing Automation
UI Testing AutomationUI Testing Automation
UI Testing Automation
 
Test your Javascript! v1.1
Test your Javascript! v1.1Test your Javascript! v1.1
Test your Javascript! v1.1
 

Semelhante a Front-end Automated Testing

Os Koziarsky
Os KoziarskyOs Koziarsky
Os Koziarsky
oscon2007
 

Semelhante a Front-end Automated Testing (20)

What Actually UI/UX Designer Do?
What Actually UI/UX Designer Do?What Actually UI/UX Designer Do?
What Actually UI/UX Designer Do?
 
What TDD Can Teach Us About API Design
What TDD Can Teach Us About API DesignWhat TDD Can Teach Us About API Design
What TDD Can Teach Us About API Design
 
.Net Squad. Deployments. Workflow. Namics
.Net Squad. Deployments. Workflow. Namics.Net Squad. Deployments. Workflow. Namics
.Net Squad. Deployments. Workflow. Namics
 
Full stack-web-design
Full stack-web-designFull stack-web-design
Full stack-web-design
 
Hacking to be performant
Hacking to be performantHacking to be performant
Hacking to be performant
 
Angular ❤️ CMS from #AngularUp
Angular ❤️ CMS from #AngularUpAngular ❤️ CMS from #AngularUp
Angular ❤️ CMS from #AngularUp
 
Django Girls Tutorial
Django Girls TutorialDjango Girls Tutorial
Django Girls Tutorial
 
Crawling & Indexing for JavaScript Heavy Sites brightonSEO 2021
Crawling & Indexing for JavaScript Heavy Sites brightonSEO 2021Crawling & Indexing for JavaScript Heavy Sites brightonSEO 2021
Crawling & Indexing for JavaScript Heavy Sites brightonSEO 2021
 
Letter to a Junior Developer: The Engineering Side of Programming
Letter to a Junior Developer: The Engineering Side of ProgrammingLetter to a Junior Developer: The Engineering Side of Programming
Letter to a Junior Developer: The Engineering Side of Programming
 
Building Droids with JavaScript
Building Droids with JavaScriptBuilding Droids with JavaScript
Building Droids with JavaScript
 
Os Koziarsky
Os KoziarskyOs Koziarsky
Os Koziarsky
 
Paris Web - Javascript as a programming language
Paris Web - Javascript as a programming languageParis Web - Javascript as a programming language
Paris Web - Javascript as a programming language
 
Startup and Rapid web development
Startup and Rapid web developmentStartup and Rapid web development
Startup and Rapid web development
 
Share point developer who’s that
Share point developer who’s thatShare point developer who’s that
Share point developer who’s that
 
Workshop Intro: FrontEnd General Overview
Workshop Intro: FrontEnd General OverviewWorkshop Intro: FrontEnd General Overview
Workshop Intro: FrontEnd General Overview
 
Quo vadis, JavaScript? Devday.pl keynote
Quo vadis, JavaScript? Devday.pl keynoteQuo vadis, JavaScript? Devday.pl keynote
Quo vadis, JavaScript? Devday.pl keynote
 
Charts, PDFs, and PHP
Charts, PDFs, and PHPCharts, PDFs, and PHP
Charts, PDFs, and PHP
 
15 Ways To A Blistering-Fast Web Site
15 Ways To A Blistering-Fast Web Site15 Ways To A Blistering-Fast Web Site
15 Ways To A Blistering-Fast Web Site
 
Performance as UX with Justin Howlett
Performance as UX with Justin HowlettPerformance as UX with Justin Howlett
Performance as UX with Justin Howlett
 
Building the future as a full stack dev
Building the future as a full stack devBuilding the future as a full stack dev
Building the future as a full stack dev
 

Mais de Ruben Teijeiro

Mais de Ruben Teijeiro (13)

Architecting your Frontend
Architecting your FrontendArchitecting your Frontend
Architecting your Frontend
 
Startup Wars
Startup WarsStartup Wars
Startup Wars
 
Drupal
DrupalDrupal
Drupal
 
Headless Drupal 8
Headless Drupal 8Headless Drupal 8
Headless Drupal 8
 
Contributing to Drupal 8 - Frankfurt
Contributing to Drupal 8 - FrankfurtContributing to Drupal 8 - Frankfurt
Contributing to Drupal 8 - Frankfurt
 
Contributing to Drupal 8
Contributing to Drupal 8Contributing to Drupal 8
Contributing to Drupal 8
 
Drupal Heroes
Drupal HeroesDrupal Heroes
Drupal Heroes
 
Drupal8 Front-end Automated Testing
Drupal8 Front-end Automated TestingDrupal8 Front-end Automated Testing
Drupal8 Front-end Automated Testing
 
Drupal Mobile
Drupal MobileDrupal Mobile
Drupal Mobile
 
Twittalicious - Organiza tus Redes Sociales
Twittalicious - Organiza tus Redes SocialesTwittalicious - Organiza tus Redes Sociales
Twittalicious - Organiza tus Redes Sociales
 
Twittalicious - Desarrollo de un Producto con Drupal
Twittalicious - Desarrollo de un Producto con DrupalTwittalicious - Desarrollo de un Producto con Drupal
Twittalicious - Desarrollo de un Producto con Drupal
 
Metodologia de Trabajo en Proyectos con Drupal
Metodologia de Trabajo en Proyectos con DrupalMetodologia de Trabajo en Proyectos con Drupal
Metodologia de Trabajo en Proyectos con Drupal
 
Drush - More Beer, Less Effort
Drush - More Beer, Less EffortDrush - More Beer, Less Effort
Drush - More Beer, Less Effort
 

Último

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 

Front-end Automated Testing