lines of code, then a test that should run, or even better, to write a test that won't run, then write the code that will make it run. […] Now, instead of just coding on, we want to get immediate feedback and practice "code a little, test a little, code a little, test a little."
lines of code, then a test that should run, or even better, to write a test that won't run, then write the code that will make it run. […] Now, instead of just coding on, we want to get immediate feedback and practice "code a little, test a little, code a little, test a little." TDD
of us have been brought up to think of specifications. Specifications are supposed to be general, to cover all cases. Examples only highlight a few points, you have to infer the generalizations yourself. This does mean that Specification By Example can't be the only requirements technique you use, but it doesn't mean that it can't take a leading role.
of us have been brought up to think of specifications. Specifications are supposed to be general, to cover all cases. Examples only highlight a few points, you have to infer the generalizations yourself. This does mean that Specification By Example can't be the only requirements technique you use, but it doesn't mean that it can't take a leading role. ATDD
se centra en la implementación • ATDD se centra en capturar requisitos en test de aceptación y los usa para conducir el desarrollo • ATDD está centrado en los requisitos desde el punto de vista del desarrollador, BDD está enfocado en la captura de requisitos desde el cliente
integra pruebas. Aceptación Unitarias • Orienta a un desarrollo “Outside -> In” • Define el uso de un DSL para pruebas Un subconjunto del lenguaje natural —> Gherkin
un editor de texto y escribe Feature: Division In order to avoid silly mistakes Cashiers must be able to calculate a fraction ! Scenario: Regular numbers Given I have entered 3 into the calculator And I have entered 2 into the calculator When I press divide Then the result should be 1.5 on the screen • Ahora ejecuta: > cucumber features/first_steps.features
un editor de texto y escribe Feature: Division In order to avoid silly mistakes Cashiers must be able to calculate a fraction ! Scenario: Regular numbers Given I have entered 3 into the calculator And I have entered 2 into the calculator When I press divide Then the result should be 1.5 on the screen • Ahora ejecuta: > cucumber features/first_steps.features wow so easy much minimalist so hipster
features llamado step_definitions • Copia la salida obtenida de la ejecución del test y cópiala a un nuevo fichero llamado features/ step_definitions/first.rb • Ejecuta el test de nuevo
mano si no que debe de formar parte de la cultura de la organización • BDD y Cucumber son muy demandados por la industria ya que permite introducir testing desde el principio del desarrollo
alguna de las charlas gratuitas que da MADQA http://www.meetup.com/MADQA-Grupo- Meetup-de-QA-y-TESTING-de-SOFTWARE-en-Madrid/ • Lee y practica: https://github.com/cucumber/ cucumber/wiki/tutorials-and-related-blog-posts