Application tests

Consider the following command:

gradle -Dspring.profiles.active=production bootRun

If we start up the application, issuing the preceding command and firing up the browser to the URL http://localhost:8080/pi/123, we will get a fat error message on the browser screen. Ouch...

It says Internal Server Error, status=500 or something similar. That is because our code wants to connect to the backing services, but we do not have any yet. To have some test the application on this level, we should create the backing services or at least something that mocks them. The easiest way to do this is by using the SoapUI program.

SoapUI is a Java program that's available from https://www.soapui.org/. There's an open source version and free ...

Get Java Projects - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.