Documente Academic
Documente Profesional
Documente Cultură
!
!
!
!
!
!
De qu va a ir esta charla?
Cucumber? En serio?
Un poco de historia
1957
Debugging
oriented
Demonstration
oriented
1978
Destruction
oriented
1982
Evaluation
oriented
1988
Prevention oriented
ESO NO ES AGILE!!!
Waterfall
Coste de un cambio
Agile Manifesto
The style here is to write a few 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."
Agile Manifesto
The style here is to write a few 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."
D
D
T
Specication By Defect
Specification By Example isn't the
way most 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.
Specication By Defect
Specification By Example isn't the
way most 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.
D
D
T
A
Behaviour Drive-Development
Behaviour Drive-Development
D
D
B
Qu es BDD?
Outside -> In
Orienta a un desarrollo
Gherkin
Business Readable
Documentacin
Gherkin: Sintaxis
https://github.com/cucumber/cucumber/wiki/Gherkin
Cucumber
Framework BDD
Escrito en Ruby pero disponible para Java (CucumberJVM), Python (Lettuce), Javascript (cucumber-js)
http://cukes.info/
Cucumber: Lo quiero!!
1. Instala Ruby*
!
\curl
-sSL
https://get.rvm.io
|
bash
-s
stable
!
2. Instala Cucumber
!
sudo
gem
install
cucumber
Quiero ver un
ejemplo que no me
gusta la magia!!!!
El entorno
El entorno
Arranca vagrant
vagrant
up
vagrant
ssh
El entorno
Y ya lo tienes montado madafaca !!!
Crea un directorio:
Crea un subdirectorio
kit-cucumber
features
cucumber
Ahora ejecuta:
>
cucumber
features/first_steps.features
Ahora ejecuta:
wow so easy
much minimalist
so hipster
Ejecutemos de nuevo
Browsing Tests
<spam> Usemos
</spam>
Pero
esto se usa de verdad?
Veamos indeed
y careers 2.0
Entonces
Entonces
Aprende BDD que lo vas a necesitar
Gracias
hola@enrique-sanchez.me
!
enrique.sanchezbayuela@medianet.es
!
@EnriqueSanchezB