Thursday, December 5, 2013

Acceptance Test Driven Development (ATDD)


ATDD (Acceptance Test Driven Development) is an interesting topic and has been around for some time, however, initially I had failed to understand it in totality. After some reading and some on the job experience, I am presenting my understanding on ATDD (Acceptance Test Driven Development) through this blog post. At the end of this seemingly technical text, if you exclaim that this is just some common sense that could be potentially useful in your agile project; I would consider my writing has made a reach!


Formally,
“Acceptance Test Driven Development (ATDD) is a practice in which the whole team collaboratively discusses acceptance criteria, with examples, and then distills them into a set of concrete acceptance tests before development begins. It’s the best way to ensure that we all have the same shared understanding of what it is we’re actually building. It’s also the best way to ensure we have a shared definition of done.”

(Source for definition: 



You should try ATDD if:

  • You keep getting different viewpoints and concerns from stakeholders, product owners, developers and tester on the same story.
  • You have a large agile team spread across various work locations.
  • You have encountered situations wherein misunderstandings occur often because no one knows the misunderstandings exist and no one asks about them right up.
  • Discussions on requirements often happen after defects are found-whether or not a defect is a defect or a future story!
  • Developers and testers often get a different understanding of the same story.
  • You want the testers to contribute through quality assurance, quality control, revealing holes in stories, other misalignment and eventually reducing risk.



ATDD process:

  • Discussions take place over confirmation criteria of the story by the whole team. Inputs for test scenarios are obtained from all team members including stakeholders, product owners, developers and testers. All requirements clarification happen upfront. This happens just before, on or just after the day of planning for the iteration.
  • Consensus obtained from all regarding the acceptance tests at the earliest.
  • Testers begin to drill down the acceptance tests into test cases. Developers begin coding with the acceptance tests in hand.
  • Coding is done. Testers test using their test cases to see whether acceptance criteria has been met or not. If a defect is found that hinders meeting of the acceptance criteria, the developer fixes the defect and retesting is done.
  • Testers also perform exploratory testing ( by using domain knowledge, creativity and minimal planning)
  • The team demos the working software for the story to the Product Owner for acceptance. Also, results of the exploratory tests, other potential risks, misalignment are highlighted. This often feeds as the input for future stories.



Some of these points might clarify your doubts at this stage:

  • The questions that are asked to derive the acceptance tests from the confirmation criteria probably are as- How will we know we have done that? What about these? Does this also mean this? What would happen if otherwise?
  • Acceptance Test Driven Development (ATDD) is NOT a testing technique. It is a development process wherein acceptance tests are specified upfront before any coding takes place.
  • Acceptance Test Driven Development is actually NOT about testing. It is about communication, collaboration and clarity to counter notorious requirements that could be misunderstood and the unknown unknowns.
  • Breaking down acceptance tests into test cases ( top-down approach) ensures completeness and alignment to what the customer expects.


Benefits of Acceptance Test Driven Development:

  • Requirements clarification is done upfront. Whole team is on the same page.
  • Inputs from all. Consensus from all. Works good for non-collocated teams.
  • Developers code to meet acceptance criteria.
  • Less chance of getting a defect that prevents acceptance of story.
  • Testers' work gets cross-checked.
  • Prevents unnecessary code changes/discussions towards iteration end.
  • Smooth acceptance. Gives testers enough time for regression, highlighting risks and mis-alignments.
  • More avenues for defect prevention

ATDD Vs TDD, BDD and Industry Trends:


  • If you are browsing through this topic, you should also browse about BDD (Behavior Driven Development ) , TDD (Test Driven Development) and Specification By Example
  • If you are interested in knowing about related tools and frameworks, do have a look at Fitnesse, Cucumber, Spectacular, Concordion, Thucydides etc.
     


Friday, February 8, 2013

The Ecstasy and Enigma of BEING 20 something!


It’s a phase, they say, when you feel like singing the popular “Mein Pareshaan” all the time. A phase where you experience all emotions together, jumbled up, back to back – weird to that extent that your thoughts play around perpetually in the labyrinth of your mind! So for the first time, your “Di” is writing a blog that doesn't offer clear solutions but just exposes the “mental state” that we – the 20 somethings share in common. Hope you enjoy it! 

It wouldn't be wrong to say that until recently you looked forward to your birthdays and now you no longer because you turn a year “older” with every year. Whether studying or working or waiting for something to happen to you, the million-dollar question remains – Ok. What Next? Most of the yes/no questions asked to us require 2 bit of memory storage these days – Yes, No, Do not know, Maybe and the traffic is more towards the latter two. For example - A volcanic eruption of brooding occurs when that very inquisitive relative of ours asks- yeppo namba veetula aduthudhu kalyanam?(When is the next marriage in the house?). You would feel like telling him/her when it happens you will surely send him/her an invitation with the date on it, but then actually it seldom is as simple as that. And then –We, the Devdases and the Meeras immerse ourselves into another set of infinite anxiety and confusion depending on the “status”. Singles desperately want someone, people having “someone” want it to work it out at home, and people who took no initiative and paid no thought over this sector of life begin to think how long they can remain in this “I really am perfectly happy without bothering about this” state, the others pray hard their parents get someone nice for them and a very few privileged ones have to choose between multiple options that lie in front of them. It wouldn’t be unfair to say that the“status” determines the “state of mind” and the “state of mind” determines the “status”. So there goes the music of our boggling lives in a loop yet again. How to approach? Whom to ask? What is the next best step? When is the right time? What will others think? Is this what I want? If these questions run in your mind, welcome to the “Being a Normal 20 something” gang. How we wish there was a 100% accurate Help Desk or Software that we could put our questions and get the answers! But the fun part is we have to play this game called “LIFE” – and I am afraid none of us is given any cheat code or power booster.

20 something is a powerful period of time wherein you start understanding the various circles of life and the best part is that it is this phase that we begin to set “desired states” propelled by the infinite supply of energy in us. However, academics, job, hobbies, family, friends and society all remain as disjoint sets with separate lines of focus. We begin to understand that education just teaches us “how to learn to learn” and that’s it. At work place it’s more of mind games and people games and money games and we still learn to make our way through.  How many of us get that one day attack of thought that we can and should do something for the affairs of the country or some kind of social work? How many of us convert them into actions? Or that thought in which you suddenly decide-“Yes! This is going to be my life!!”. Yesterday you measured everything in terms of status and money, today you begin thinking about the very controversial “happiness”. So what is that you want? ( Oh! Do not bother to answer!).Youth instills the bravado of exploring these various circles without any rules or regulations. Settling down, they say, is the act of finding/deciding an intersection point or balance between these various circles of life. Nevertheless that’s a distant “state of mind”.

Has this muddle suddenly appeared in our lives? No. The muddle has evolved. It has evolved as a result of our observations of the world and its complex dynamics. We begin to understand its various components, their interaction and the resulting effect created. Without doubt, the muddle keeps evolving as the years go by. By the time we gain clarity and we think it is wise to enlighten the NextGen with it we realize that during the course of our journey, the NextGen has evolved its own muddle! You see, there is no “Moksha” in this “Samsara” (Reference to Bhagwad Gita). Enjoy this muddle, play around for now, we shall settle down in sometime-don’t worry!