Eric Deandrea

Test-Driven Development: It's easier than you think!

Think test-driven development is slow? Watch a fully tested microservice get built from scratch in under 25 minutes.

Test-Driven Development: It's easier than you think!
#1about 3 minutes

Understanding the principles of test-driven development

Test-driven development is introduced as a practical approach to ensure code quality by building a pet adoption application with a REST API, Kafka, and a Postgres database.

#2about 2 minutes

Setting up a new Quarkus project in IntelliJ

A new Quarkus application is created using IntelliJ, selecting necessary extensions like REST with Jackson, Hibernate ORM, and the Postgres driver.

#3about 1 minute

Exploring Quarkus Dev Mode and Dev Services

Quarkus Dev Mode provides live reloading and Dev Services automatically starts a Postgres container without manual configuration, streamlining the development workflow.

#4about 3 minutes

Using an AI assistant to generate a JPA entity

The IntelliJ AI assistant generates a complete JPA entity class for a pet from a detailed text prompt, accelerating the initial data model creation.

#5about 4 minutes

Writing persistence layer tests with QuarkusTest

Persistence layer tests are created using the `@QuarkusTest` and `@TestTransaction` annotations, which manage the application context and ensure database changes are rolled back after each test.

#6about 1 minute

Implementing the Panache repository to pass tests

The repository layer is implemented using Quarkus Panache, which simplifies database queries and allows the previously written failing test to pass.

#7about 6 minutes

Mocking and testing the REST layer with Rest Assured

The REST API layer is tested by mocking the repository dependency with `@InjectMock` and using the Rest Assured library to verify HTTP responses and status codes.

#8about 2 minutes

Implementing the REST resource with AI assistance

An AI assistant generates the full Jakarta REST resource class based on the test suite, demonstrating how to implement code that satisfies a predefined set of tests.

#9about 3 minutes

Using virtual threads and the Quarkus Dev UI

Endpoints are switched to run on virtual threads using a simple annotation, and the Quarkus Dev UI is showcased as a tool for inspecting the database and other extensions live.

#10about 1 minute

Summary and resources for getting started with Quarkus

The session concludes by highlighting how quickly a fully tested application was built and points to the Quarkus superheroes demo for further learning.

Related jobs
Jobs that call for the skills explored in this talk.

Featured Partners

Related Articles

View all articles
BR
Benjamin Ruschin
What Developers Really Need to Create Great Code Demos
Every developer on earth has, at some point, had another developer to thank for a breakthrough, a success, an aha moment they wouldn’t have had without coming across that blog post, that open-source contribution, that reply on socials or that humble ...
What Developers Really Need to Create Great Code Demos
CH
Chris Heilmann
With AIs wide open - WeAreDevelopers at All Things Open 2025
Last week our VP of Developer Relations, Chris Heilmann, flew to Raleigh, North Carolina to present at All Things Open . An excellent event he had spoken at a few times in the past and this being the “Lucky 13” edition, he didn’t hesitate to come and...
With AIs wide open - WeAreDevelopers at All Things Open 2025
CH
Chris Heilmann
Dev Digest 121 - AI goes offline
Hello fellow developer, let's take a look at the cost of AI and its efficiency, catch up on security issues and sing the praise of new JavaScript and CSS features.News and ArticlesThe way we use AI these days seems powerful, but it isn't very efficie...
Dev Digest 121 - AI goes offline
DC
Daniel Cranney
Dev Digest 194: AI vs. Version Control, Password Louvre & Cursed Webdev
Inside last week’s Dev Digest 194 . 🧠 Learn how to become an AI-native software engineer 🤷‍♂️ How can you stand out when anyone can build anything? 👂 Whisper Leak allows listening to encrypted chats 🐝 What’s new the OWASP2025 Top Ten List 🙅‍♀️ Curse...
Dev Digest 194: AI vs. Version Control, Password Louvre & Cursed Webdev

From learning to earning

Jobs that call for the skills explored in this talk.

Java & Quarkus Architect

Java & Quarkus Architect

Paradigma Digital
Municipality of Valencia, Spain

Java
Azure
Kafka
Agile Methodologies
Continuous Integration
+1
Java & Quarkus Architect

Java & Quarkus Architect

Paradigma Digital
Municipality of Madrid, Spain

Java
Azure
Kafka
Agile Methodologies
Continuous Integration
+1
Java Software Engineer

Java Software Engineer

Test Driven Solutions
Edinburgh, United Kingdom

Intermediate
Java
MySQL
NoSQL
Scrum
Jenkins
+4