Paul Gerrard

My experiences, opinions in the Test Engineering business. I am republishing/rewriting old blogs from time to time.

First published 08/01/2013

Many thanks to the Eurostar folk allowing me to present the webinar, “Live Specifications: From Requirements to Automated Tests and Back”. This talk describes how we think companies can implement continuous delivery and live specifications using the Behaviour-Driven Development approach and redistributed testing.

There were some interesting questions posed at the time some of which I answered, but several I didn't. I've finally got around to writing some notes against each. See below...

Q: How to convince client to agile?

Well, the reasons for going Agile are well understood now. The critical arguments (from my point of view) are:
  • Breaking larger projects into smaller ones reduces the complexity and risks of managing delivery – if a small project fails – it fails fast and cheaply.
  • Agile encourages the use of autonomous multi-skilled teams who communicate well. Decision making delays are much reduced, feedback is fast so problems are corrected quicker and more cheaply.
  • An on-site customer (often known as the product owner) provides day to day direction for projects, so technical people don’t go off track, and get feedback on ‘the right thing to do’ quickly.
  • Breaking complex functionality into stories allows stories to be prioritised by business value (by the on-site customer). As a consequence, the team always delivers value as early as possible and are not distracted by lower value activities.
  • The morale of Agile teams is usually much higher than other organisations because all members are involved, well-informed and accountable for progress towards delivery.
  • Agile does not necessarily reduce the amount of rework, but brings it forward so the consequences of defects are minimised. Further, refactoring is usually an explicit task for developers in Agile teams, so the reword due to redesign and discovery of better ways to do things is visible and manageable.

Q: BDD works very well for testing stories and component testing, e.g. web services, but when considering end-to-end scenario testing, BDD gets very messy. What do you suggest when testing scenario based end-to-end tests?

True enough. The current BDD tools focus very much at a story or feature-level testing and automation but do not support the ‘end to end’ testing required to test integration and consistency between features.

The BDD approach needs to align more with the increasing use of workflow and story-boarding approaches used by teams building non-trivial systems. Essentially, feature test scenarios need to be mapped to steps in a workflow so they become an executable end to end test procedure. Now, this is relatively easy with manual tests run by intelligent testers. But there are some specific challenges with automating these end to end tests.

Existing BDD tools can usually work with GUI automation tools, but more often, they are used with unit test frameworks. In general, they fit more naturally with developers’ feature testing than system or user acceptance testing. In order to create end to end tests:

  • Each feature/scenario test requires a context to be defined by the controlling workflow OR the feature/scenario needs keywords/macros that can be called to prepare the feature for use in different scenarios. It’s not yet clear which approach is best (or even viable, without too much manual effort).
  • Existing keyword-driven test tools and frameworks map nicely to BDD. It seems to me that the keyword driven approach for navigation through (potentially complex) workflows is the most likely path to success with end to end automation. Watch out for BDD capabilities in existing frameworks e.g. Robot Framework has a BDD capability.
  • In our tool, Business Story Manager, we already have the capability to create process-paths or workflows with steps mapped to features and scenarios. We have ‘integration to Robot Framework’ on our roadmap. Other integrations will follow.
  • Overall however, we expect most automated testing to focus on feature-based checking, rather than complex end to end testing with obscure paths.

Q: Does a BDD dictionary replace an acceptance test plan ?

In a word, no. I’m not sure I understand the question. In the Business Story Method and supporting technology, the dictionary has several core features:
  • To capture terms (and concepts) that are relevant to an application and requirements. These may be business or technical terms, abbreviations or any concept, even business rules.
  • To index the usage of these terms in requirements, stories and tests so they can be traced and coverage analyses made.
  • We extend this in our tool to cover data item names in scenario outlines. Where scenarios contain <placeholders> for data provided as tabulated examples we can trace the usage of these data items and in effect create a simple, but effective data dictionary for them.
  • Overall – the goals of the dictionary are to promote a ubiquitous language, support traceability, impact analysis and provide requirements and story coverage measures that are based on the language used in the business domain.

