BDD !== Agile

BDD (Behaviour Driven Development) does struggle a little with Agile – why? Because as slick as Agile can be, it still panders to a closure mentality, ticking check-boxes as it goes along. A user story gets closed – BDD says “a what”? BDD very deliberately uses “Feature” terminology, encouraging as it does, focused and tangible deliverables, over the sometimes more-bloated User Story format. Both still are part of delivery, but in BDD, nothing is ever considered “Closed”, simply verified at a point in time. It is why BDD is frequently mentioned in context of Lean and Kanban – two other approaches that don’t fundamentally adhere to incremental closure. That is not to say BDD won’t work in any environment, but it can be a battle at the administration end, i.e. the life-cycle of requirements.

How many times I have heard the proclamation “we don’t need to regression test, we’re Agile” – missing the point that modern development approaches such as Continuous Integration (something else that doesn’t recognise closure) are by nature, regression testing. Regression testing is primarily about testing integration. As new features are added, there can always be unpredictable outcomes. You can mitigate this by regular checks, and effective development planning. BDD is also in the same area -it is not about finishing, it is about maintaining a continuum, which at some point will fulfil client requirements.

That does sound kinda casual, and it is a difficult sell. But the resulting product are more stable, feature-rich, and maintainable.

Use angular.js with WordPress

AngularJS And WordPress

1. Download zip file.
[wpfilebase tag=file id=1 /]
2. Install and activate the plugin.
3. Set wp-angularjs-include to true in Custom Fields on post edit page.

Sample test code:

  <b>Hello <span style="color:#ff6600;">{{yourName}}</span>!</b>
<div />

Sample test code output (type anything into the input field to see “Hello …” string update:


Hello {{yourName}}!


BDD – Lock the behaviour not the implementation

The example based on sorting sums up BDD testing perfectly (at 4:25).  The beauty of BDD is once you have your given‘s, when‘s and then‘s, you can start mixing up scenario statements to test different possible outcomes.  Or exploratory testing, if it needs a name.

BDD: Is there a difference between programmer and tester?

To automate, you have to code. And if you are automating an application, the logical way to think about it is developing an application to test an application. And to do that from scratch – every time – would be laborious, and unnecessary as there are many common web features. This kind of thinking has been around in software development for decades – to program with reuse in mind. Continue reading