T1–T4: Coverage and Completeness
T1–T4: Cobertura y Completitud
T1: Insufficient tests — write enough to cover all conditions that could fail. T2: Use a coverage tool — it shows what you haven't tested, not that you've tested everything. T3: Don't skip trivial tests — they document expected behavior and cost almost nothing. T4: An ignored test raises a question — if you can't fix it now, document why.
T1: Pruebas insuficientes — escribe suficientes para cubrir todas las condiciones que podrían fallar. T2: Usa una herramienta de cobertura — te muestra lo que no has probado. T3: No te saltes pruebas triviales — documentan el comportamiento esperado. T4: Una prueba ignorada plantea una pregunta — si no puedes arreglarla, documenta por qué.
T5–T9: Quality and Speed
T5–T9: Calidad y Velocidad
T5: Don't skip failing tests — a skipped test is a known bug you've accepted. T6: Test near bugs — if you find a bug, add tests around it. T7: Patterns of failure are revealing — several tests failing together point to a single root cause. T8: Test boundary conditions — edges are where most bugs hide. T9: Tests must be fast — slow tests get disabled.
T5: No te saltes pruebas fallidas — una prueba omitida es un error conocido. T6: Prueba cerca de los errores — si encuentras un bug, añade pruebas a su alrededor. T7: Los patrones de fallo son reveladores — varias pruebas fallando juntas apuntan a una causa raíz. T8: Prueba los casos límite — los bordes ocultan la mayoría de los bugs. T9: Las pruebas deben ser rápidas — las lentas se deshabilitan.
✏️
Code Challenge
Desafío de Código
Identify the T-heuristic violated in each test, then fix it.
Identifica la heurística T violada en cada prueba y luego corrígela.
💡 Key takeaway
A test suite is only as good as its ability to catch real bugs quickly. Invest in coverage, speed, and completeness equally.
Una suite de pruebas solo es tan buena como su capacidad para detectar bugs reales rápidamente. Invierte en cobertura, velocidad y completitud por igual.