Q: Could you name again the BDD tools you mentioned as an example at the beginning of the webinar?

There is a comprehensive description of BDD on the http://behaviourdriven.org website. The section on Implementations provides a list of the common tools, although I think the list is growing steadily. http://behaviourdriven.org/Implementations

The tools I mentioned in the talk were Cucumber, Specflow and FitNesse, I believe.

Q: I have tried to google DeFOSPAM but got no hits.

It’s there for me 8O). Try http://gerrardconsulting.com/index.php?q=node/604 – this text is an extract from the pocketbook.

Q: In BDD, when scenarios become more and more, how to organize them effectively?

It’s an obvious problem with stories, once you create non-trivial systems using them. We have heard tales of companies managing 20,000 stories in separate feature files in a single directory, and that’s a scary prospect. One way with existing ‘file-based’ products would be to create a consistent file naming convention and directory structure. But this is really cumbersome.

The Relish website http://relishapp.com offers a simple repository service for your stories (and other documentation) and is free for ‘open’ projects. Expect other services like this to spring up.

Q: In regards to production vs going live, how to you avoid customers being exposed to changes in production?

Increasingly, the continuous delivery model implies that software and changes are delivered into a production (or production-like) environment for testing prior to go live. There are several approaches that can be used including:

  • Feature toggling (http://en.wikipedia.org/wiki/Feature_toggle) essentially, a flag in the software, can be set to turn features (that may not be complete) on or off at will.
  • So called ‘dark releases’ – whereby features are released to production but are not advertised or accessible through the normal user interface, but could be accessed by testers using special urls and passwords, for example. Sometimes called ‘back doors’, these are useful for testers but are also of interest to hackers J
  • A ‘blue-green’ release implements two parallel environments in production. One is live and the other is for evaluation. When the evaluation version has been checked out, routers can be flipped to reroute traffic to the new version (and flipped back in case of problems).
  • Limited releases and Canary releases are where a software version is released to only a subset of users in a particular country, region or network or to a subset of production servers for evaluation. Users may or may not be aware of such trials. If a problem occurs, only a subset of your users are affected (and a rapid rollback can be effected).
In all cases, a reliable and rapid roll-back facility is required to avoid the wrath of users affected by a faulty release. These approaches are discussed in Jez Humble and David Farley’s excellent book, “Continuous Delivery”.

Q: So you suggest testers to be more like business analysts and to help product owners to refine requirements, right?

I’ve suggested that business analysts and testers should look to using a critical thinking discipline to prepare stories and scenarios to illustrate features, derived from requirements. Scenarios can be used to drive reviews of requirements by exampling them. The DeFOSPAM approach is a simple method of deriving stories and scenarios for this purpose.

Now, testers are not alone in having critical thinking skills or a touch of scepticism. It may be that business analysts perform the story-generation and requirements validation role. But the scenarios can also define a set of required acceptance tests for features. In this case, the testers might be better placed to create them.

Our recommendation is that stories and scenarios are created to achieve this dual goal. By so doing, requirements are improved, developers get concrete examples of features in use and a minimal set of test cases they can choose to automate through a BDD approach. In principle, all feature checks could be provided as scenarios for developers to automate so that later testers can be relieved of some or all of this error-prone chore.

There is an opportunity for testers to perform early story and scenario preparation to reduce the amount of later manual checking. The time saved may mean fewer testers are needed. What better incentive is there to get involved early?

Q: What if the requirements are potential needs that users might require? No one will know until it is out in the real world.

If a requirement describes a ‘nice to have’, sham, vanity or useless feature and it is not challenged at the requirements stage, then it is possible that it will be developed and delivered, tested and deployed – and never used. This is more likely in a structured or outsourced development. In an agile team, one would have thought this is much less likely.

Regardless of approach however, the task of creating a feature description and scenarios is like a paper prototype. The “as a.. I want … so that …” construct drives out an owner, a need and a purpose for the feature. It challenges the stakeholder motives: “who will use it? What does it do? And why?” The chances are this highlights a dud feature, or at least challenges its viability.

If a feature makes it through this stage, then the “given … when … then …” scenarios provide an opportunity challenge the feature using real-world concrete examples. The sceptical analyst, developer or tester can use the scenarios to ask, “what if…?” and suggest some good, bad, contradictory, anomalous or just plain meaningless consequences.

The act of story creation can be viewed as a ‘thought experiment’ to speculate on how the feature may stand up to real world operation. It is, in effect, a proxy or prototype, much cheaper to test than a delivered feature for acceptance.

Q: What if you have a vague requirement? What if requirements change over time?

In the case of a vague requirement and the developer has nothing better to work from, then the developer is likely to guess at the requirement, or make unsafe assumptions, or invent solutions that bear little relation to the real need. Perhaps they know the business domain and deliver something useful. But the risk of getting it completely wrong is probably too high to bear.

Creating stories to illustrate a feature specified in a requirement triggers some difficult questions for stakeholders. The DeFOSPAM mnemonic represents seven key questions:

  • What do the words of the requirement mean? (Definition)
  • What features are being specified? (Features)
  • What outcomes can be identified? (Outcomes)
  • What situations or scenarios must the feature deal with? (Scenarios)
  • Does the requirement predict sensible outcomes? (Prediction)
  • Is the text of the requirement ambiguous? (Ambiguity)
  • Has anything been left out of the requirement? (Missing)
The DeFOSPAM process forces the stakeholder to articulate a requirement more clearly.

To the question, “What if the requirement changes over time?” one has to ask in response, “Why does it change?”

In some cases, the business need changes. Well, there’s not much we can do about that one except negotiate the changes and cost of change with stakeholders. More often, requirements change because the perception of the need changes. One could look at a software project as a learning experience for stakeholders. They might propose some vague requirements initially, and wait for the developers to deliver some software for the stakeholders to evaluate. Having some experience of a solution in use, the stakeholders then say, “that’s great, but what I really want is…”

This process works, but my, it is frustrating for everyone on the team, especially the developers and testers whose time is wasted. How can we shortcut this process? By giving stakeholders examples of the proposed system in use through a prototype, wireframes and examples. Creating stories and scenarios coupled with steps in a workflow, with perhaps wireframes to give them a feel for what features might look like can trigger the same learning process, but at a much lower cost.

So, the answer is really to accelerate the learning process by providing rapid, meaningful feedback through example and improve the requirements and associated stories so they are trusted. Trusted does not mean perfect. In the Business Story Pocketbook (p 31), “A trusted requirement is one that, at this moment in time, is believed to accurately reflect the users’ need, and sufficiently detailed to be developed and tested”.

Q: What is the best tool for requirement management? What are the most important features a tool should have to be used in SDLC?

There are many, many RM tools out there, and it would be unreasonable to promote any one of them, and requirements can comprise many different models as well as the most common textual description. But from the ‘Live Specification’ point of view and covering functional requirements only (and excluding the obvious needs to be easy to use, flexible etc.) these features seem to be key:
  • The functional requirement encompasses a ‘statement of need or business rule’ (the traditional requirement) plus associated features, scenarios and examples. Think of this as ‘specification AND example’.
  • A dictionary of terminology, abbreviations, synonyms, antonyms, data names, business rules and an index of use throughout the requirements content.
  • Traceability from business goals through requirements, features scenarios and examples to allow business impact analysis. A change at any level can be traced up or down the hierarchy.
  • Reporting of requirements content in a format understandable to stakeholders, at any level of the hierarchy so that a review of goals versus requirements, requirements versus features/scenarios can be supported.
  • Integration of features and scenarios with a test execution management, test automation framework or BDD tool so that requirements content drives testing and development, and test status can be reflected up the hierarchy from scenarios through features, requirements and business goals.
  • Needless to say, accessibility to everyone in a business or project team, version and change history, access control.

Q: How will the business see “more testing” in the initial phase? How to convince the business that tester will now start “testing” requirements and less integration tests (after the development team delivers)?

I’ve tried to explain above how the exampling and validation of requirements using business stories has some significant benefits. The trade-off is that it requires a change of emphasis in the behaviours of analysts, developers and testers and collaboration between all three. But you know what? Productive Agile teams have reminded us that software development is most effective when it is treated as a collaborative process.

The change required is that Testers need to collaborate with both business analysts (to be involved earlier and contribute their critical skills to creating stories and scenarios) and with developers (to provide coherent scenarios for automation of feature checks).

The payoffs are significant:

  • Business stories provide early feedback so vague, ambiguous and incomplete requirements can be trusted to reflect the true need.
  • Business stories and scenarios provide clear ‘feature acceptance criteria’ but can also be a covering set of feature checks that can be automated by professional developers.
  • Automated feature checks support both the Behaviour- and Test-Driven Development approaches so development is less error-prone; they also provide candidate regression tests to be used for the lifetime of the feature.
  • Automated feature checking reduces the need for labour intensive and error-prone, expensive (and boring) manual checking so test teams can focus on the more subtle end to end and obscure tests.
  • Delivery timescales become more reliable and the quality of delivered software is higher.
  • Using tools that provide the traceability, better business impact analysis becomes possible – changes can be properly evaluated – at last.
  • New and meaningful test coverage measures based on the language and terminology used by stakeholders become viable.
There are an increasing number of companies moving towards continuous delivery, live specification, BDD and redistributed testing etc. To my knowledge, there are no objective, comparative studies or metrics demonstrating benefits and value for money of these approaches. I doubt there ever will be. But a growing number of practitioners are acquiring positive experiences of these approaches and environments. Well-known software gurus and fast-growing service companies are promoting them with vigour.

I have to say, with this momentum and backing, you should expect these methods to proliferate over the next few years.

 

Tags: #BDD #redistributedtesting #behaviour-drivendevelopment #continuousdelivery #continuousintegration #continuoustesting #redistributingtesting

Paul Gerrard Please connect and contact me using my linkedin profile. My Mastodon Account

First published 18/05/2012

In London, on 18 May I presented a keynote to the Testing and Finance conference. I've been asked for the slides of that talk, so I have uploaded them here. The talk was mostly based on two articles that I originally wrote for Atlassian, and you can find the text of those articles in the blog here: http://gerrardconsulting.com/index.php?q=node/602

Note that the presentation introduces some broader suggestions about influences on the future of testing and testers, including the increasing adoption of continuous delivery.



Tags: #redistributionoftesting #futureoftesting

Paul Gerrard Please connect and contact me using my linkedin profile. My Mastodon Account

First published 15/07/2013

See below the four presentations given by Paul at the World Conference on Next Generation Testing held in Bangalore, India between 8th and 12th July 2013.

Tags: #nextgentesting

Paul Gerrard Please connect and contact me using my linkedin profile. My Mastodon Account

First published 28/11/2012

Last Friday, I was happy to present to the Skillsmatter Agile Testing and BDD Exchange at 'The Crypt'. Thanks to Gojko Adzic for inviting me and chairing the day.

You can see the video of my talk here. Afraid Skillsmatter don't allow embedding the video.

The significance of the talk is that, although I've been writing about my frustration with testing (Testing is in a Mess) and the Redistribution of Testing for 18 months or so, last week's talk is the first that makes a coherent argument for redistribution of testing in non-Agile environments.

I positioned the talk as a sales pitch to corporates but being presented to Agile devotees, so please excuse the (I'm Agile, honestly guvnor) caveats at the beginning.

Tags: #agile #businessstorymethod #BusinessStoryManager #BDD #redistributionoftesting

Paul Gerrard Please connect and contact me using my linkedin profile. My Mastodon Account

First published 01/07/2015

At the end of May I spent a very pleasant few days in Minsk, Belarus at the SQA Days conference. Many thanks to Vladislav Orlikov for inviting me and giving me the opportunity to visit a new country and meet a lot of very nice and smart people.

Vlad sent me a link to the video of my Keynote and you can see it below. The background noise is mostly the sound of the simultaneous translation, which diminishes a few minutes into the video.

How to Test the Internet of Everything (in English) from Vlad Orlikov on Vimeo.

Vlad also used a PDF I sent him to print 500 copies of The Tester's Pocketbook to give to every attendee. Books are highly regarded in Belarus and for 24 hours I was extremely popular and had to sign (I estimate) 150-200 of them!

Tags: #IOE #IOT #InternetofEverything #InternetofThings

Paul Gerrard Please connect and contact me using my linkedin profile. My Mastodon Account

First published 22/05/2014

Some weeks back I presented a webinar about the Internet of Everything, with special focus on what the concept is and how it is going to affect us. 

This was the first of the webinars based on the article series that I am writing for Tea-time with Testers further articles and webinars will be appearing soon.



Tags: #IOE #IOT #InternetofEverything

Paul Gerrard Please connect and contact me using my linkedin profile. My Mastodon Account

First published 17/03/2016

The Software Tools Market is Changing

  • The Digital revolution means software must be aligned much more precisely with business
  • Customers get almost daily mobile app updates; they want the same for their business applications
  • Continuous delivery, DevOps, Shift-Left and pervasive automation are the means to succeed
  • New processes, disciplines and the tumbling walls between silos mean tools are essential
  • The automation challenge has moved from selection and implementation of 1-3 tools for each discipline to selection and implementation of 20-30 tools for a team in a DevOps regime
  • Tools need to be integrated technically, but the integration of team disciplines is just as important.

The Need for a Tools Directory

For as long as the web has existed, there have been websites that provide lists of references to tools that support, for example, test automation. These web pages and sites have been set up by individuals, wishing to share their knowledge of software tools for their own communities.

It's a burdensome task to create and maintain these lists. Vendors move webpages around, they rename tools, they merge and split tool functionality, they add new tools and new vendors and tools are popping up all the time. It's really hard to maintain the accuracy of lists like these. If you look around the various websites that provide such lists, this is what you tend to find:

  • Listings do not provide much detail beyond simple categorization, e.g. 'Web' or 'Mobile' test tools
  • Invariably, the lists are incomplete. Common tools are listed; less well-known tools are often missing
  • Most listings are dominated by proprietary tools. Open source tools are less well-represented, although some 'free tools' listings do exist, they are still incomplete
  • Many tools have functionality that spans multiple categories. Some are available in proprietary, some are open source and deployed on workstations, servers or SaaS platforms. Tools might be listed in multiple categories, but usually not
  • Tools listings often only provide a link to a vendor web page for the tool and little else. Forums, training, supporting service companies or contractors are not usually listed and cannot be searched
  • Tools cannot be compared with respect to functionality, licensing, platforms or integrations
  • There are no tools usage statistics available; we have to rely on vendor marketing to gauge their popularity
  • Not enough information, too much advertising.

The Tools Knowledge Base (tkbase.com)

The Tools Knowledge Base is a free-to-use service providing information on tools, vendors and the consultants and service companies that support them.

  • A searchable directory of tools: Our focus is (broadly) DevOps, SDET, Test and collaboration. Each tool record stores limited data but links to the vendor or developer web page. This basic information and the content of the tools web page are downloaded and indexed nightly by our search engine
  • We don't replicate tool web pages: We only collect the minimal amount of information that allows us to index the tools information for searching
  • A sophisticated search engine: The Whoosh! search facility can be used to find tools matching your search criteria. It's not Google but has most of the features that Google search provides
  • A hierarchical tool type/features list: Every tool can be properly profiled and compared (currently 313 features)
  • Resources: Content such as images, videos, scripts or training content or links to other web content can be uploaded and associated with every tool or company
  • Questions & Answers: Every tool and every resource can be discussed. Registered users can post questions and answers; the notification system will send messages to users/owners of that tool
  • 18,664 (as of 17 March 2016) searchable posts: We download the content of blogs from 302 bloggerseach night. These posts are indexed and searchable. We do not store the blog posts, we only index
  • Embeddable Content: We offer a range of APIs allowing conferences, service companies and consultants to access and share our data on their own websites
  • Partnerships: Conferences, trade magazines, websites and domain experts who support us.

What do I do Now?

If you are tools user: we'd like you to register, and identify the tools you use. your tools chain will appear on your profile. If a tool you use is not in TKB, then we invite you to create it. (If you want to embed the tools you use as a list in your website - we have an API for that).

If you are a tools expert or tools service provider: please see above, plus... We are looking for people who are knowledgeable enough to review or possibly edit the features listings for the tools you know well. The features hierarchy will grow and evolve over time - help us to perfect it. We will list you as a service provider on the tools you know best. It's the least we can do.

If you are a tool vendor: we ask you to search for the tools you offer and check they are in the system and properly described. If your tools exist in the system and you want to manage the information we hold, that's fine - let us know and we can make you the administrator (after a couple of quick checks). If you want, we can maintain the data on your behalf, for a small fee. Do get in touch. Alternatively, nominate a tools expert (see above) and we'll invite them to keep your details correct.

If You Own/Contribute to an Open Source Project: We make exactly the same offer as we make to the vendors. you are free to edit the information for your tools in the same way. you might already be represented on a site like GitHub - we're just offering an extra publicity channel - it might help you reach a broader audience. People looking for tools often start their search with proprietary products but rarely see free tools listed side by side. Now is your chance.

If you are a blogger: Search for one of your recent blog posts and if you find it - your blog is already indexed in the system. If not, you can suggest the blog and register it yourself. Please note we are looking for blogs that cover our scope (DevOps, Testing, Collaboration). Company blogs are acceptable if they focus on these topic areas. Some general technology blogs might be acceptable, at our discretion. Offensive or blatantly commercial posts are not acceptable.

If your blog is indexed, let us know, we will give you credit for it on your profile.

If you maintain your own online tools listing: please get in touch. We believe we already have a more comprehensive list (in our scope) than anyone else. We offer to provide you with ad free, embeddable tool type listings for your existing site. Join us as a partner and tools expert and help us to improve the data in our system to improve the listings on your site. We currently have 183 tool type listings. All are available for free. We'll give you your own lists and track the usage data and share that with you too. Drop me a line and I can explain what we can do for you.

If you want a tools listing on your own site: Get in touch. We make the same offer as above.

Can I advertise my tool or service on your site? Of course you can. We offer competitive CPM (cost per thousand impressions) rates. Our users are tools-focused so your ads will be seen by the right people. We will of course provide monthly statistics for your perusal.

Where is the Knowledge Base?

https://tkbase.com

Please take a look and let me know what you think.



Tags: #testing #collaboration #tkb #ToolsKnowledgeBase #DevOps #SDET

Paul Gerrard Please connect and contact me using my linkedin profile. My Mastodon Account

First published 22/06/2021

It's a common question. I need to lead, but do I have the ability to do that?

There's lots of talk about 'born leaders' but what if I'm not a born leader? Can I still succeed?

In this video, I suggest leadership can be learned and enhanced with practice and support.



Tags: #ALF

Paul Gerrard Please connect and contact me using my linkedin profile. My Mastodon Account

First published 23/05/2016

If you are looking to learn Python, the most amazing programming language ever created (IMHO)...

You could do a lot worse than buy a copy of my little Python Pocketbook, Lean Python.

Here's a review of the book:

If you want to buy from Amazon - that's fine, but it will be faster (and save me a few quid) to buy direct from me. Just use the contact form to place an order.

 



Tags: #Pocketbook #Python #LeanPython

Paul Gerrard Please connect and contact me using my linkedin profile. My Mastodon Account