Taller de Unit Testing: Generar confianza mediante pruebas automatizadas

Taller de Unit Testing: Generar confianza mediante pruebas automatizadas

Mittwoch, 11. November 2026, 15:00

Duración:
Sesión matutina: 9:00 a. m. – 1:00 p. m.
Pausa para el almuerzo: 1:00 p. m. – 3:00 p. m.
Sesión vespertina: 3:00 p. m. – 5:00 p. m.
*Este taller se impartirá principalmente en español.

En este taller práctico de un día veremos técnicas para escribir pruebas unitarias eficaces y fáciles de mantener. Los participantes aprenderán a identificar y aislar código difícil de probar, a crear conjuntos de pruebas robustos y a utilizar técnicas avanzadas de pruebas para aumentar la confianza en su código, sin generar pruebas frágiles o excesivamente complejas.

Temas a tratar
Introducción a Unit Testing (Pruebas Unitarias)
Veremos los fundamentos de las pruebas unitarias, incluyendo qué caracteriza a una buena prueba unitaria, cómo estructurarlas y cómo integrarlas en el ciclo de vida del desarrollo de software.

Separación de código difícil de probar
Exploraremos técnicas para identificar código complejo de probar y refactorizarlo en componentes más pequeños y fáciles de verificar. Se hará énfasis en la separación de responsabilidades, las dependencias y la testabilidad.

Zombies
Conoceremos el acrónimo "Zombies" propuesto por James Grenning. Este concepto nos ayudará a entender cómo idear casos de prueba.

Test Parametrizados
Descubre cómo probar el mismo comportamiento con múltiples entradas sin duplicar el código de prueba. Aprende cómo las pruebas parametrizadas permiten crear conjuntos de pruebas más concisos, expresivos y exhaustivos.

Approval Testing
Aprende cómo las pruebas de aprobación pueden simplificar la verificación de resultados complejos o extensos comparando los resultados reales con las expectativas aprobadas. Explora cuándo resulta útil este enfoque y cómo mantener la facilidad de mantenimiento de estas pruebas.

Objetos simulados (Mocks)
Comprende cómo los objetos simulados (*mocks*) permiten aislar el código de prueba de las dependencias externas. Aprende cuándo utilizarlos, cómo diseñar pruebas eficaces basadas en ellos y cómo evitar errores comunes, como el uso excesivo de simulaciones.

Enfoque del taller
El taller combina breves presentaciones técnicas con ejercicios prácticos y ejemplos reales. Los participantes aplicarán cada técnica a código real, identificarán problemas comunes en las pruebas y desarrollarán estrategias para crear pruebas unitarias que aporten información valiosa y sean fáciles de mantener.

Al finalizar el taller, los participantes serán capaces de:
Escribir pruebas unitarias claras y con el enfoque adecuado.
Refactorizar código difícil de probar para convertirlo en componentes testeables.
Utilizar pruebas parametrizadas para reducir la duplicación de pruebas.
Aplicar pruebas de aprobación (*approval testing*) a resultados complejos.
Utilizar objetos simulados (*mocks*) de manera adecuada y eficaz.
Identificar y resolver problemas comunes en las pruebas unitarias.
_______________________________________________________________________________________________________

Duration:
Morning Session: 9:00am - 1:00pm, 
Lunch break: 1:00pm-3:00pm
Afternoon Session: 3:00pm-5:00pm
*This workshop will be conducted primarily in Spanish

This hands-on, one-day workshop introduces practical techniques for writing effective, maintainable unit tests. Participants will learn how to identify and isolate code that is difficult to test, build robust test suites, and use advanced testing techniques to improve confidence in their code without creating brittle or overly complicated tests.

Topics Covered
Introduction to Unit Testing
Learn the fundamentals of unit testing, including what makes a good unit test, how to structure tests, and how unit testing fits into the software development lifecycle.

Separating Hard-to-Test Code
Explore techniques for identifying code that is difficult to test and refactoring it into smaller, more testable components. Focus on separation of concerns, dependencies, and testability.

Zombies
We will learn about the acronym “Zombies” from James Grenning. This will help us understand how to come up with test cases.

Parameterized Tests
Discover how to test the same behavior across multiple inputs without duplicating test code. Learn how parameterized tests can make test suites more concise, expressive, and comprehensive.

Approval Testing
Learn how approval tests can simplify testing complex or large outputs by comparing actual results against approved expectations. Explore when this approach is useful and how to keep approval tests maintainable.

Mock Objects
Understand how mocks can isolate the code under test from external dependencies. Learn when to use mocks, how to design effective mock-based tests, and how to avoid common pitfalls such as over-mocking.

Workshop Approach
The workshop combines short technical presentations with hands-on exercises and practical examples. Participants will apply each technique to real-world code, identify common testing problems, and develop strategies for building unit tests that provide meaningful feedback while remaining easy to maintain.

By the end of the workshop, participants will be able to:
Write clear, focused unit tests.
Refactor difficult-to-test code into testable components.
Use parameterized tests to reduce duplication.
Apply approval testing to complex outputs.
Use mock objects appropriately and effectively.
Recognize and troubleshoot common unit-testing problems.

Zuletzt aktualisiert:

Das könnte dich auch interessieren