Here at 7digital, we see the relationship between the customer and the developer as one of the most important aspects of software development. We treat software development as more of a craft than an engineering discipline. Craftsmen back in the day would have constant communication with their customers, receiving regular visits from their customer to discuss progress and alterations as the item takes shape.

 

Over the last twenty years, the agile software movement and extreme programming in particular has championed this with its short iterations, customer showcases and active customer participation in the creation of features.

 

Processes like Behaviour Driven Development (BDD) have attempted to bridge the gap between craftsman and customer, giving developers processes to guide software development based on the desired behaviour of the system rather than through more traditional software engineering disciplines.

 

Tools, such as Cucumber, actualise this process. Cucumber (and similar, older tools such as Fit, Fitnesse and Storyteller) provides an interface between the customer and the developer by providing a human readable specification of the software that is also understood by the computer. Based on the description, the computer executes the software accordingly.  The customer can then see immediately if the software behaves according to the specification.

 

Of course, translating human text into instructions for a computer isn’t easy. While modern programming languages on the surface do read like English, and tend to use English words, it takes a certain amount of experience to appreciate what the actual behavior of a piece of software is just by reading the code. The skill in using tools like Cucumber is in translating what the customer understands into something the machine can interpret.

 

If you’ve been looking for some time for a resource that offers a good grounding in using a tool like Cucumber then you’ll be pleased to hear that one has arrived courtesy of Matt Wynne and his Cucumber School.

 

The Cucumber School is a series of video tutorials for learning and practising how to do this. Matt Wynne takes you on a journey from the initial planning session with the customer through developing an application (‘Shouty’ - a social networking app). Throughout he highlights potential pitfalls that many teams using this tooling hit the first time they try it out. He does this with wit and aplomb. The videos are lovingly animated and include advice that Matt has built up from his many years of using and contributing to Cucumber. All this advice is condensed into six 20 minute chapters and it is advice that would otherwise take you hours and hours of trawling through blog posts and talks to discover.

 

Cucumber School covers just about everything you would want to tell developers about BDD in a little over 2 hours. To get a flavour of the style of the course the first video is available for free at the Cucumber School website and in itself demonstrates the power of BDD as a communication tool.

 

At the heart of successful software development is constant communication between the development team and customers with a business problem to solve. Cucumber provides an effective way of taking these conversations and turning them into a set of automated specifications that describe the software built. Introducing Cucumber to your development process can initially seem daunting so to get you started try The Cucumber School, which will help you to get well on the way to making it a useful and valuable part of your development process.

 

 

About the author:

For nearly two decades Leon Hewitt has been creating software to solve people's problems. He has worked at 7digital since 2012. When he's not waxing lyrical about software you can hear him chat about his favourite television programme Doctor Who on the Never Cruel or Cowardly podcast. @DocLeon

 

Tag: 
Cucumber
Learning
Code Learning
Test Framework
sharri.morris@7digital.com
Saturday, July 7, 2012 - 13:03

We have recently been working on an incremental indexer for our Solr based search implementation, which was being updated sporadically due to the time it took to perform a complete re-index; it was taking about 5 days to create the 13GB of XML, zip, upload to the server, unzip and then re-index. We have created a Windows service which queries a denormalised data structure using NHibernate. We then use SolrNet to create our Solr documents and push them to the server in batches.

Solr Update Process

sharri.morris@7digital.com
Friday, March 2, 2012 - 11:47

After having read the o’Reilly book “REST in Practice” , I set myself the challenge of using OpenRasta to create a basic RESTful web service. I decided for the first day to just concentrate on getting a basic CRUD app as outlined in chapter 4 working. This involved the ability to create, read, update and delete physical file xml representations of Artists. It is described in the book as a Level 2 application on Richardson’s maturity model, as it doesn’t make use of Hypermedia yet. One reason why OpenRasta is such a good framework to implement a RESTful service is that it deals with “resources” and their representations. As outlined in “REST in Practice”, a resource is defined as any resource accessible via a URI, and OpenRasta deals with this perfectly as it was built to handle this model from the ground up.

The Basic Web Service

sharri.morris@7digital.com
Thursday, February 2, 2012 - 17:05

When bootstrapping a structure map registry, you are able to set the "life style"  of that particular instance using Structuremaps fluent interface. For example, when using NHibernate, it is essential that you set up ISessionFactory to be a Singleton and ISession to be on a per Http Request basis (achievable with StructureMaps HybridHttpOrThreadLocalScoped directive). Example:

For() .Singleton() .Use(SessionFactoryBuilder.BuildFor("MY.DSN.NAME", typeof(TokenMap).Assembly)) .Named("MyInstanceName");
For() .HybridHttpOrThreadLocalScoped() .Use(context =>; context.GetInstance("MyInstanceName") .OpenSession()) .Named("MyInstanceName");
It's nice and easy to test a Singleton was created with a Unit Test like so:

[TestFixtureSetUp] public void FixtureSetup(){ ObjectFactory.Initialize(ctx => ctx.AddRegistry(new NHibernateRegistry())); } [Test] public void SessionBuilder_should_be_singleton(){ var sessionBuilder1 = ObjectFactory.GetInstance(); var sessionBuilder2 = ObjectFactory.GetInstance(); Assert.That(sessionBuilder1, Is.SameAs(sessionBuilder2)); }

sharri.morris@7digital.com
Wednesday, February 1, 2012 - 15:42

Introduction

We have been using Solr for a while for search, Solr is fantastic, but the way we get our data into Solr is not so good. The DB is checked for new/updated/removed
content, then written into a jobs table, which is checked to see if there are any pending jobs. There are numerous issues with using a DB table as a queue, some for MySQL are listed at:

http://www.engineyard.com/blog/2011/5-subtle-ways-youre-using-mysql-as-a...

To stop using our DB as a queue I decided to test out setting up and using an AMQP based message queue. AMQP is an open standard for passing messages via queues. The finally goal would be to allow other teams to push high priority updates or new content directly to the queue rather than have to go through the DB, which can add considerable latency to the system.

For this test RabbitMQ was used, as it has a .Net library and it runs on virtually all OSs, has good language support, and good documentation. This can be found at the RabbitMQ site: http://www.rabbitmq.com/

Getting Started

I strongly advise reading these before you start:
http://www.rabbitmq.com/install-windows.html
and