SlideShare una empresa de Scribd logo
BDDUI Testing
Qué veremos?
● BDD
● Cucumber
● Gherkin
● Mini Prueba
Y si pudieras escribir tus tests así:
Scenario: Accessing the home page
Given a user that wants to rent a car
And a list of cars to rent
When the user access the "/welcome" page
Then they can see the list of cars
And each car should display the following fields:
| a picture |
| a name |
| a description |
| an availability identifier |
| and a price |
BDD
Behaviour Driven Development
BDD
● Metodología de desarrollo de software, similar a TDD.
● Sirve de comunicación entre el cliente y los
desarrolladores.
● Se enfoca en el fondo, no en la forma.
Ventajas
● Buen comienzo para aprender a hacer pruebas.
● El mismo cliente puede escribir las pruebas, o al menos
verificarlas y entenderlas.
● Pueden servir como criterios de aceptación.
Por qué BDD UI Testing?
● Garantiza que los requerimientos del cliente se cumplan.
● Ayuda a detectar daños realizados tras haber hecho
cambios en la aplicación.
● Es más fácil definir casos de usos usando backgrounds.
Desventajas
● Pueden fallar por causas ajenas a ti o a tu aplicación.
● No le importa la calidad del código.
● Dependen del correcto funcionamiento de la aplicación
completa.
Componentes
Gherkin Cucumber Protractor Chai
Gherkin
Gherkin
● Lenguaje de dominio específico (solo sirve para una
cosa).
● Describe los componentes que conforman la aplicación.
● Solo describe como debe de funcionar la aplicación. No
corre las pruebas.
Gherkin
● Feature
● Scenario
● Steps
● Backgrounds
Gherkin - Step definitions
Given When Then
● And
● And
● But
● And
● And
● But
● And
● And
● But
Feature: Multiple site support
As a Mephisto site owner
I want to host blogs for different people
In order to make gigantic piles of money
Background:
Given a global administrator named "Greg"
And a blog named "Greg's anti-tax rants"
And a customer named "Dr. Bill"
And a blog named "Expensive Therapy" owned by "Dr. Bill"
Scenario: Dr. Bill posts to his own blog
Given I am logged in as Dr. Bill
When I try to post to "Expensive Therapy"
Then I should see "Your article was published."
Scenario: Dr. Bill tries to post to somebody else's blog, and fails
Given I am logged in as Dr. Bill
When I try to post to "Greg's anti-tax rants"
Then I should see "Hey! That's not your blog!"
Scenario: Greg posts to a client's blog
Given I am logged in as Greg
When I try to post to "Expensive Therapy"
Then I should see "Your article was published."
Cucumber
● Feature files
● World
● Step definitions
● Hooks
Cucumber
Protractor
● Hace la integración entre las pruebas y el
browser.
● Provee un WebDriver que permite controlar
cualquier interacción con el browser.
Protractor
Protractor - Ejemplo
browser.get('http://example.com');
element(by.css('form input[type=search]')).sendKeys('Hello');
element(by.css('form button')).click();
browser.sleep(1000);
expect(element.all(by.css('.result')).count()).toBe(5);
Preguntas?
Imágenes: http://princesscheeto.tumblr.com/

Más contenido relacionado

Destacado

Seguridad en Aplicaciones Web y Comercio Electrónico
Seguridad en Aplicaciones Web y Comercio ElectrónicoSeguridad en Aplicaciones Web y Comercio Electrónico
Seguridad en Aplicaciones Web y Comercio Electrónico
René Olivo
 
Pagos electrónicos
Pagos electrónicosPagos electrónicos
Pagos electrónicos
René Olivo
 
How to Effectively Secure your Assets
How to Effectively Secure your AssetsHow to Effectively Secure your Assets
How to Effectively Secure your Assets
globaledit®
 
Web UI testing using Ruby,Watir and Cucumber with BDD technique
Web UI testing using Ruby,Watir and Cucumber with BDD techniqueWeb UI testing using Ruby,Watir and Cucumber with BDD technique
Web UI testing using Ruby,Watir and Cucumber with BDD technique
arpith pathange
 
