Design For Testability

Leo un artículo interesante (introductorio)  en MSDN Magazine, donde recalcan que una de las mejoras de testear temprano y diseñar pensando en el testing, es el que se consigue codigo mucho mas facil de probar y hacerle debug. Esto parece una ventaja muy grande y es mi principal incentivo para poder incorporar metodologias agiles (TDD, DDD) en nuestro proceso de desarrollo. 

En el articulo tambien mencionan los principales problemas que se tienen al testear aplicaciones como las que hoy desarrollamos en Concepto, que son:
  •  el simular el funcionamiento de la base de datos para obtener resultados consistentes y rapidos 
  • chequear eventos externos (como el envio y recepcion de mail, webservcies, etc)
  • workflows
Algunas de las conclusiones del articulo: 

Smaller tests are cheaper to create, easier to understand, faster to run, and much simpler to debug. It sounds like more work to write a bunch of unit tests than a single integrated test, but I've frequently found it more efficient to test small units of code before attempting to integrate those units in a bigger test.

The Big Picture
I would say that my focus on testability over the past five years has had more impact on how I approach software design than anything else. Granted, there are times when I have to go out of my way in a design for no other purpose than to make the code testable. In the end, though, I think that testability goes hand in hand with the classical definition of a good design.
Carefully considering the question, how can I test this in isolation? is yet another tool that will help you arrive at the classic design qualities of cohesion, coupling, and separation of concerns in your codebase.

Fuera de Tema: 
Tengo una duda existencial
 
Testability como se traduce?.  La traducen como: 

comprobabilidad; Sinónimos: provabilityverifiability; Possibility of having a proof. ; Capability of being demonstrated or logically proved.

pero me suena muy feo..



Comentarios

  1. Hola Enrique,

    en el estándar SQuaRE (ISO 25000, antiguo ISO 9126) lo he visto en español siempre traducido a "facilidad de pruebas", y creo que transmite bastante bien el concepto.

    Saludos

    ResponderBorrar

Publicar un comentario

1) Lee el post
2) Poné tu opinión sobre el mismo.
Todos los comentarios serán leidos y la mayoría son publicados.

Entradas más populares de este blog

La nefasta influencia del golero de Cacho Bochinche en el fútbol uruguayo

Aplicación monolítica o distribuida?

Funcionalidades de GeneXus que vale la pena conocer: DATE Constants.