DEV Community

John Peters
John Peters

Posted on

TDD without realizing it!

In the spirit of get it up and running first (the Prototype). Then reactoring and perfecting later. I create components with mock data in the Prototype itself. Then I mark up the css, and code up just what's specified and no more.

The data for the Prototype is created in the same manner as an automated test would use; aiming to test all boundaries, (such as min, max, min+1, min-1, max+1, max-1), as well as incorrect data type injection. Additionally; the mock data reflect permutations to simulate a bad workflow.

The Jasmine tests are not a focus yet, other than they simply create a component.

When I'm ready to check it in, I notify my lead, that the first demo is ready. He pulls the master branch takes a look and provides feedback. The first iteration completed with feedback.

From there, the code is delivered to the dev. server which allow BSAs, Designers, Product Owners and QA folks to add more feedback. Because the community gets to view the demo at the earliest point, the feedback reflects the differences between intentions and reality.

As things progress and we hook up the back end, all the mock data injection moves to our Jasmine tests.

New Tasks are made based on feedback and are now visible to the team. Each subsequent checkin requires an attached task. All BSAs and Leads need to do is guide on the order to be worked.

This process is Test Driven in that everyone else sees the results as soon as possible and are included in the feedback process. I have never once yet found that Project Managers, Product Owners, Team Leads, or even the customer's not really like this concept of getting involved early.

JWP2020

Top comments (0)