Ui automation testing
Ui automation testingUi automation testing
Ui automation testing
Alexander Rashkov
 
Jenkins Days - Workshop - Let's Build a Pipeline - Los Angeles
Jenkins Days - Workshop - Let's Build a Pipeline - Los AngelesJenkins Days - Workshop - Let's Build a Pipeline - Los Angeles
Jenkins Days - Workshop - Let's Build a Pipeline - Los Angeles
Andy Pemberton
 
How Automation is Changing The Testing Scene
How Automation is Changing The Testing SceneHow Automation is Changing The Testing Scene
How Automation is Changing The Testing Scene
suneratechnologies
 
Principles of secure system design
Principles of secure system designPrinciples of secure system design
Principles of secure system design
John Scrimsher
 
Embedded Systems Security: Building a More Secure Device
Embedded Systems Security: Building a More Secure DeviceEmbedded Systems Security: Building a More Secure Device
Embedded Systems Security: Building a More Secure Device
Priyanka Aash
 
Emacscript 6
Emacscript 6Emacscript 6
Emacscript 6
René Olivo
 
Usabiltyvs Security Case study of SmartPhone OS
Usabiltyvs Security Case study of SmartPhone OSUsabiltyvs Security Case study of SmartPhone OS
Usabiltyvs Security Case study of SmartPhone OS
Rajiv Ranjan Singh
 
TUD CS4105 | 2015 | Lecture 1
TUD CS4105 | 2015 | Lecture 1TUD CS4105 | 2015 | Lecture 1
TUD CS4105 | 2015 | Lecture 1
Eelco Visser
 
Security Training: #1 What Actually a Security Is?
Security Training: #1 What Actually a Security Is?Security Training: #1 What Actually a Security Is?
Security Training: #1 What Actually a Security Is?Yulian Slobodyan
 
Behavior Driven Development (BDD)
Behavior Driven Development (BDD)Behavior Driven Development (BDD)
Behavior Driven Development (BDD)
Ajay Danait
 
BDD presentation
BDD presentationBDD presentation
BDD presentation
temebele
 
NPS Driven Growth or How to grow your startup w
NPS Driven Growth or How to grow your startup wNPS Driven Growth or How to grow your startup w
NPS Driven Growth or How to grow your startup w
Nilan Peiris
 
Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)
Lars Thorup
 
Behavior Driven Development
Behavior Driven DevelopmentBehavior Driven Development
Behavior Driven Development
Liz Keogh
 
2015 Upload Campaigns Calendar - SlideShare
2015 Upload Campaigns Calendar - SlideShare2015 Upload Campaigns Calendar - SlideShare
2015 Upload Campaigns Calendar - SlideShare
SlideShare
 

Destacado (20)

Seguridad en Aplicaciones Web y Comercio Electrónico
Seguridad en Aplicaciones Web y Comercio ElectrónicoSeguridad en Aplicaciones Web y Comercio Electrónico
Seguridad en Aplicaciones Web y Comercio Electrónico
 
Pagos electrónicos
Pagos electrónicosPagos electrónicos
Pagos electrónicos
 
How to Effectively Secure your Assets
How to Effectively Secure your AssetsHow to Effectively Secure your Assets
How to Effectively Secure your Assets
 
Seguridad WiFi
Seguridad WiFiSeguridad WiFi
Seguridad WiFi
 
Web UI testing using Ruby,Watir and Cucumber with BDD technique
Web UI testing using Ruby,Watir and Cucumber with BDD techniqueWeb UI testing using Ruby,Watir and Cucumber with BDD technique
Web UI testing using Ruby,Watir and Cucumber with BDD technique
 
Ui automation testing
Ui automation testingUi automation testing
Ui automation testing
 
