haciendo bdd con mspec

Post on 11-Jul-2015

3.940 Views

Category:

Technology

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Haciendo BDD con Mspec… de manera efectiva

Jorge Gamba

Consultor en Desarrollo de SoftwareCommunity Manager

Web: http://jorgegamba.comTwitter: @jorgegambaCorreo: contacto@jorgegamba.com

Agenda

BDD

Introducción

Relación con ATDD, DDD y TDD

Historias y Criterios de Aceptación

Estilo Context/Specification

Conceptos básicos

Recomendaciones

MSpec

Introducción

“Hola mundo”

Uso

Ejercicio de aplicación

Integración con herramientas

Recomendaciones

¿BD… qué?

Antes

http://altnet-hispano.pbworks.com/van-2010-08-14-user-stories

http://altnet-hispano.pbworks.com/van-2010-05-15-bdd

Definición

«Behaviour-Driven Development (BDD) is an evolution in the thinking behind TestDrivenDevelopment and AcceptanceTestDrivenPlanning»

Dan Northhttp://behaviour-driven.org/

ATDD

DDD

TDDTest-Driven Development

Domain-Driven Design

Acceptance Test-DrivenDevelopment

BDD

Análisis

Implementación

Diseño

Pruebas

ATDD DDD TDD+ +

ATDD TDD

Cliente Desarrollador

Aceptación Implementación

Especificaciones Funcionales Especificaciones Técnicas

[Yellow]-Red-Green-Refactor Red-Green-Refactor

Pruebas de Integración Pruebas Unitarias

Preparación Improvización

Alto Nivel Bajo Nivel

SpecFlow, StorEvil, SotoryQ … MSpec

Historias

Para …[Motivación]

Como un …[Rol]

Quiero …[Objetivo]

Criterios de Aceptación

Given/When/ThenDado que [contexto]Cuando [evento]Entonces [consecuencia]

Context/SpecificationCuando [Evento + Contexto]Debería [Resultados esperados]

Codificación por ejemplos (a.k.a. TDD)

Clase de test/spec por cada escenario no por archivo de clase

DRY no es prioridad

La legibilidad es importante

Machine.Specificationsa.k.a. MSpec

http://github.com/machine/machine.specifications

Aaron Jensenhttp://codebetter.com/blogs/aaron.jensen/

Alexander Großhttp://therightstuff.de/

¡Muchas Gracias!

Jorge Gamba

Web: http://jorgegamba.comTwitter: @jorgegambaCorreo: contacto@jorgegamba.com

top related