Saltar al contenido
Portada » Blog » 📣 Andres Sacco 👉 Events: Love Triangle in Integration Testing

📣 Andres Sacco 👉 Events: Love Triangle in Integration Testing

👉 Events: Love Triangle in integration Testing

Some years ago, events appeared in the IT world with the idea of decoupling many applications or microservices, improving Performance, reducing complexity, and allowing change flows. Some companies adopted this new paradigm instead of the classic synchronic world where the client needs to wait until the provider answers; initially, everything looked fine, but after some months, the problems appeared.

The developers adopted this new paradigm to reduce the complexity but, at the same time, introduced another problem in how to test the application simply. What happens if the events need to modify or read some information for a database? How can we check if the information in the database was modified?

This talk will delve into the main problems of not creating integration tests that check whether the application works fine, showing different alternatives with their pros and cons. To conclude the talk, you will see how to create integration tests that check if some scenarios work on an application that uses MongoDB and SQS combined with Karate.

– Andres Sacco

📣 Andres Sacco 👉 Events: Love Triangle in Integration Testing #testingdayve #SoftwareTesting

Únete a las actividades que realizaremos

validación en Arquitecturas de Eventos: Domando el Caos Asíncrono

Trabajar con microservicios y arquitecturas orientadas a eventos (EDA) es emocionante hasta que intentas probarlas. La asincronía y la consistencia eventual rompen los esquemas tradicionales del testing. ¿Cómo validamos algo que no responde de inmediato?

El Reto de la Consistencia Eventual

En un sistema EDA, perdemos la noción de tiempo y estado tradicional. No hay una respuesta HTTP inmediata que nos diga que todo salió bien. Para solucionar esto, necesitamos un enfoque de Cloud Native Testing.

Herramientas para una Estrategia Robusta:

  • Testcontainers: Permite levantar brokers de mensajería (Kafka, RabbitMQ) o bases de datos efímeras directamente desde tu código, garantizando aislamiento total.
  • LocalStack: El mejor aliado para emular servicios de AWS (SQS, SNS, S3) de forma local, evitando costes de nube durante el desarrollo.
  • Karate DSL: Facilita la creación de scripts legibles en sintaxis Gherkin que pueden validar eventos y APIs en un mismo flujo.

El Flujo de Trabajo Optimizado

Un ciclo de integración efectivo debe incluir la emisión del evento, una espera controlada (polling), la verificación del estado final (usando herramientas como RestHeart para observar bases NoSQL) y, finalmente, una limpieza crítica del entorno.

«En sistemas asíncronos, la observabilidad es tu mejor herramienta de testing. Si no puedes ver el estado final, no puedes validarlo.»

Domar las arquitecturas de eventos requiere herramientas modernas y un cambio de paradigma hacia el Shift-Left. Con la infraestructura adecuada en tu entorno local, lo que antes era un dolor de cabeza se convierte en un proceso confiable.

¿Cuál ha sido tu mayor reto al intentar automatizar pruebas de integración en microservicios? ¡Compártelo con nosotros!

#EDA #EventDriven #MicroservicesTesting #Testcontainers #AWS #CloudNative

Únete a las actividades que realizaremos

validation in Event-Driven Architectures: Taming Asynchronous Chaos

Working with microservices and Event-Driven Architectures (EDA) is exciting until you try to test them. Asynchrony and eventual consistency break traditional testing patterns. How do we validate something that doesn’t respond immediately?

The Challenge of Eventual Consistency

In an EDA system, we lose the traditional notion of time and state. There is no immediate HTTP response to tell us that everything went well. To solve this, we need a Cloud-Native Testing approach.

Tools for a Robust Strategy:

  • Testcontainers: Allows you to spin up messaging brokers (Kafka, RabbitMQ) or ephemeral databases directly from your code, ensuring total isolation.
  • LocalStack: The best ally for locally emulating AWS services (SQS, SNS, S3), avoiding cloud costs during development.
  • Karate DSL: Facilitates the creation of readable Gherkin-syntax scripts that can validate events and APIs in the same workflow.

The Optimized Workflow

An effective integration cycle must include event emission, controlled waiting (polling), final state verification (using tools like RestHeart to observe NoSQL databases), and, finally, a critical environment cleanup.

«In asynchronous systems, observability is your best testing tool. If you can’t see the final state, you can’t validate it.»

Taming event-driven architectures requires modern tools and a paradigm shift toward Shift-Left. With the right infrastructure in your local environment, what was once a headache becomes a reliable process.

What has been your biggest challenge when trying to automate integration tests in microservices? Share it with us!

#EDA #EventDriven #MicroservicesTesting #Testcontainers #AWS #CloudNative

Andres Sacco

⌨ Technical Leader | 📝 Writer | 🎤 Speaker