Five-Project Series

TDD for a Shopping Website you own this product

prerequisites
basic Spring • basic Spring Boot • basic JUnit • basic React
skills learned
the attributes of a well formed unit test • using TDD to implement a full stack feature • isolate changes with mock-based unit tests
Steven Solomon
5 weeks · 6-8 hours per week average · INTERMEDIATE

pro $24.99 per month

  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose one free eBook per month to keep
  • exclusive 50% discount on all purchases

lite $19.99 per month

  • access to all Manning books, including MEAPs!

team

5, 10 or 20 seats+ for your team - learn more


In this series of liveProjects, you’ll put test-driven development (TDD) into practice by balancing the delivery of new features with incremental improvements to an outdated-commerce app. In each project, you’ll encounter real-world issues with the design of the code and tests that make shipping software with TDD difficult. You’ll uncover tools and strategies to overcome these problems, helping you start using test-driven development in your daily work. Through hands-on projects, you’ll increase test coverage of legacy code, refactor to improve design, and write end-to-end features.

These projects are designed for learning purposes and are not complete, production-ready applications or solutions.

here's what's included

Project 1 Modifying a Feature

In this liveProject, you’ll reduce a test’s coupling to the implementation (thereby reducing the tests’s dependence on the details of how the code works) and extend a feature using test-driven development for an e-commerce record store. You’ll begin by applying techniques to increase test readability, then implement a full stack feature that requires changes to all layers of the system. Lastly, you’ll tidy up by refactoring the implementation to reduce conceptional duplication, making the code easier to read and maintain.

Project 2 Test Coverage

In this liveProject, you’ll refactor the tests for a legacy e-commerce Spring application to improve readability, then add missing test coverage. You’ll use test-driven development to add a new coupon feature, organize your unit tests in a readable way that exposes missing coverage, and then fill in gaps in coverage by applying characterization testing so that the system can be changed without fear of adding bugs.

Project 3 Testing Anti-Patterns

In this liveProject, you’ll replace two common testing anti-patterns while also creating new features for a Java Spring e-commerce application. Testing anti-patterns can be the bane of development, slowing deliveries while providing no benefit to software quality. You’ll use Test-Driven Development to balance delivering new functionalities with improving code design.

Project 4 Mock Objects

In this liveProject, you’ll explore the difference between mock-based and traditional Test-Driven Development. You’ll write tests using mock objects for an e-commerce store, then overcome common mocks anti-patterns—including the dreaded mocks returning mocks issue. You’ll tinker with a realistic codebase which contains missing test coverage, design shortcomings, and third-party integrations, then practice evolutionary architectural design and the mockist style of TDD.

Project 5 Flaky Tests

In this liveProject you will work to overcome common issues that emerge when teams use microservices and make heavy use of integration tests. This problem is known as flaky tests, which pass and then fail without the code changing. This can cause your team to produce more bugs, as they ignore their tests due to them failing when code isn’t broken. This project shows how to overcome flaky database tests caused by tests producing side effects that affect other tests. You will practice eliminating flaky API integration tests by using consumer-driven contract testing with Spring Cloud Contract. This will verify that both the server and client conform to the same contract, enabling you to be confident that any changes to an API won’t break the wishlist feature.

book resources

When you start each of the projects in this series, you'll get full access to the following book for 90 days.

choose your plan

team

monthly
annual
$49.99
$399.99
only $33.33 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • TDD for a Shopping Website project for free

project author

Steven Solomon
Steven Solomon is a Staff Software Engineer at GitHub. He has been writing software professionally since 2007, and has worked in many sectors, including music publishing, retail, finance, loyalty, healthcare, and education. As a team lead, Steven mentors other engineers in the strategic adoption of agile thinking and techniques, allowing them to continuously improve until they find a sustainable balance to how they approach work. One agile practice that he is particularly passionate about is test-driven development (TDD), which he has used over the past 10 years to help teams deliver and demo working software every single week.

Prerequisites

This series of liveProjects is for Java software engineers with an intermediate level of experience using Spring MVC to build web applications. To begin these projects, you need to be familiar with the following:


TOOLS
  • Basic Spring
  • Basic Spring Boot
  • Basic JUnit
  • Basics of Git
  • Basic React
TECHNIQUES
  • Basic Unit Testing

features

Self-paced
You choose the schedule and decide how much time to invest as you build your project.
Project roadmap
Each project is divided into several achievable steps.
Get Help
While within the liveProject platform, get help from other participants and our expert mentors.
Compare with others
For each step, compare your deliverable to the solutions by the author and other participants.
book resources
Get full access to select books for 90 days. Permanent access to excerpts from Manning products are also included, as well as references to other resources.