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

Kontinuierliches API Mocking und Testing mit Mi...

Kontinuierliches API Mocking und Testing mit Microcks und Testkube #betterCode(API)

Bei der dynamischen Entwicklung von APIs sind Effizienz und Zuverlässigkeit entscheidend.

Dieser Vortrag stellt mit Microcks und Testkube zwei leistungsstarke Cloud-native Frameworks vor. Microcks ermöglicht automatisiertes API Mocking und Testen innerhalb eines Kubernetes-nativen Frameworks, und es unterstützt verschiedene APIs wie REST, gRPC und GraphQL. Testkube bietet eine flexible Testausführungsumgebung für Kubernetes, mit der API-Tests ereignisgesteuert ausgeführt werden.

Ich demonstriere, wie diese Tools die Entwicklungszeit von APIs verkürzen, die Agilität der Softwarebereitstellung erhöhen und robuste, standardkonforme und gut getestete APIs sicherstellen.

Avatar for M.-Leander Reimer

M.-Leander Reimer PRO

May 15, 2025
Tweet

More Decks by M.-Leander Reimer

Other Decks in Programming

Transcript

  1. A Quick History Lesson on Inter Process Communication (IPC) QAware

    | 3 REST 2000 by Roy T. Fielding RPC 14.01.1976 RFC 707 RPC Oct 1983 Birrel und Nielson DCOM 18.09.1996 Win95 HTTP/1.0 Mai 1996 RFC 1945 CORBA 1.0 Oct 1991 CORBA 2.0 August 1996 HTTP/1.1 Juni 1999 RFC 2616 CORBA 2.3 Juni 1999 Java RMI Feb 1997 JDK 1.1 XML-RPC 1998 SOAP 1.2 2003 CORBA 3.0 July 2002 RESTful Applications 2014 (?) HTTP/2.0 Mai 2015 RFC 7540 gRPC 1.0 Aug 2016 GraphQL Sep 2015 JSON-RPC v1 2005 v2 2010
  2. QAware | 4 Modulithic systems were relatively easy to implement

    and test. ▪ Almost no distribution or IPC ▪ Homogene technology stack ▪ Developed by one team ▪ Long release and test cycles ▪ Low infrastructure complexity ▪ Managed infrastructure
  3. QAware | 5 Microservice-based systems with many APIs can be

    complex and cumbersome to implement and test. ▪ High distribution with various communication channels ▪ Heterogeneous technology stacks ▪ Implemented by many independent teams ▪ Short release and test cycles ▪ High infrastructure complexity with many components ▪ New operating model with more responsibility for the developers
  4. QAware | 6 Microservice-based systems with many APIs can be

    complex and cumbersome to implement and test. Cluster Microservice A Microservice B Microservice C External System X External System Y Team A Team C Team B Unknown GraphQL REST gRPC gRPC SOAP Kafka Mock Mock
  5. Challenges of Modern API Development ▪ Manual testing and mocking

    slows down integration processes. ▪ Existing tools lack good support for mocking and testing on Kubernetes. ▪ Managing multiple API protocols (e.g. REST, gRPC, GraphQL, …) is complex. ▪ Time-consuming deployments of APIs across environments. ▪ Inconsistent support for standards leading to poor integration quality. 7 QAware | 7
  6. Testkube - A cloud-native testing framework for Kubernetes. 9 QAware

    | 9 kubeshop/testkube ▪ Testkube natively integrates test orchestration and execution into Kubernetes and your CI/CD or GitOps pipeline ▪ Avoids vendor lock-in for test orchestration and execution in CI/CD pipelines ▪ Makes it possible to decouple test execution from build processes; test engineers should be able to run specific tests whenever needed ▪ Makes it easy to run any kind of tests - functional, load/performance, security, compliance, etc. in your clusters, without having to wrap them in docker-images or providing network access ▪ Provides a modular architecture for adding new types of tests and executors
  7. Testkube Architecture and Concepts QAware | 10 default testkube Deployment

    Testkube Dashboard Webhook Receiver Testkube API Server CRDs CI/CD System Dev Executors Test Test Suite Deployment trigger flux-system run Mongo DB NATS Minio S3 CLI start store watch Test Trigger SUT Monitoring System Test Source Test Workflow
  8. Microcks - Kubernetes native tool for API Mocking & Testing

    ▪ What is Microcks? – Kubernetes-native tool for API mocking and testing. – Supports REST, gRPC, GraphQL. ▪ Key Features – Automatic generation of mocks based on OpenAPI, AsyncAPI specs. – Integrated testing for contract validation. – Seamless support for Kubernetes environments. ▪ Benefits – Faster integration with external services. – Reduced manual effort for creating and testing mocks. 11 QAware | 11 microcks/microcks
  9. Conceptual Architecture QAware | 13 Packages Package publish update Run

    deploy watch Deploy watch Dev GitOps Build push Checkout Build Test Quality Package Dev Test (E2E, NFA) trigger test Tests run tests upload Update API Schema Definition upload
  10. QAware GmbH | Aschauer Straße 30 | 81549 München |

    GF: Dr. Josef Adersberger, Michael Stehnken, Michael Rohleder, Mario-Leander Reimer Niederlassungen in München, Mainz, Rosenheim, Darmstadt | +49 89 232315-0 | [email protected] Thanks you! Next step? Let's talk. Mario-Leander Reimer Managing Director, CTO [email protected] +49 151 61314748
  11. 230 Mitarbeiter München Mainz Darmstadt Rosenheim Seit 20 Jahren erfolgreich

    in anspruchsvollsten Projekten 40 M€ Umsatz Eckdaten Wir entwickeln und sanieren Futureware: Software, die geschäftskritisch und innovativ ist. Software, die verlässlich Erfolg liefert. Futureware Innovations- Labor Querschnitts- Lösungen Standard- Software Differenzierungsgrad Kerngeschäft fern nah gering hoch QAware steht dabei für zuverlässige und nachhaltige Digitalisierung: Wir liefern mit garantierter Zufriedenheit Wir bieten Best-Kosten durch marktführende Produktivität und Qualität Wir transformieren Unternehmen mit Softwareprojekten