Sat, 04 Dec 2021 07:10:40 GMT Sustainable Test-Driven Development https://www.ProjectManagement.com/blogs/654443/sustainable-test-driven-development Test-driven development is a very powerful technique for analyzing, designing, and testing quality software. However, if done incorrectly, TDD can incur massive maintenance costs as the test suite grows large. This is such a common problem that it has led some to conclude that TDD is not sustainable over the long haul. This does not have to be true. It's all about what you think TDD is, and how you do it. This blog is all about the issues that arise when TDD is done poorly-and how to avoid them. ATDD and TDD https://www.ProjectManagement.com/blog-post/68269/atdd-and-tdd Fri, 12 Feb 2021 07:21:55 GMT A question that we are often asked is: “What is the difference between Acceptance Test Driven Development (ATDD) and Test Driven Development (TDD)?” These two activities are related by name but otherwise seem to have little to do with each other.  ATDD is a whole-team practi... The Importance of Test Failure https://www.ProjectManagement.com/blog-post/68268/the-importance-of-test-failure Fri, 12 Feb 2021 07:09:01 GMT The typical process of Test-Driven Development goes something like this: Write a test that expresses one required behavior of the system. Create just enough production code (a “stub”) to allow the test to compile, and fail. Run the test and watch it fail (red). Modify the pro... Mock Objects, Part 1 https://www.ProjectManagement.com/blog-post/68267/mock-objects--part-1 Fri, 12 Feb 2021 07:02:48 GMT Narrow Specifications When writing tests as specifications, we strive to create a very narrow focus in each individual test.  We want each test to make a single, unique distinction about the system.  This creates a clear specification when we later read the test, and also creates the ma... Mock Objects, Part 2 https://www.ProjectManagement.com/blog-post/68254/mock-objects--part-2 Fri, 12 Feb 2021 06:51:54 GMT Techniques There are many ways to create a mock object by hand.  You will likely come up with your own techniques, which may make use of language elements and idioms made possible by the particular languages and frameworks you work with.  It is important to know more than one technique ... Mock Objects, Part 3 https://www.ProjectManagement.com/blog-post/68253/mock-objects--part-3 Thu, 11 Feb 2021 13:49:07 GMT Dependency Injection Imagine that the example use previously was implemented differently: public class BoundaryAlarm {      private GPS myGPS;      private DashLight myDashLight;      public BoundaryAlarm(){   &n... Testing the Chain of Responsibility, Part 1 https://www.ProjectManagement.com/blog-post/68248/testing-the-chain-of-responsibility--part-1 Thu, 11 Feb 2021 13:07:30 GMT The Chain of Responsibility pattern (hereafter CoR) is one of the original “Gang of Four” patterns.  We’re assuming you know this pattern already, but if not you might want to read about it first at the Design Patterns Repository: Here’s the UML at it appears in the G... A Learning Process: Re-doing CoR part 1 https://www.ProjectManagement.com/blog-post/68251/a-learning-process--re-doing-cor-part-1 Thu, 11 Feb 2021 13:00:54 GMT We're writing this blog for several reasons: To work out the intellectual material for the book we're writing To provide value to our community as quickly as possible To get feedback from our readers as soon as possible (validation-centric) However, we're also finding that... Testing Best Practices: Test Categories, Part 3 https://www.ProjectManagement.com/blog-post/68247/testing-best-practices--test-categories--part-3 Thu, 11 Feb 2021 12:42:19 GMT Continued from Test Categories, Part 2 Constant Specification We often find values that are significant to a given problem domain, but are otherwise arbitrary.  For example, the sales tax rate in a state might be .08 (8 percent), but this is just the rate as currently defined by that... Testing Best Practices: Test Categories, Part 2 https://www.ProjectManagement.com/blog-post/68246/testing-best-practices--test-categories--part-2 Thu, 11 Feb 2021 12:19:41 GMT Continued from Test Categories, Part 1 5. Behavior with related boundaries (“and”)  Sometimes a behavior varies based on more than one factor.  For example, let’s say that in order for the system to allow someone to be hired (returning a true from the canH... Testing the Chain of Responsibility, Part 1 (redux) https://www.ProjectManagement.com/blog-post/68244/testing-the-chain-of-responsibility--part-1--redux- Thu, 11 Feb 2021 11:34:53 GMT Testing the Chain of Responsibility The Chain of Responsibility pattern (hereafter CoR) is one of the original “Gang of Four” patterns.  We’re assuming you know this pattern already, but if not you might want to read about it first at the Design Patterns Repository. The ...