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

Quarkus and WireMock. Dev Services for your pro...

Quarkus and WireMock. Dev Services for your projects

Quarkus offers many local development capabilities, including the recently released Dev Services that usually run with Testcontainers under the hood. We can leverage Dev Services to provide real-time API provider development experiences for Quarkus-based services and client apps.

In this session, I provide an overview of using Quarkus and its Dev Services in Gradle projects. We take WireMock as an example. I will demonstrate how to develop a REST API and a gRPC 3-tier client-service-database application using Quarkus and WireMock. DM for a Testcontainers edition!

Demo with Apache Maven: https://github.com/wiremock/wiremock-quarkus-devservice-demo
Demo with Gradle Build Tool: https://github.com/oleg-nenashev/gradle-quarkus-plugin-demo

NOTE: This presentation was modified on Oct 10, 2025, to exclude the IP of Gradle Inc. Extended introduction, Quarkus Plugin for Gradle Build Tool, and the respective demo details are no longer included in the slides.

Copyright Notice: Gradle, Inc. Gradle®, Develocity®, Build Scan®, and the Gradlephant logo are registered trademarks of Gradle, Inc. "Gradle" means "Gradle Build Tool" and does not reference Gradle, Inc. and/or its subsidiaries

Avatar for Oleg Nenashev

Oleg Nenashev PRO

March 14, 2024
Tweet

Resources

More Decks by Oleg Nenashev

Transcript

  1. NOTE: • This presentation was modified on Oct 10, 2025,

    to exclude IP of Gradle Inc. • Quarkus Plugin for Gradle Build Tool is no longer included in slides • Gradle®, Develocity®, Build Scan®, and the Gradlephant logo are registered trademarks of Gradle, Inc. "Gradle" means "Gradle Build Tool" and does not reference Gradle, Inc. and/or its subsidiaries. Former Edition at Türkiye Java Community, May 2024:
  2. > whoami @oleg_nenashev oleg-nenashev Dr. Nenashev / Mr. Jenkins Developer

    tools hacker Community builder FOSS/DevRel consultant #RussiansAgainstPutin #StandWithUkraine
  3. My Open [and not so] Communities Time * Once a

    contributor, [almost] always a contributor Neuchâtel
  4. > whoami --quarkus • Jenkins on Quarkus experiments • Jenkinsfile

    Runner native exec with Quarkus • FaaScinator pet project 7
  5. > whoami --quarkus • Jenkins on Quarkus experiments • Jenkinsfile

    Runner native exec with Quarkus • FaaScinator pet project • WireMock Dev Service 9
  6. Quarkus is great for building REST APIs 11 • Built-in

    support • Many extensions • Developer experience code.quarkus.io
  7. Ways to do API integration testing 1. Testing against Production/Staging

    servers 2. Testing against a simplified/containerized instance (e.g. Testcontainers) 3. Modeling (aka Mocking) at the API provider level (e.g. WireMock or Microcks) 4. Mocking at the code level by instrumenting it (Mockito, PowerMock) 18 Slow Fast Nope Accu- rate * For Testcontainers, see the slides
  8. 19 wiremock.org/docs/stubbing IF (request_url) THEN (response) * * it gets

    MUCH more complex WireMock Config JSON: Client library response request Client App Mock API Server HTTP/2 API Mocking 101
  9. API Mocking for Quarkus 20 Main implementation in Java Native

    lib, Docker images and Testcontainers modules Support for GraalVM Unofficial Quarkus Dev Service Sandbox CNCF Project Golang / Microservice arch Docker image, Testcontainers module Unofficial Quarkus Dev Service
  10. 21 Staging & QA Tests Build Integration tests Build Tests

    Gaining confidence in you software “Shift Left”
  11. 25 Quarkus Dev Services Powered By: • Quarkus Extensions •

    Quarkus Extensions + Testcontainers • Compose Specification: https://compose-spec.io Quarkus supports the automatic provisioning of unconfigured services in development and test mode. We refer to this capability as Dev Services
  12. What I’m looking forward to? • Feedback on tools we

    used • Promoting WireMock and Microcks Dev Services as official ones • Quarkus developer experiences 36
  13. References My demo: • with Apache Maven: github.com/wiremock/wiremock-quarkus-devservice-demo • with

    Gradle Build Tool: github.com/oleg-nenashev/gradle-quarkus-plugin-demo WireMock extension for Quarkus: • https://docs.quarkiverse.io/quarkus-wiremock • https://github.com/gscaramuzzino/quarkus-wiremock-testing • https://quarkus.io/guides/getting-started-testing#quarkus-test-resource 37