Mitch’s Testing Kata

Thanks to Mitch Ferrer, Application Architect with AppRiver, LLC, for hosting the Gulf Coast Software Testing June Meetup and to our friends at the Gulf Coast Center for Innovation and Entrepreneurship for providing meeting space for 10 Test Enthusiasts.

Why kata?  -for the sake of practice and growth.  Test drive a language, test drive a solution, test different approaches, practice patterns and techniques, change habits, and accelerate learning by pairing, develop skills and mastery.  Mitch opened with a brief slide deck that gave us a background on katas as applied to software.  He reviewed their benefits and lead us through the kata posted in this discussion thread as a demonstration of how arbitrary, seemingly obtuse, requirements are often driven by real world needs.  We then launched into brainstorming user stories and user-acceptance criteria on a whiteboard.

After we were satisfied that we had a good start exploring user stories and acceptance criteria,  Mitch walked us through two solutions, a math solution and pure string manipulation solution.  This dichotomy showed the math solution to be ultra efficient but not easy to understand vs. a pure string manipulation solution (Typescript with Jasmine) which was more lines of code but readable and easy to follow.  The key to this kata were tests designed based on desired behaviors using triangulation – sample inputs and outputs – to allow for vetting business rules and to allow for adding new use cases, which surfaced as we discussed a variety of acceptance criteria.

With Mitch putting each solution through the tests (swapping out implementations) and modifying some bits of code, we saw firsthand how test first development (consuming tests first) ensures ease of use and awareness of how changes will affect customers.  We saw how test first development makes requirements provable and implementations easy to re-factor, and ultimately, how tests facilitate teams tackling business problems.

This kata was a fine example to illustrate the beauty of test first development.  Thank you, Mitch, for sharing your time, expertise and love for the craft of software development and testing!

 

No comments yet

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: