Leveraging Code Kata as a Tester

This is a guest posting by Jim Holmes

Modern software testers need to be comfortable with code. The days of testers not being able to open up a code editor and understand software fundamentals are thankfully vanishing. As modern testers, we need to embrace a new challenge.

This doesn’t mean every tester needs to be proficient at writing multi-threaded, highly performant concurrent REST web services accessing storage through dependency injection framework managed data access and surfaced through the latest React Node Angular Javascript framework. To the contrary, despite me having made up the gobbledygook of the preceding sentence testers don’t need to know the in-depth technical aspects of coding. Instead, we testers need to know enough to better focus our testing and better collaborate with the developers who do write that complex code.

Get TestRail FREE for 30 days!


Kata as a Practice: Creating an Instinctive Flow

Testing Code, Collaborating With Developers, Instinctive Flow in Coding, Testing Code, Software Kata, Code Kata, Martial Arts Kata in Coding, Learning Effective Code Structuring, Basic Language Syntax. TestRail.

Getting to that fundamental competency requires two things: some elementary knowledge, and lots of disciplined practice.

Martial artists have long used kata for developing combat techniques. As Wikipedia says, “The goal is to internalize the movements and techniques of a kata so they can be executed and adapted under different circumstances, without thought or hesitation. A novice’s actions will look uneven and difficult, while a master’s appear simple and smooth.”

Repeatedly working through the small, intentional parts of kata lets students and masters develop muscle memory so that the more significant action becomes instinctive.

Early in its infancy, the software craftsmanship movement seized upon the idea of kata as a practice which could help developers in the same way: create an instinctive flow through the mechanical phases of a software problem, leaving students able to dedicate more critical thought to solving the harder domain aspect of the problem.

Early adopters in the movement looked to small, realistic problems that could be used in the same fashion as martial arts kata: repeat the same problem over and over, learning to flow through the exercise smoothly. As such, software kata around string calculators, bowling game scoring, and other similar practices were born.

These problems lend themselves to the same learning concepts as judo or karate kata. For example, internalizing the mechanics of following the arrange, act, assert pattern for automated tests enables developers to focus on the harder parts of the problem at hand. In the same line, careful attention to the Test Driven Development cycle of red, green, refactor builds the discipline to follow the same critical cycle naturally without thought.

Numerous software kata exist. Dave Thomas, the renowned author and software expert, created a blog series that walks through 21 kata. Robert C. “Uncle Bob” Martin, another well-known expert, wrote the Bowling Game kata years ago. Another great source is at katas.softwarecraftsmanship.org, where you can watch videos of developers working through kata.

So what can you as a tester expect to learn from working kata?

As mentioned above, testers need a basic comfort and level of proficiency in writing, reading, and understanding code. Kata practice is a terrific way to achieve this.

Receive Popular Monthly Testing & QA Articles

Join 34,000 subscribers and receive carefully researched and popular article on software testing and QA. Top resources on becoming a better tester, learning new tools and building a team.

We will never share your email. 1-click unsubscribes.

Quickly Master Your Integrated Developer Environment, the Basic Language Syntax and Necessary Libraries

Testing Code, Collaborating With Developers, Instinctive Flow in Coding, Testing Code, Software Kata, Code Kata, Martial Arts Kata in Coding, Learning Effective Code Structuring, Basic Language Syntax. TestRail.

First off, kata help you quickly master your Integrated Developer Environment. Regardless whether it’s Visual Studio Code, Atom, Vim, or something else, kata give you a route to quickly memorize critical keyboard shortcuts and expansion templates. You’ll learn how your IDE helps you automatically best format your written code to follow a language’s idioms. Kata also give you a chance to learn useful window and pane layouts or configurations. Finally, you’ll quickly master executing and interpreting automated tests within your IDE.

Secondly, kata will help you quickly master the basic language syntax and necessary libraries of the language and platform you’re using. You’ll soon grow comfortable with basic constructs of classes, methods, variables, and statements. Constant repetition will help you move past struggles of how to declare arrays of particular types or the initially confusing mechanics of interacting with collections.

Flow control via a language’s if/then/else or do/while constructs can be intimidating and time-consuming to gain proficiency around. A good kata problem can help you move quickly through learning effective structuring and flow handling.

Additionally, good kata get you intimately familiar with popular test automation frameworks. You’ll quickly master the mechanics of creating test methods, and the arrange/act/assert structure of most tests will become second nature to you. A good kata teaches you many different ways to leverage a test framework’s comparison/equivalence capabilities.

As you get better and better at working through various kata, you’ll find yourself developing different patterns of logic and thinking. This maturity is perhaps the pinnacle of kata practice, where you’re so adept at the necessary forms that your mind is freed up to do what you as a tester need your brain to do: focus on understanding the problem’s domains and intricacies, rather than struggling with guessing at statements.

Developing an Instinctual Understanding of how Good Clean Code Appears

Testing Code, Collaborating With Developers, Instinctive Flow in Coding, Testing Code, Software Kata, Code Kata, Martial Arts Kata in Coding, Learning Effective Code Structuring, Basic Language Syntax. TestRail.

Finally, good kata give you something slightly more intangible, but greatly more important: an instinctual understanding of how well-written code appears. You may not understand the in-depth technical aspects of how a web service authenticates, checks user authorization, pulls data from an object relational mapper and presents it back through a browser via Javascript. You don’t need to! What you can do is sit down with a developer and have a discussion about how the code looks complex due to its unclear naming, extremely long methods and classes, and convoluted, nested if/then/else statements.

Dedicate time each day to working through code kata. You’ll find you quickly become proficient and comfortable with the code. You’ll be a better tester for it, and you’ll be a far better team member.

Jim is an Executive Consultant at Pillar Technology where he works with organizations trying to improve their software delivery process. He’s also the owner/principal of Guidepost Systems which lets him engage directly with struggling organizations. He has been in various corners of the IT world since joining the US Air Force in 1982. He’s spent time in LAN/WAN and server management roles in addition to many years helping teams and customers deliver great systems. Jim has worked with organizations ranging from start ups to Fortune 10 companies to improve their delivery processes and ship better value to their customers. When not at work you might find Jim in the kitchen with a glass of wine, playing Xbox, hiking with his family, or banished to the garage while trying to practice his guitar.

Test Automation – Anywhere, Anytime

Try Ranorex for free

In This Article:

Sign up for our newsletter

Share this article

Other Blogs

General, Agile, Software Quality

How to Identify, Fix, and Prevent Flaky Tests

In the dynamic world of software testing, flaky tests are like unwelcome ghosts in the machine—appearing and disappearing unpredictably and undermining the reliability of your testing suite.  Flaky tests are inconsistent—passing at times and failin...

Automation, Programming

How to Report On Test Automation (Tools + Metrics)

Test automation streamlines repetitive tasks, accelerates testing processes, and ensures consistent, reliable results in software testing. Reporting on test automation provides actionable insights and visibility into the test outcomes, enabling teams to mak...

General, Continuous Delivery

What is Continuous Testing in DevOps? (Strategy + Tools)

Continuous delivery is necessary for agile development, and that cannot happen without having continuity in testing practices, too.Continuous delivery is necessary for agile development, and that cannot happen without having continuity in testing practices,...