¿Lhotka vs TDD?
En la entrevista que le hicieron al Rocky en DotNetRocks, hizo algunos argumentos breves en contra del Test-Driven Development (TDD)--lo cual me pareció bastante chistoso, dado que en el episodio anterior acababan de entrevistar a Jean Paul Boodhoo, uno de los que anda muy metido con CruiseControl.NET y TDD. En fin, me llamó bastante la atención. Y hoy el Rocky publicó algunos comentarios adicionales. No estoy de acuerdo con algunos de ellos, pero léanlos para que vean por qué:
"As a testing methodology TDD (as I understand it) is totally inadequate. I was unable to express this point in the interview due to the format, but the idea that you’d have developers write your QA unit tests is unrealistic. And it was pointed out on Palermo ’s blog that TDD isn’t about writing comprehensive tests anyway, but rather is about writing a single test for the method – which is exceedingly limited from a testing perspective. [...] But the real key is that developers are terrible testers (with perhaps a few exceptions). This is because developers test to make sure something works. Actual testers, on the other hand, test to find ways something doesn't work. Testers focus on the edge cases, the exceptional cases, the scenarios that a developer (typically?) ignores. [...] I don't buy into TDD as a "design methodology" either. You can't "design" a system when you are focused at the method level. There’s that whole forest-and-trees thing... Of course I am not a TDD expert – by a long shot – so for all I know there’s some complimentary part of TDD that looks at the forest level."Aunque comprendo sus puntos de vista--sobretodo respecto a que TDD no es una "metodología de diseño", sino una "filosofía de construcción" (¿?)--sigo creyendo que los beneficios de TFD y TDD son mayores a los "perjuicios". Si el argumento principal es que los desarrolladores no son buenos testers, pues propondría la perspectiva de que el desarrollar las habilidades de un tester en verdad te hace un mejor desarrollador. Mi argumento es el mismo que hice cuando hice la analogía entre un escritor y un programador, es decir, un buen escritor/programador opera en 2 modos de pensamiento: el creativo y el censor. Seguro, que un escritor cuenta con un editor (que revisa a otro nivel lo que haces) pero ni modo que pongas al editor a revisar cada construcción gramatical de cada oración de tu libro. Además, no todos los proyectos--me atrevería a decir que la mayoría--van a contar con un equipo dedicado de testers veteranos, así que TFD o TDD garantizaría un mínimo de testing a nivel unitario. Y sí, TDD está limitado. Faltarían más pruebas--no solo hay pruebas unitarias y de regresión, faltaría integración y contra-tontos. Pero esa no es razón para no usarlo--aunque tampoco hay que caer en la creencia de que es una bala de plata.



Por RSS o Atom

