SlideShare una empresa de Scribd logo
1 de 20
Descargar para leer sin conexión
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ónicoRené Olivo
 
Pagos electrónicos
Pagos electrónicosPagos electrónicos
Pagos electrónicosRené Olivo
 
How to Effectively Secure your Assets
How to Effectively Secure your AssetsHow to Effectively Secure your Assets
How to Effectively Secure your Assetsglobaledit®
 
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 techniquearpith pathange
 
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 AngelesAndy 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 Scenesuneratechnologies
 
Principles of secure system design
Principles of secure system designPrinciples of secure system design
Principles of secure system designJohn 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 DevicePriyanka Aash
 
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 OSRajiv Ranjan Singh
 
TUD CS4105 | 2015 | Lecture 1
TUD CS4105 | 2015 | Lecture 1TUD CS4105 | 2015 | Lecture 1
TUD CS4105 | 2015 | Lecture 1Eelco 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 presentationtemebele
 
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 wNilan 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 DevelopmentLiz Keogh
 
2015 Upload Campaigns Calendar - SlideShare
2015 Upload Campaigns Calendar - SlideShare2015 Upload Campaigns Calendar - SlideShare
2015 Upload Campaigns Calendar - SlideShareSlideShare
 

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_negocioEduardo Riol
 
Meetup bdd & tdd: aprovecha_su_poder
Meetup bdd & tdd: aprovecha_su_poderMeetup bdd & tdd: aprovecha_su_poder
Meetup bdd & tdd: aprovecha_su_poderEduardo Riol
 
Crowdar - Introducción a BDD
Crowdar - Introducción a BDDCrowdar - Introducción a BDD
Crowdar - Introducción a BDDJavier Re
 
Introduccion al desarrollo guiado por comportamiento
Introduccion al desarrollo guiado por comportamientoIntroduccion al desarrollo guiado por comportamiento
Introduccion al desarrollo guiado por comportamientoAlejandro 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 SiteGroundSiteGround España
 
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 WordpressToni 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
 
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 comportamientoRoberto 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 InternetAsier Marqués
 
Estrategia Guest Bloggin anti Penguin
Estrategia Guest Bloggin anti PenguinEstrategia Guest Bloggin anti Penguin
Estrategia Guest Bloggin anti PenguinPablo 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 2019La 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ónPaulo Clavijo
 

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 headRené 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 LESSRené Olivo
 
Introducciòn a RequireJS
Introducciòn a RequireJSIntroducciòn a RequireJS
Introducciòn a RequireJSRené 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 DominicanaRené 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
 

Último

Manual de Usuario APPs_AppInventor-2023.pdf
Manual de Usuario APPs_AppInventor-2023.pdfManual de Usuario APPs_AppInventor-2023.pdf
Manual de Usuario APPs_AppInventor-2023.pdfmasogeis
 
Introducción a Funciones LENGUAJE DART FLUTTER
Introducción a Funciones LENGUAJE DART FLUTTERIntroducción a Funciones LENGUAJE DART FLUTTER
Introducción a Funciones LENGUAJE DART FLUTTEREMMAFLORESCARMONA
 
BREEAM ES Urbanismo como herramienta para un planeamiento sostenible - Miguel...
BREEAM ES Urbanismo como herramienta para un planeamiento sostenible - Miguel...BREEAM ES Urbanismo como herramienta para un planeamiento sostenible - Miguel...
BREEAM ES Urbanismo como herramienta para un planeamiento sostenible - Miguel...ITeC Instituto Tecnología Construcción
 
Caso de éxito de Hervian con el ERP Sage 200
Caso de éxito de Hervian con el ERP Sage 200Caso de éxito de Hervian con el ERP Sage 200
Caso de éxito de Hervian con el ERP Sage 200Opentix
 
Unidad_3_T1_AutomatasFinitos presentacion
Unidad_3_T1_AutomatasFinitos presentacionUnidad_3_T1_AutomatasFinitos presentacion
Unidad_3_T1_AutomatasFinitos presentacionarmando_cardenas
 
PARTES DEL TECLADO Y SUS FUNCIONES - EJEMPLO
PARTES DEL TECLADO Y SUS FUNCIONES - EJEMPLOPARTES DEL TECLADO Y SUS FUNCIONES - EJEMPLO
PARTES DEL TECLADO Y SUS FUNCIONES - EJEMPLOSelenaCoronadoHuaman
 
Segmentacion Segmantica_Modelos UNET and DEEPLABV3
Segmentacion Segmantica_Modelos UNET and DEEPLABV3Segmentacion Segmantica_Modelos UNET and DEEPLABV3
Segmentacion Segmantica_Modelos UNET and DEEPLABV3AlexysCaytanoMelndez1
 

Último (7)

Manual de Usuario APPs_AppInventor-2023.pdf
Manual de Usuario APPs_AppInventor-2023.pdfManual de Usuario APPs_AppInventor-2023.pdf
Manual de Usuario APPs_AppInventor-2023.pdf
 
Introducción a Funciones LENGUAJE DART FLUTTER
Introducción a Funciones LENGUAJE DART FLUTTERIntroducción a Funciones LENGUAJE DART FLUTTER
Introducción a Funciones LENGUAJE DART FLUTTER
 
BREEAM ES Urbanismo como herramienta para un planeamiento sostenible - Miguel...
BREEAM ES Urbanismo como herramienta para un planeamiento sostenible - Miguel...BREEAM ES Urbanismo como herramienta para un planeamiento sostenible - Miguel...
BREEAM ES Urbanismo como herramienta para un planeamiento sostenible - Miguel...
 
Caso de éxito de Hervian con el ERP Sage 200
Caso de éxito de Hervian con el ERP Sage 200Caso de éxito de Hervian con el ERP Sage 200
Caso de éxito de Hervian con el ERP Sage 200
 
Unidad_3_T1_AutomatasFinitos presentacion
Unidad_3_T1_AutomatasFinitos presentacionUnidad_3_T1_AutomatasFinitos presentacion
Unidad_3_T1_AutomatasFinitos presentacion
 
PARTES DEL TECLADO Y SUS FUNCIONES - EJEMPLO
PARTES DEL TECLADO Y SUS FUNCIONES - EJEMPLOPARTES DEL TECLADO Y SUS FUNCIONES - EJEMPLO
PARTES DEL TECLADO Y SUS FUNCIONES - EJEMPLO
 
Segmentacion Segmantica_Modelos UNET and DEEPLABV3
Segmentacion Segmantica_Modelos UNET and DEEPLABV3Segmentacion Segmantica_Modelos UNET and DEEPLABV3
Segmentacion Segmantica_Modelos UNET and DEEPLABV3
 

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);