Jenkins Days - Workshop - Let's Build a Pipeline - Los Angeles
Jenkins Days - Workshop - Let's Build a Pipeline - Los AngelesJenkins Days - Workshop - Let's Build a Pipeline - Los Angeles
Jenkins Days - Workshop - Let's Build a Pipeline - Los Angeles
 
How Automation is Changing The Testing Scene
How Automation is Changing The Testing SceneHow Automation is Changing The Testing Scene
How Automation is Changing The Testing Scene
 
Principles of secure system design
Principles of secure system designPrinciples of secure system design
Principles of secure system design
 
Embedded Systems Security: Building a More Secure Device
Embedded Systems Security: Building a More Secure DeviceEmbedded Systems Security: Building a More Secure Device
Embedded Systems Security: Building a More Secure Device
 
Emacscript 6
Emacscript 6Emacscript 6
Emacscript 6
 
Usabiltyvs Security Case study of SmartPhone OS
Usabiltyvs Security Case study of SmartPhone OSUsabiltyvs Security Case study of SmartPhone OS
Usabiltyvs Security Case study of SmartPhone OS
 
TUD CS4105 | 2015 | Lecture 1
TUD CS4105 | 2015 | Lecture 1TUD CS4105 | 2015 | Lecture 1
TUD CS4105 | 2015 | Lecture 1
 
Security Training: #1 What Actually a Security Is?
Security Training: #1 What Actually a Security Is?Security Training: #1 What Actually a Security Is?
Security Training: #1 What Actually a Security Is?
 
Behavior Driven Development (BDD)
Behavior Driven Development (BDD)Behavior Driven Development (BDD)
Behavior Driven Development (BDD)
 
BDD presentation
BDD presentationBDD presentation
BDD presentation
 
NPS Driven Growth or How to grow your startup w
NPS Driven Growth or How to grow your startup wNPS Driven Growth or How to grow your startup w
NPS Driven Growth or How to grow your startup w
 
Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)
 
Behavior Driven Development
Behavior Driven DevelopmentBehavior Driven Development
Behavior Driven Development
 
2015 Upload Campaigns Calendar - SlideShare
2015 Upload Campaigns Calendar - SlideShare2015 Upload Campaigns Calendar - SlideShare
2015 Upload Campaigns Calendar - SlideShare
 

Similar a BDD UI testing

Cas 2017 bdd-colaborando_de_verdad_con_negocio
Cas 2017 bdd-colaborando_de_verdad_con_negocioCas 2017 bdd-colaborando_de_verdad_con_negocio
Cas 2017 bdd-colaborando_de_verdad_con_negocio
Eduardo Riol
 
Meetup bdd & tdd: aprovecha_su_poder
Meetup bdd & tdd: aprovecha_su_poderMeetup bdd & tdd: aprovecha_su_poder
Meetup bdd & tdd: aprovecha_su_poder
Eduardo Riol
 
Crowdar - Introducción a BDD
Crowdar - Introducción a BDDCrowdar - Introducción a BDD
Crowdar - Introducción a BDD
Javier Re
 
Migrando a Android O
Migrando a Android OMigrando a Android O
Migrando a Android O
Julián Ezequiel Picó
 
Introduccion al desarrollo guiado por comportamiento
Introduccion al desarrollo guiado por comportamientoIntroduccion al desarrollo guiado por comportamiento
Introduccion al desarrollo guiado por comportamiento
Alejandro Hernández
 
Cómo auditar tu presencia online | Montserrat Cano - Webinar SiteGround
Cómo auditar tu presencia online | Montserrat Cano - Webinar SiteGroundCómo auditar tu presencia online | Montserrat Cano - Webinar SiteGround
Cómo auditar tu presencia online | Montserrat Cano - Webinar SiteGround
SiteGround España
 
Estategias web para conquistar clientes
Estategias web para conquistar clientesEstategias web para conquistar clientes
Estategias web para conquistar clientes
Carlos Andrés Masso Lopez
 
