BDD Scenarios should be automated

Last February, I had this conversation with an agile coach (AC) at an organization in an agile transformation:

AC: – “We started up on BDD today!”

Me: – “Really? That’s awesome! Automating scenarios?”

AC: – “No, just writing scenarios.”

Me: -“So it’s not BDD… It’s specification by Example.”

AC: -“Why not? BDD doesn’t need test automation.”

Me: -“We can say that’s half way to BDD. Scenarios shall be automated after writing it.”

After few minutes, no agreement.

The importance of Test Automation for Business Time to Market

Right after I woked up today, I read this Dan North’s tweet:

Screenshot from 2018-09-23 13:48:42

Trunk-based development makes the development teams integrate and test on a single code, which is the trunk (or master in Git). It is the base for Continuous Integration and Continuous Delivery. This approach brings software releases early, reducing time to market. At the extreme, Lean Startups.

Two weeks ago I was coaching an agile team for the first time, they use feature branches, having a slow cadence of deliveries. They are working on a single product with other three teams in their organization, plus other three organizations. In this case, code integration is a mess and its code is fragile. After a short time, business cannot have fast time to market anymore.

So what is missing?

It is virtually impossible having trunk-based development without test automation. When you need to integrated code, you need to test the feature and every thing related. So doing it manually is insanity. Manual testing can be easy in the beginning, but the software becomes more and more complex. You need test automation.

First of all, your team have to understand the need of test automation. Secondly, they have to learn and practice test automation. Why not try coding dojos or mob programming?

Based on the Redundancy principle of eXtreme Programming, your team can automate tests on critical features, difficult problems, so it can be approached in many ways. Developers focus on unit and integration code mostly, even functional tests. Testers automate functional and many other types of tests. They help each other. There is no right division on that.

Keep something in your mind: “Legacy code is simply code without tests” by Michael Feathers. So every code you commit without tests, it is legacy code.

So cheers for good practices on software development…

2018-08-01_10-37-45
Dionatan Moura (me, left) and Dan North (BDD creator, right) in the conference Agile on the Beach 2017. Falmouth, England.