Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Simplifying Cloud Native app testing across env...

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers.
Avatar for Salaboy Salaboy
October 09, 2025

Simplifying Cloud Native app testing across environments with Dapr and Microcks

for more info visit: https://www.salaboy.com

Avatar for Salaboy

Salaboy

October 09, 2025
Tweet

More Decks by Salaboy

Other Decks in Technology

Transcript

  1. Mauricio Salatino @salaboy • Ecosystem Engineer @ Diagrid working on

    Dapr • An Open Source addict and contributor Who we are!
  2. Laurent Broudoux @lbroudoux • A Cloud-native guy - from Financial

    Services to OSS/Cloud vendors • Loves everything distributed! #API, #OpenAPISpec, #AsyncAPISpec, #Kubernetes, #Integration, #Camel • An Open Source addict and contributor • Works at Postman in Open Technologies Dep. • Dad, Gardener & Pastries lover 🍰 🎂 🧁 🍩 🥧 🍓 Who we are!
  3. • Distributed Application Runtime • CNCF Graduated Project • Multi

    language SDKs • Case Study https://www.cncf.io/case-studies/datagalaxy/
  4. Part #1 - Distributed app challenges • #1 Managing cross-cutting

    concerns (security, resilience, observability, …) • #2 Managing cross-environment concerns (internal vs managed services, AWS vs GCP vs Azure) • Dapr to the rescue!
  5. DevEx & DISTRIBUTED APPS - WHAT A BURDEN! $ mvn

    spring-boot:run $ ./gradlew bootRun $ npm run dev $ ./mvnw quarkus:dev $ make run $ docker compose up -d $ go run main.go $ ./kafka-server-start.sh $ postgres -D ~/pg-data
  6. DevEx & DISTRIBUTED APPS - WHAT THE HELL! The Developerʼs

    Laptop Service A Service B Service C Database A Database B Database C OK BUT … LOTS OF COMPLEXITY LOTS OF POWER / ENERGY LOTS OF MONEY!
  7. DevEx & DISTRIBUTED APPS - TAKING SHORTCUTS • Avoid Testing

    Integrations • Use mock frameworks only • In-VM vs Network • Rely on your own vision
  8. INGEST PROVIDE MOCKS WELL-KNOWN ARTIFACTS 🧠 SMART MOCKS API Consumer

    and others MICROCKS Turn Artifacts into light & smart simulations
  9. INGEST WELL-KNOWN ARTIFACTS AUTOMATIC TEST SUITE and others VALIDATE REAL

    API API v1.2 API v1.1 API v1.0 API Provider MICROCKS Turn Artifacts into Contract Testing Suite
  10. Contract Testing in Action! • Start your Application • Include

    a library like RestAssured • Call API endpoint and check: ◦ Response status code ◦ Response content-type ◦ JSON evaluation ◦ JSON response is valid on all paths ◦ Loop on next call… Typical approach
  11. Contract Testing in Action! • Include Microcks and OpenAPI •

    Launch a Microcks Test • AssertSuccess Microcks approach ✨ : managed by Microcks Testcontainers tests • For all operations and examples: ◦ Act as an API consumer ◦ Validate OpenAPI schema ✨
  12. Contract Testing in Action for Async! 😱 • Include a

    mocking library • Prepare Mock object for DaprMessagingTemplate.send() • Check that messagingTemplate.send() has been called • Tear-down all resources Typical “lightˮ approach
  13. Contract Testing in Action for Async! 😱 Microcks approach ✨

    : managed by Microcks Testcontainers tests • Include Microcks and AsyncAPI • • Launch a Microcks Test • Invoke KitchenService.emitEvent() • Start a Kafka broker ✨ • Check that messagingTemplate.send() has been called • + that message is sent over the wire • + that message is on correct Kafka topic • + that message is conformant to schema • Tear-down all resources ✨
  14. Part #2 - Distributed / DX challenges • #3 Managing

    more dependencies (complex setup, cost, slow, …) • #4 Testability? Confidence? (integration tests, no breaking changes) • Microcks to the rescue!
  15. Jnation 2025: Durable Executions in Serverless Architectures: Cloudflare, SpringBoot &

    Dapr by Nele Uhlemann, Mauricio Salatino Workflow Runtime
  16. Process Order Workflow • Execute each Activity until it's done

    • Retry in case of failure • Continue from last activity executed if the application crashes
  17. Order from Prompt • Reuse workflows and activities • Integrates

    with your favourite tools such as Spring AI
  18. Building OpenAI mocks with Microcks! OpenAPI (Primary) Collections Import Import

    API / Service metadata operations examples examples Test suite APIExamples {har} 🧠 LLM (Secondary Artifacts)
  19. A new Testing Nightmare? 🤯 • Prepare an Event object

    • Invoke PizzaStore.receiveEvents() handling function • Include a mocking library • Prepare Mock object for RestTemplate.put() • Check that restTemplate.put() has been called • Tear-down all resources Typical “lightˮ approach
  20. A new Testing Nightmare? 🤯 • Include Microcks and AsyncAPI

    • • • • • Start a workflow instance & check that DeliveryService is called at some point • Tear-down all resources Microcks approach ✨ : managed by Microcks Testcontainers tests • Start a Kafka broker • Publish mock messages on Kafka • Check that PizzaStore.receiveEvents() is connected and can read message • Check that consumer deserialization is ok ✨ ✨
  21. Inner or Outer Loops: Choice is yours! Setup Code Build

    Test Push Review Build Conform- ance Security Deploy Inner loop Outer loop Pull/Merge Request Developer Team Microcks Microcks Microcks
  22. KEY TAKEAWAYS 🤔 • Building distributed applications is hard… •

    Making these apps portable across environment is possible using APIs, check out the Dapr SDK! • Still, the Developer Experience can be a pain… • Microcks makes mocks easy & contracts finally useful! for a better Developer Experience, for Java, .Net, etc.
  23. SIMPLIFYING CLOUD-NATIVE APP TESTING ACROSS ENVIRONMENTS Mauricio Salatino - @salaboy

    Laurent Broudoux - @lbroudoux THANK YOU! Feedback is a gift!
  24. Agenda • Distributed Applications 20 mins) ◦ The Cloud Native

    Pizza App Demo #1 ◦ Sync and Async interactions Small Dapr intro) ◦ Testing and Mocking Sync and Async Demo #2 • Building resilient applications 25 mins) ◦ Dapr → Durable executions and Workflows (inner loop) Demo #3 → runs the three services) ◦ Testing with real complex examples OpenAI and Dapr Workflows Demo #4 → mocks everywhere .. only store service) • Takeaways
  25. PLACEHOLDER (Part #2) • Building resilient and AI-infused applications challenges

    • #1 Control of durable executions • Dapr Workflows to the rescue! • #2 Speed & cost when running locally • Microcks to the rescue!
  26. PLACEHOLDER (Laurent) • Distributed applications challenges • #3 More dependencies

    ⇒ DX + laptop setup • #4 How to test things efficiently? How to guarantee your consumers youʼre not introducing breaking changes? • Microcks to the rescue!