Calling APIs is business as usual. Building API clients is always good fun, testing them is somewhat trickier.
Wiremock is one of the most frequently used tools to mock APIs. Setting it up for testing purposes in your Spring Boot application is a bit daunting. Or should I say: WAS daunting. Enter WireMock Spring Boot, making your life easier.
I’ll kick off with building a simple API client and adding WireMock Spring Boot in the mix. Although simple, there are some gotchas as usual.
As a wrap-up, we’ll go for some practical tips on how to test a third-party client. Expect some tips on how to figure out what calls are done and how to turn this in some nice tests.
Pieter-Jan Drouillon
With more than 15 years in the IT sector, I have built my expertise around the following three key pillars: java development, data and education. As a coach and lifelong learner, I have a natural curiosity to understand the challenges and create better solutions. Following this mindset, I have recently finished Magna Cum Laude the Postgraduate in Big Data and Analytics in Business at KU Leuven, pursuing a better understanding of the challenges faced in the sector.
In my spare time, I spend time with one partner, two kids and four guitars. If time permits, I also like to try out new technologies on pet projects.I'm a member of Toastmasters Leuven, a club where you can improve your speaking and leadership skills. So far I've completed the competent communicator manual, containing 10 speeches each focussing on one essential part of public speaking. Currently I'm working on 'technical presentations', one of the many advanced manuals. I occasionally won the best speech of the evening at our meetings which is quite the accomplishment given the high level of the experienced club members.