Masterclass - Cómo comunicar tu idea al mercado con Wordpress
Masterclass - Cómo comunicar tu idea al mercado con WordpressMasterclass - Cómo comunicar tu idea al mercado con Wordpress
Masterclass - Cómo comunicar tu idea al mercado con Wordpress
Toni Padrell
 
Utiliza el CRO para mejorar tus campañas creativas, Consejos, beneficios y t...
Utiliza el CRO para mejorar tus campañas creativas, Consejos, beneficios y t...Utiliza el CRO para mejorar tus campañas creativas, Consejos, beneficios y t...
Utiliza el CRO para mejorar tus campañas creativas, Consejos, beneficios y t...
VWO
 
10 Consejos para Freelance
10 Consejos para Freelance10 Consejos para Freelance
10 Consejos para Freelance
Blogdelfreelance .com
 
No quiero vuestra basura en Android
No quiero vuestra basura en AndroidNo quiero vuestra basura en Android
No quiero vuestra basura en Android
Antonio Nicolás Pina
 
Bdd, cucumber y gherkin. desarrollo dirigido por comportamiento
Bdd, cucumber y gherkin. desarrollo dirigido por comportamientoBdd, cucumber y gherkin. desarrollo dirigido por comportamiento
Bdd, cucumber y gherkin. desarrollo dirigido por comportamiento
Roberto Andres Remonda
 
Ejecución de servicios digitales y negocios en Internet
Ejecución de servicios digitales y negocios en InternetEjecución de servicios digitales y negocios en Internet
Ejecución de servicios digitales y negocios en Internet
Asier Marqués
 
Estrategia Guest Bloggin anti Penguin
Estrategia Guest Bloggin anti PenguinEstrategia Guest Bloggin anti Penguin
Estrategia Guest Bloggin anti Penguin
Pablo Baselice
 
QA en SEO: Amigos con derecho a roce - Drupalcamp 2019
QA en SEO: Amigos con derecho a roce - Drupalcamp 2019QA en SEO: Amigos con derecho a roce - Drupalcamp 2019
QA en SEO: Amigos con derecho a roce - Drupalcamp 2019
La Drupalera
 
ATDD - Desarrollo Dirigido por Test de Aceptación
ATDD - Desarrollo Dirigido por Test de AceptaciónATDD - Desarrollo Dirigido por Test de Aceptación
ATDD - Desarrollo Dirigido por Test de Aceptación
Paulo Clavijo
 
Jimbo (2)
Jimbo (2)Jimbo (2)

Similar a BDD UI testing (20)

Cas 2017 bdd-colaborando_de_verdad_con_negocio
Cas 2017 bdd-colaborando_de_verdad_con_negocioCas 2017 bdd-colaborando_de_verdad_con_negocio
Cas 2017 bdd-colaborando_de_verdad_con_negocio
 
Meetup bdd & tdd: aprovecha_su_poder
Meetup bdd & tdd: aprovecha_su_poderMeetup bdd & tdd: aprovecha_su_poder
Meetup bdd & tdd: aprovecha_su_poder
 
Crowdar - Introducción a BDD
Crowdar - Introducción a BDDCrowdar - Introducción a BDD
Crowdar - Introducción a BDD
 
Migrando a Android O
Migrando a Android OMigrando a Android O
Migrando a Android O
 
Introduccion al desarrollo guiado por comportamiento
Introduccion al desarrollo guiado por comportamientoIntroduccion al desarrollo guiado por comportamiento
Introduccion al desarrollo guiado por comportamiento
 
Cómo auditar tu presencia online | Montserrat Cano - Webinar SiteGround
Cómo auditar tu presencia online | Montserrat Cano - Webinar SiteGroundCómo auditar tu presencia online | Montserrat Cano - Webinar SiteGround
Cómo auditar tu presencia online | Montserrat Cano - Webinar SiteGround
 
Estategias web para conquistar clientes
Estategias web para conquistar clientesEstategias web para conquistar clientes
Estategias web para conquistar clientes
 
