Building web applications using Spring, Cucumber and Swagger
aka Test Driven Development (TDD) or Behaviour Driven Development (BDD) (what Cucumber team calls) of Java Web Applications.
Why?
Because a lot of software developers spend a lot of time to build production ready java based web applications (with APIs) that include an automated test suite.
My intention is to build a reference application using a proven/robust application stack which can then be used to build applications from the scratch, FAST. Maybe 10X faster.
TL;DR
In this post I will be showing how to build a production ready java web application that provides some services (REST APIs). The best part is that i will be including a test suite that with one maven command will test all the APIs. This lays a foundation of software should be developed from the start using proper unit tests and developers spend less time wiring the frameworks and spend more time on the actual code and business logic.
We will be using Spring boot framework, Cucumber and Apache Maven.
The entire application code can be downloaded from here. Please give me a *STAR* if you like it :-)
Part 1 —The Puzzle
The example application
We will build a sample Weather Tracker application that takes in some parameters, and computes the values (generate statistics). Don’t worry about…