Herein we explore the benefits of software development combining Behavior-Driven Development (BDD) and Test-Driven Development (TDD) where no code is written unless first coerced by a test (or written behavior).
We apply these concepts to a real-world challenge that many enterprises encounter -- the need to extend the life of critical business applications by exposing it over a network for access by services, mobile devices and browsers. We will create a ReSTful API wrapper for the payroll application and the required modifications of the payroll application; where all coding for this project will be performed in a manner where no code is written unless first coerced by a test.
The existing application is based on Bob Martin's Payroll Case Study, as detailed in Agile Software Development - Principles, Patterns and Practices. We have taken liberty to reimagine the Bob Martin case study as follows:
- it is a java application
- business logic library was written in 2004 to support a fat client desktop application.
- payroll records are formatted as XML
- there were no unit tests in the 2004 application
- tests were 100% manual
- in 2008, the business logic code was extracted and used to power a Spring MVC web app
- the Spring MVC rewrite has about 15% unit test coverage; unit tests were written after code and are viewed as not beneficial (ie getters and setters)
We will create a ReSTful API wrapper for an existing payroll application. And we will make the required modifications to the payroll application.
The web app enables easy access to the followiing: add employees, timesheets, pay slips, vacation time, sick time and other important information anytime, anywhere and from any authenticated device in the network. Additionally, it should include these features:
- developed using BDD and TDD
- RESTful API
- user authentication
- role based authorization
- real time data entry
- data validation
- audit logging
- enter timesheets
- view status of vacation time, sick time
- historical view of timesheets and payslips
- parameter driven deductions
- interface to transmit payroll data to Quickbooks Pro
- full legislative compliance
- multi-company and location support
- multi pay group and pay cycle
Visit our quick-start guide for setting, using and contributing to mpayroll.
More: Setup for mPayroll