Masterclass - Cómo comunicar tu idea al mercado con Wordpress
Masterclass - Cómo comunicar tu idea al mercado con WordpressMasterclass - Cómo comunicar tu idea al mercado con Wordpress
Masterclass - Cómo comunicar tu idea al mercado con Wordpress
 
Utiliza el CRO para mejorar tus campañas creativas, Consejos, beneficios y t...
Utiliza el CRO para mejorar tus campañas creativas, Consejos, beneficios y t...Utiliza el CRO para mejorar tus campañas creativas, Consejos, beneficios y t...
Utiliza el CRO para mejorar tus campañas creativas, Consejos, beneficios y t...
 
10 Consejos para Freelance
10 Consejos para Freelance10 Consejos para Freelance
10 Consejos para Freelance
 
No quiero vuestra basura en Android
No quiero vuestra basura en AndroidNo quiero vuestra basura en Android
No quiero vuestra basura en Android
 
Bdd, cucumber y gherkin. desarrollo dirigido por comportamiento
Bdd, cucumber y gherkin. desarrollo dirigido por comportamientoBdd, cucumber y gherkin. desarrollo dirigido por comportamiento
Bdd, cucumber y gherkin. desarrollo dirigido por comportamiento
 
Ejecución de servicios digitales y negocios en Internet
Ejecución de servicios digitales y negocios en InternetEjecución de servicios digitales y negocios en Internet
Ejecución de servicios digitales y negocios en Internet
 
Como crear una pagina web
Como crear una pagina webComo crear una pagina web
Como crear una pagina web
 
Eshow
EshowEshow
Eshow
 
Estrategia Guest Bloggin anti Penguin
Estrategia Guest Bloggin anti PenguinEstrategia Guest Bloggin anti Penguin
Estrategia Guest Bloggin anti Penguin
 
QA en SEO: Amigos con derecho a roce - Drupalcamp 2019
QA en SEO: Amigos con derecho a roce - Drupalcamp 2019QA en SEO: Amigos con derecho a roce - Drupalcamp 2019
QA en SEO: Amigos con derecho a roce - Drupalcamp 2019
 
ATDD - Desarrollo Dirigido por Test de Aceptación
ATDD - Desarrollo Dirigido por Test de AceptaciónATDD - Desarrollo Dirigido por Test de Aceptación
ATDD - Desarrollo Dirigido por Test de Aceptación
 
Crear pagina web
Crear pagina webCrear pagina web
Crear pagina web
 
Jimbo (2)
Jimbo (2)Jimbo (2)
Jimbo (2)
 

Más de René Olivo

How to code in the XXI century without losing your head
How to code in the XXI century without losing your headHow to code in the XXI century without losing your head
How to code in the XXI century without losing your head
René Olivo
 
Implementing bootstrap the right way using less (1)
Implementing bootstrap the right way using less (1)Implementing bootstrap the right way using less (1)
Implementing bootstrap the right way using less (1)
René Olivo
 
Usando Bootstrap correctamente con LESS
Usando Bootstrap correctamente con LESSUsando Bootstrap correctamente con LESS
Usando Bootstrap correctamente con LESS
René Olivo
 
Git workflow v2
Git workflow  v2Git workflow  v2
Git workflow v2
René Olivo
 
Introducciòn a RequireJS
Introducciòn a RequireJSIntroducciòn a RequireJS
Introducciòn a RequireJS
René Olivo
 
Introducciòn a AngularJS
Introducciòn a AngularJSIntroducciòn a AngularJS
Introducciòn a AngularJSRené Olivo
 
Comercio Electrónico en la República Dominicana
Comercio Electrónico en la República DominicanaComercio Electrónico en la República Dominicana
Comercio Electrónico en la República Dominicana
René Olivo
 

Más de René Olivo (9)

How to code in the XXI century without losing your head
How to code in the XXI century without losing your headHow to code in the XXI century without losing your head
How to code in the XXI century without losing your head
 
