Book Image

Mastering Spring MVC 4

By : Geoffroy Warin
Book Image

Mastering Spring MVC 4

By: Geoffroy Warin

Overview of this book

<p>Spring MVC is the ideal tool to build modern web applications on the server side. With the arrival of Spring Boot, developers can really focus on the code and deliver great value, leveraging the rich Spring ecosystem with minimal configuration.</p> <p>Spring makes it simple to create RESTful applications, interact with social services, communicate with modern databases, secure your system, and make your code modular and easy to test. It is also easy to deploy the result on different cloud providers.</p> <p>Mastering Spring MVC will take you on a journey from developing your own web application to uploading it on the cloud.</p> <p>You begin by generating your own Spring project using Spring Tool suite and Spring Boot.</p> <p>As you develop an advanced-level interactive application that can handle file uploads as well as complex URLs, you will dive into the inner workings of Spring MVC and the principles of modern web architectures.</p> <p>You will then test, secure, and optimize your Spring web application and design RESTful services that will be consumed on the frontend.</p> <p>Finally, when everything is ready, you will release your application on a cloud provider and invite everyone to see.</p>
Table of Contents (17 chapters)
Mastering Spring MVC 4
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Writing acceptance tests


Unit tests can only cover a subset of the different interactions between the components of our application. To go a little further, we will need to set up acceptance tests, tests that will actually boot up the complete application and allow us to interact with its interface.

The Gradle configuration

The first thing we will want to do when we add integration tests to a project is to put them in a different location to that of the unit tests.

The reason for this is, essentially, that acceptance tests are slower than unit tests. They can be part of a different integration job, such as a nightly build, and we want developers to be able to launch the different kinds of tests easily from their IDE. To do this with Gradle, we will have to add a new configuration called integrationTest. For Gradle, a configuration is a group of artifacts and their dependencies. We already have several configurations in our project: compile, testCompile, and so on.

You can have a look at the...