bdd

/Tag:bdd

Simpler. Clearer. Faster.

The UK Government has invested £17 million over the past 2 years migrating from several rather old websites to the new, shiny gov.uk website. James Stewart and Anna Shipman gave an uplifting talk at the Edinburgh BCS branch meeting on May 1st, describing how they had scaled from one small team of 12 to ten teams (and an organisation of over 200) in not much more than a year. Not only that, but they had delivered on-time and have since gone on to win the “Design Award of the Year.” Everything was not perfect – they admit to having worked unsustainable hours and of accruing significant technical debt – yet they appeared energised, motivated and undeniably happy.

Prior to that meeting I spent several days with a large corporate client where a large number of teams were being mobilised to develop a major, strategic implementation. They will have to learn new technologies and new methodologies at the same time as being asked to deliver mission critical functionality within a very tight schedule. These teams are in their early days, but there are early signs of the pain to come.

Both of these teams consider themselves to be agile. Neither of these teams consider themselves to be using behaviour driven development (BDD).

My corporate client is aiming to deliver a complex, monolithic application, and has a small number of product owners supported by a somewhat larger number of subject matter experts (SMEs). There is conceptually one backlog, but each team is having a subset of it pushed onto a team backlog from which they pull stories to be elaborated. There’s no clear division between each team’s role and hence each story may require the team to interact with different […]

By |May 3rd, 2013|Uncategorized|0 Comments

On alcoholism, chainsaws and deliberate practice

I’ve been running a lot of training courses recently and I’ve noticed that once people have chosen where they’re going to sit, they return to that position every day. We are creatures of habit, and some habits seem to form very quickly. If I rearrange the room before the second day, or ask people to change places, no-one seems particularly bothered – they simply go and find another seat. So, having a fixed seating position seems to be a habit that’s easy to slip into, yet easy enough to break.

Other habits are harder to shift. We’ve all probably tried to modify our behaviour using rational thought and wishful thinking. For short periods of time it can even look like we’ve succeeded, but then some stimulus knocks us off course and we revert to our previous behaviour. It’s for this reason (I guess) that members of Alcoholics Anonymous always consider themselves “alcoholics that haven’t had a drink for <some time>” where <some time> can range from hours to years. Avoiding your old behaviour is certainly the first challenge. The next, and harder, challenge is becoming comfortable with your new behaviour. This is as true for our work habits as it is for any others.

The habit that I see many teams having trouble breaking, is the habit of forgetting their quality aspirations when they come under pressure. As deadlines loom I often hear people talking about “adding the tests later” or doing something “just for now”. A lot has been said about technical debt (see Martin Fowler’s excellent post or my contribution to “97 Things Every Programmer Should Know”), but I think many of these habitual, time-driven responses can’t really be considered technical debt. They’re more like […]

By |April 26th, 2013|Uncategorized|0 Comments

Living documentation can be readable and fast

In an earlier blog I promised to describe how we could exercise thin slices of our application stack, while still expressing our scenarios in a business-readable, end-to-end style. I talked about this at Cuke Up! last week and published an article covering it in the ACCU journal Overload. For completeness, I’m now adding this as a blog entry too.

Let’s assume we have the example scenario below, taken from Matt Wynne’s Squeaker example, that deals with registering at some website. (This is written in Gherkin and will be executed by Cucumber.)
Feature: Sign Up
Scenario: New user redirected to their own page
  When I sign up for a new account
  Then I should be taken to my feeds page
  And I should see a greeting message
Each line in the scenario causes a corresponding ‘step definition’ to be executed. How you implement the step definitions is up to you, and depends on the nature of your system. The example above might:

fire up a browser, navigate to the relevant URL, enter specific data, click the submit button and check the contents of the page that the browser is redirected to
call a method on a Registration object and check that the expected event is fired, with the correct textual payload
or anything else that make sense (e.g. using smart card authentication or retina scanning)

The point is that the text in the example describes the behaviour, while the step definitions (the glue code) specify how to exercise the system. An example glue method would be:
@When(“I sign up for a new account”)
public void I_sign_up_for_new_account() {
// Do whatever it takes to sign up for a new account
// e.g. exercise the web UI using Selenium WebDriver
}
Newcomers to this style of working often adopt […]

By |April 6th, 2013|Uncategorized|6 Comments

Edinburgh BDD Kickstart

At the beginning of March Matt Wynne and I ran another very enjoyable 3-day BDD Kickstart course in Edinburgh. The course was hosted in the Edinburgh Training and Conference Centre in the heart of the old town which, despite its historical location, is a thoroughly modern venue.

There’s a lot to cover in the three days, so we’re careful to ensure that everyone remains suitably snacked and caffeinated throughout the day. And when you’re learning intensively it’s crucial to move around and take regular breaks, so we  decided not to have lunch inside the training venue, but at local restaurants. Forcing everyone to go outside at lunchtime was a bit risky because the weather in Edinburgh has been particularly aggressive this year, but we all survived unscathed.

All 7 delegates enrolled for the full course (rather than opting for the 1-day BDD Fundamentals or 2-day BDD Applied modules). This gave us plenty of opportunity to get to know each other, especially since we regularly swapped teams and pairs while working through the practical exercises. Having both Matt and I there for the training also meant that there was plenty of time to focus on the specific questions and concerns of each delegate.

Both Matt and I live in Scotland, so the original motivation to run BDD Kickstart in Edinburgh was to try and make it more practical for local practitioners to attend. It surprised us that most delegates weren’t from Edinburgh, or even Scotland. Three flew up from the south coast of England, two came from north-east England, and one was from Canada (though he didn’t fly over just for the course). We also had a great mix of disciplines with testers, developers and project managers all represented […]

By |March 31st, 2013|Uncategorized|0 Comments

Every journey is just a collection of steps

People seem to love workflow style scenarios. What is it about a workflow that is so irresistible? I was talking about this with Kevlin Henney the other day, and he pointed out that it might be because business processes are the staple diet of mod...
By |March 4th, 2013|Uncategorized|3 Comments

Building trust using BDD

I've been working with a client whose development team and test team are separate. There's history involved, but to cut a long story short, the testers don't trust the developers and the developers think the testers waste a lot of time re-testing ...
By |February 22nd, 2013|Uncategorized|2 Comments

The Testing Iceberg

Not that long ago I had a conversation with @mattwynne, which led to the hastily sketched piece of paper, below. The diagram on the left (since redrawn and blogged about by @tooky) shows the relationship between End-to-end tests and Business-reada...
By |February 14th, 2013|Uncategorized|6 Comments

Cyber Dojo with Cucumber JVM

Last week I spent a fun night working on Cyber-Dojo with Jon Jagger. If you haven't heard of Jon's Cyber-Dojo yet, then I encourage you to head on over to www.cyber-dojo.com and have a play. In a nutshell, Cyber-Dojo provides a platform within whi...
By |November 8th, 2012|Uncategorized|0 Comments