Implementing bootstrap the right way using less (1)
Implementing bootstrap the right way using less (1)Implementing bootstrap the right way using less (1)
Implementing bootstrap the right way using less (1)
 
Usando Bootstrap correctamente con LESS
Usando Bootstrap correctamente con LESSUsando Bootstrap correctamente con LESS
Usando Bootstrap correctamente con LESS
 
Git 101
Git 101Git 101
Git 101
 
Git workflow v2
Git workflow  v2Git workflow  v2
Git workflow v2
 
Git workflow
Git workflowGit workflow
Git workflow
 
Introducciòn a RequireJS
Introducciòn a RequireJSIntroducciòn a RequireJS
Introducciòn a RequireJS
 
Introducciòn a AngularJS
Introducciòn a AngularJSIntroducciòn a AngularJS
Introducciòn a AngularJS
 
Comercio Electrónico en la República Dominicana
Comercio Electrónico en la República DominicanaComercio Electrónico en la República Dominicana
Comercio Electrónico en la República Dominicana
 

BDD UI testing

  • 2. Qué veremos? ● BDD ● Cucumber ● Gherkin ● Mini Prueba
  • 3. Y si pudieras escribir tus tests así: Scenario: Accessing the home page Given a user that wants to rent a car And a list of cars to rent When the user access the "/welcome" page Then they can see the list of cars And each car should display the following fields: | a picture | | a name | | a description | | an availability identifier | | and a price |
  • 5. BDD ● Metodología de desarrollo de software, similar a TDD. ● Sirve de comunicación entre el cliente y los desarrolladores. ● Se enfoca en el fondo, no en la forma.
  • 6. Ventajas ● Buen comienzo para aprender a hacer pruebas. ● El mismo cliente puede escribir las pruebas, o al menos verificarlas y entenderlas. ● Pueden servir como criterios de aceptación.
  • 7. Por qué BDD UI Testing? ● Garantiza que los requerimientos del cliente se cumplan. ● Ayuda a detectar daños realizados tras haber hecho cambios en la aplicación. ● Es más fácil definir casos de usos usando backgrounds.
  • 8. Desventajas ● Pueden fallar por causas ajenas a ti o a tu aplicación. ● No le importa la calidad del código. ● Dependen del correcto funcionamiento de la aplicación completa.
  • 11. Gherkin ● Lenguaje de dominio específico (solo sirve para una cosa). ● Describe los componentes que conforman la aplicación. ● Solo describe como debe de funcionar la aplicación. No corre las pruebas.
  • 12. Gherkin ● Feature ● Scenario ● Steps ● Backgrounds
  • 13. Gherkin - Step definitions Given When Then ● And ● And ● But ● And ● And ● But ● And ● And ● But
  • 14. Feature: Multiple site support As a Mephisto site owner I want to host blogs for different people In order to make gigantic piles of money Background: Given a global administrator named "Greg" And a blog named "Greg's anti-tax rants" And a customer named "Dr. Bill" And a blog named "Expensive Therapy" owned by "Dr. Bill" Scenario: Dr. Bill posts to his own blog Given I am logged in as Dr. Bill When I try to post to "Expensive Therapy" Then I should see "Your article was published." Scenario: Dr. Bill tries to post to somebody else's blog, and fails Given I am logged in as Dr. Bill When I try to post to "Greg's anti-tax rants" Then I should see "Hey! That's not your blog!" Scenario: Greg posts to a client's blog Given I am logged in as Greg When I try to post to "Expensive Therapy" Then I should see "Your article was published."
  • 16. ● Feature files ● World ● Step definitions ● Hooks Cucumber
  • 18. ● Hace la integración entre las pruebas y el browser. ● Provee un WebDriver que permite controlar cualquier interacción con el browser. Protractor
  • 19. Protractor - Ejemplo browser.get('http://example.com'); element(by.css('form input[type=search]')).sendKeys('Hello'); element(by.css('form button')).click(); browser.sleep(1000); expect(element.all(by.css('.result')).count()).toBe(5);