I've written a lot of API tests over the years, and the ones that stuck with me weren't the ones testing some abstract "users" endpoint from a textbook. They were the ones where the data was fun enough that I actually wanted to poke at it. So instead of the usual placeholder API, this tutorial uses a small Harry Potter–themed REST API — houses, students, spells — to walk through Rest Assured from zero.

By the end you'll know how to send GET and POST requests, assert on status codes and JSON bodies, work with query parameters, and test an endpoint that requires a Bearer token. No prior Rest Assured experience needed, just some basic Java.

What you'll need

JDK 11 or newer

Maven (or Gradle, if you'd rather adapt the examples)