Posts

Showing posts with the label TDD

Introduction to TDD

Image
Spanish version / Versión en Español Why test an application? Because it's the best way to find defects in software. Testing does not guarantee the application is free of bugs, but it allows us to detect them. Testing helps us create a higher quality product. A well written test gives us confidence to refactor the code it tests; if we break it, the test will fail. 1 - A taxonomy of tests Unit tests: They test a code block in isolation from its environment (project, solution, package, etc). In their most purist form, unit tests should not access any external dependency such as the file system, databases, external web services, special hardware, etc. This can be achieved via various techniques that we'll look at in a later post. The main reasons for these restrictions are to have real isolation of the test unit, and keeping unit tests fast. Fast unit tests are important in order to keep the TDD cycle fast and productive; if we bog them down with I/O, they wil...

Introducción a TDD

Image
Versión en inglés / English version Exordio para puristas Oh Madre Lengua Castellana, en nombre de la mano perdida del manco de Lepanto, perdónanos por las aberraciones que hemos de cometer en desmedro de tu ilustre prosapia bajo el estandarte de la jerga informática. Aparta tu justamente indignada mirada de palabrejas como "testear", "castear", "comitear" y engendros afines, rayanos en lo herético. Concédenos, al menos en esta ocasión, que lo importante es transmitir las ideas; un Rastrojero es tan bueno como un Lamborghini , en tanto lleve a sus pasajeros a destino de forma eficiente y eficaz. Sin más, con la conciencia impoluta, pasemos a lo que nos com pete : ¿Por qué testear una aplicación? Porque es la principal forma de encontrar defectos en el software . El testing no nos garantiza que el sistema testeado no tenga errores, pero nos permite encontrarlos. El testing nos permite elaborar un producto de mayor calidad. Un buen...