Sunday, December 08, 2013

Refreshing Schools of testing - A flow chart

I picked up this from one of my old notes  on schools of testing where I made a sketch in the form of some flowchart. While I was cleaning my book rack, found the paper with the sketch, I thought why not make it a blog post.

Starting thought  was about fundamental ideas about software testing especially in terms of objectives, tactics, outcome etc.

If you agree that there are differing "opinions" about software testing amongst practitioners, stakeholders and other parties in software eco-system - follow through the flow chart and see where you end up. Let me know your views on this.


Sunday, December 01, 2013

Connection between Software Metrics and News

I discovered Maria Popova's brain pickings accidentally. I am happy that I did. Fully loaded with stuff that makes you think almost every time you read her blog - is something that stands out to be noticed.  If you have not already signed up for her newsletter and not aware of brain pickings - I strongly recommend you sign up.  If you are curious mind - you cannot afford miss this "interstingness hunter-gatherer and curious mind at large". Thanks Maria - for keeping us busy in reading and absorbing stuff that you keep serving to knowledge hungry, curious world.

In a recent post she explores (or re-explore)  a book "Does my gold fish know who Am I" and in the narration that follows the central theme of curious  and urgent questions by kids, I found a paragraph about news. I could immediately make a connection with how software metrics are produced and consumed.

Thanks to my confirmation bias towards anything that criticizes software metrics - I sat down, this sunday afternoon (while busy in finishing all piled up work) to write this post. If you feel strong about any idea to write about (for a blogger) - you would find time to write about it.

For a question "what news papers will do when there is no news" -

"Newspapers don’t really go out and find the news: they decide what gets to count as news. The same goes for television and radio ....The important thing to remember, whenever you’re reading or watching the news, is that someone decided to tell you those things, while leaving out other things. They’re presenting one particular view of the world — not the only one. There’s always another side to the story"


Wow , that seems to be absolutely right to me. Exactly same thing goes for software metrics. The producers of the metrics decide what they want the consumers (Managers, stakeholders) to see and absorb while leaving out some unpleasant things that probably matter. How often you have see testing producing results that confirms what stakeholders looking for.  Zero Sev 1 and Sev 2 bugs in open state and 2 Sev 3 bugs with clear work arounds. On release Go-No Go meetings - what else can be sweet news like this? If  as a stakeholder you wanted the release to happen - you would not question these numbers at all. Thanks to confirmation bias. 

Management's preference for numbers and summarized data - it is very easy to hide things that matter.  And there is always another side to the story - sorry the numbers (numbers themselves are astonishingly incapable of telling any story leave alone telling the right story). Why this works (or apparently works) - our brains are wired for optimism - we like to hear good stories (good numbers) and most importantly stories that confirm our existing world view.  Here is where critical thinking comes as savior. To me critical thinking is about questioning ones' own suppositions and line of thinking. "Am I missing anything here?" or "Is my understanding right, should I seek some contradictory information if exists" -  are examples of critical thinking.   For software testers - this is very CRITiCAL - we should last person to say "all right this is right".

Sadly as is the case with news, the metrics madness goes on - consultants year after year mint money in the name of software engineering, software process and metrics rule our life as software folks.

While I am writing all this - I need to be critically thinking as well - Am I being overly negative and dismissive about metrics and news?

Sunday, November 24, 2013

White's Illusion and Importance of Context in Testing and for Testers

I found one of the best examples or illustration of what is context and why it is important - in Keith Klain's Eurostar Webinar "The confidence Game: What is mission of Testing"

As Keith explains (slide #7) white's illusion- we can see how our brains and eyes perceive color in the context of surrounding's color and relative sharpness or dullness. To me, this is similar to the idea of "context" of say our projects, testing practices and probably everything that we believe as truth. To be context driven (in testing) is to be aware of "background" of statements, ideas presented in all aspects of testing. Conversely, context independent approach would be to "completely" ignore the background of the statements, views and ideas presented and treat them as absolute and universally applicable. Personally, when I was growing up as software testing professional - I did the mistake of taking everything I read or hear about software testing from books, blogs and conferences - as absolute knowledge about testing as they came from "experts", authors of books on testing, consultants and folks that have great reputation in the industry. After getting into Context driven world of testing and initial training  - I started understanding the importance of context. Then I figured about how background or context colors every information so differently and how not to be fooled by power of presentation of views/ideas that come in context independent way.

Another extension of white's illusion and importance of context is straight relates to enemy #1 of rational thinking - "confirmation bias". In simple words - its tendency towards supporting and endorsing something that you (already) believe it to be true while rejecting or ignoring any contrary evidence. Since our childhood - we keep accepting pieces of "information" as knowledge and store them in our brain (tabula rasa as John Locke suggested). We probably start of with an empty slate (not sure if brain of the fetus in mother's womb has something written on it) and go on accumulating so called knowledge through our senses/experience. Once the brain accumulates a "critical mass" (probably when kids start going to school where they are asked to simply follow the rules or memorize what teacher says) - confirmation bias starts kicking in. Brain starts filtering all information that does not confirm current (at any given point of time) information "saved" on the brain slate. 

Just as our eyes perceive color in the context of surrounding, our so-called knowledge is relative to stuff that we already reckon to be true. This illusion of absolute knowledge is similar to white's illusion. Fortunately, we know that something of this sort (filtration to confirm to known stuff) is going and we as testers as rational thinkers need to be vigilant about confidence of what we know to be true. One way that I have been practicing to beat confirmation bias is to hang around with people, read and listen to ideas that contradict my existing set of beliefs about say - testing, software, management, money matters and almost anything that impacts me. 

There is a huge knowledge base and psychological research on "confirmation" - My favorite one is from David McRaney the author of "You Are Not So Smart" - "People like to be told what they already know. Remember that. They get uncomfortable when you tell them new things."

Back to Keith - thanks for note on white's illusion and the rest of presentation about "mission of testing" - I really enjoyed listening to it. In my opinion - key message of Keith's talk about is "dangers" of seeking confidence. What danger - if you seek confidence - you will get it - an illusionary one though. There is an entire machinery and system called "Marketing" to serve you exactly the confidence you are seeking - which is "cooked" with recipe that swear by.

If you are a stakeholder  - be wary of any consultant or project manager or any one serving when they claim they can "generate" confidence by doing "xyz" (or whatever).

"We never are RIGHT we can only be sure we are WRONG" - Richard Feynman (quoted in Keith's presentation). I love to quote Feynman and tend to agree with him almost on all things that he said.
Need to check If I am falling into confirmations bias with respect to my fascination with Feynman and his approach of knowing.


Sunday, October 20, 2013

Questions about Gamification of Testing

I came across the phrase “gamification” and how in testing we can use this, in the writings of Jonathan Kohl. One day on twitter, jonathan and I had brief exchange and he encouraged to me explore the topic and write about it. Yesterday I read few articles about the topic and thought it is high time that I need jump and learn this stuff. Here is an initial and very crude attempt to understand the idea of gamification in general and how it is applied in testing.

When I think about the phrase gamify or gamification what comes my mind is - some sort of application or accommodation of elements of game into other systems and see what happens. That is probably what gamify means – take a thing or system that is game or related to a game and do stuff as though you’re playing a game.  To simply put it gamifying testing is running testing as though it’s a game.

What does it mean to run/conduct testing for a project as a game?

At broad level, game is a competition between players and game leading to a player or a team winning or losing against the game or with other player or the team.  This definition is provisional one – I might not be considering types of games that do not falling in this category. I wonder if there is any game where there is notion of victory or defeat.

Games can be single player multi player – individual or team, it seems to me that constants are there are rules of the game and there is definite outcome (mostly time bound). How do we apply these elements to testing as game?

In this initial exploration of gamification of testing – let me analyze elements of gams that I strongly feel about and how they apply to testing.

First of all – there are rules in a game. I cannot, at least this moment think of a game that does not have rules. What are the rules of testing – is the question that comes to my mind. Then I would ask who makes these rules? Is there one set of rules that apply to all kinds of testing that being done?  When we gamify testing – are we considering testing as one single type of game or collection of different games each having its own set of rules?

Secondly there are players or groups of players in the game that play the game. There are two player games such as chess, tennis (there doubles too), wrestling, boxing, badminton, carom board etc. There are multi player individual games – athletics, gymnastics, swimming, shooting, archery, racing cars etc. Finally there are team games – football, cricket, various forms of hockey, baseball etc.  Thus when players and teams play the game – they compete with one another.  When we model testing as a game who are players and who complete with each other?  I might be tempted to say testing is a game between dev team and testing team. With already so much animosity amongst two communities – this idea is no good to pursue.  Whatever model of testing we might use – putting dev and test against each other is not a good idea. So we have problem here in gamification of testing wherein we need to identify the players or teams that compete. Is testing a “friendly” or a “practice” game where ultimate goal for each team is not win – just a warm up or practice?

How about goals or objectives of a player or team playing games in the first place? Winning of course! There are prizes for the winners and in some cases even losers get some prize (say as runner-up). Winning brings happiness and satisfaction in the players that can be a motivation or objective of playing. In order to pep-up the losers – there is something called “sportsmen/women spirit”. How many times you heard the statement “it is not important to win or lose, participation and competing with ones best ability is important”. So if you lose do not feel bad – there is always another chance.  When we apply this to testing – how we might formulate the goals, objectives and motivations of playing the game of testing?

The rules of the game throw conflicts, contradictions and options for the players to play using skill and strategy.  In simple terms, a strategy deals with options and risks to take the player to winning. We can apply the metaphor of strategy of games to strategy in testing.  This is probably one matching element that I agree between games and testing. A good test strategy in testing is same as winning strategy in games. But then – what is the meaning of winning the game of testing? Against who?

Most characteristic aspect of playing or viewing a game is the climax and thrill of outcome. So when any game ends we have winners and losers.  Winners take trophy, prize, applause, glory and loser some lessons on how to win the next game. How do we transport this idea of games to our world of testing? When testing ends (as a game) who is the winner? and who is the loser?  You might say “customer” or “business” is the winner – then who is the loser?  Are there any games where game ends with only winners or losers or no winner or loser? An interesting example comes to my mind is casino games. It is being said – at the end casino wins, even though each player in casino might win here and there – net casino is a winner always. What does this tell about testing gamification?

Having said all of above and asking these questions – I do agree with some aspects of games and gamification as apply to testing.

As Jonathan says games tickle our emotions, they captivate us, and they encourage us to work hard at solving problems and reaching goals – True. Thus running testing as game will lead to greater engagement of testers into work.

Why games work?  Success and praise for success generates pleasure in brain releasing chemical messengers like dopamine, serotonin etc. In corporate settings gamification sets up employees in competition among peers with rewards/batches etc. I agree with this as well.

So, with this post I have attempted to come up with few questions about gamification of testing.  In next few posts, I would explore the idea of gamification in general and testing as game in particular.


Shrini

Sunday, August 04, 2013

James Bach's Advise on Tool supported Testing (aka Test Automation)

James Bach, in response a question on articulating "test automation and frameworks" to non technical people - gives these pretty useful pieces of advise.

I thought of sharing them to my readers.

-- Tools don't test. Only people test. Tools perform actions that help people test.
-- You must understand, design, monitor, and fulfill your test strategy. Only people can do that.
-- All testing is manual testing, in that regard. But in another sense most testing is tool-supported, since we use tools to help us in many ways.
-- Tools are capable of directly detecting only very specific bugs. Humans can, in principle, detect any kind of bug (especially when helped by tools).
-- Tools left alone will "detect" lots of things that are not bugs, while missing various huge bugs.
-- Think of tool-supported testing like cruise control-- it helps but the human is still driving the car.
-- Think of tool-supported testing as "tool-mediated" as opposed to naturally mediated. If you test through a tool then it filters out lots of the experience that may otherwise alert you to problems. This is not a bad thing (think of an infrared camera, which is exactly the same tool-mediated concept applied to vision) unless you test through your tool too much (imagine going through your life with infrared goggles on all the time).

Read these along with following post

http://www.satisfice.com/blog/archives/58


I wish that when people see automation as some sort of tool assisted testing - sense will prevail.

Shrini

Sunday, June 09, 2013

10 Random ideas about Test Automation Estimation

I received a mail from a friend who asked about estimation approach for test automation. Wow - what a topic to mess up your head on a sunday night. Instead of responding to him in a mail - I thought of writing a post on this so that other can engage some conversation with me on this topic.

Here you do - 10 random thoughts on the topic. Well - I can extend this list to more than 10 items. For now there are 10 items.

6. Test automation is writing code - that involves all that writing code needs. Ask developers what they need. If development world claims that they cracked this problem. Automation folks can simply lift and use that solution.

2. Regardless of what commercial tools claim about "generating code" or similar non-sense around "scriptless" solution - fact remains that any sustainable automation code is similar to software product that automation aims to validate - so do not fall prey to false propaganda around tools that claim easy automation.

4. Ideas/Frameworks like data -driven, keyword, hybrid are simple ideas for automation design. You need to go deeper as ask if I need to write a method/function or a class in automation code - how much time will I need? Do get an answer from say a developer? You might be aware of some crazy metrics around number of lines of code written per day or number of functions/methods/classes written per day.  As you can - it only gets murkier if start insisting on measuring productivity of automation guy in terms of these meaningless metrics.

9. Important thing to note is we (folks in software world) are knowledge workers - meaning we do not work in manufacturing assembly line of factory. We deal with abstract things, software that can not be worked in the same way as say "Cars". So how does that change the way we should be viewing estimation of developing automation code - think about it.

5. Depending upon nature of piece of automation work that you would be developing - you would not know in the beginning how much time you spend in thinking and how much you spend putting your thoughts into compilable code. That is biggest challenge developers have. So are we - automation developers.

7. First question you should ask when you are working developing an estimation model for automation - what is my smallest unit of work - that unit which is building block of my whole solution. What answer would you get?  Function? class? Next question would be - are all building blocks are similar? How many different types of building blocks do i have?

Compare it say atoms - ask how can I characterize atoms or molecules of automation solution.

2. Once you get clear answer on above question - next you need break down your automation solution into building blocks and size them. Then ask - given a competent developer of automation - how much each unit would take to build - hours, days etc. Then add up time setup, testing, integrating etc. You will get some ball park number of estimate that you need go with as first estimate.

1. What reference should you use for creating your automation solution (or design?) - anything that describes what you want exercise on the application under test. One approach I found useful is create a mind map of application features and attach to each feature what application can do, what data it processes and what checks (note the word check) needs to be done. This is your skeleton reference. Build this first by collating data/information from various references - then make sure all information from each sources is accounted. This is your master reference. Work with multiple sources of reference (Requirements, test cases, use cases or simply walkthrough of application manually to build map of features).

10. Should you use test cases or test scenarios or test steps as basis for automation estimation? As  James Bach prefers to call - test cases are like unicorns - how many of them you can fit in a suitcase or fridge? Without knowing what is inside - counting test steps or test cases and using that number as basis for anything (leave alone automation) useful is utterly stupid idea. Never do it - unless you want to mislead someone.

3.  Few words about keyword driven framework. Personally I think, there is lots of hype around this simple idea. Keyword could be a verb (also called as action) that describes some feature of application under test. In developers language it is some basic unit of code - typically a method or function. What is a big deal here when you say "let us use keyword driven framework"? It's all hype - no real stuff there. There even more irritating words like "keyword driven or based testing" - so far I have not figured out how to do testing (not automation) using keywords. Same goes for other related buzz words like data driven automation (a marketing term for saying let us use variables instead of hardcoded values) or hybrid framework. Note all these simple ideas had some place 10-20 years back but not anymore. I personally prefer to develop automation pretty much like a developer goes about doing product code - no difference. I hate over simplification by tool vendors and consultants on so called "excel based automation" or script-less automation, automation for your granny - they are simply empty ideas to bully unsuspecting boardroom folks that sign contracts.

How will I summarize - There is no simple solution for estimating automation effort.  Keep a watch on how development (programming) community deals with this conundrum and let us use that to build our own model. At present, when developers are working on small units work like use stories and in an iterative model of churning working code (theoretically) in say weekly or fortnightly or monthly basis -
I think the whole problem of "tell me how much time (and resources) you need to develop this solution" - will vanish. You would probably say "let me start with 3 people, I will publish a 1-2 week plan of what I deliver for people to use - let us take it from there".

I think gone are the days where you had 3-6 (or even more) months of lead time for something software to be deployed for use. In the mobile apps world - development times are even shorter.  I doubt if anyone would ask you - give me an estimate for automation of this app.  It seems that we have solved the problem of estimation by going small and going fast.

I am happy to be corrected on any of views expressed here. Let me not forget to add - when I say automation - my experience has been in IT/IT services world mainly working with commercial off the shelf automation tools. If it were likes of Google or Microsoft - it would be totally a different ball game all together.

Shrini


Friday, June 07, 2013

Are you measuring something that easy to measure or something that is important ?

Measurement is fabulous – Unless you are busy in measuring what is easy to measure as opposed what is important. – Seth Godin


... And what is important (and to whom and when) is often subjective and context based.

Thank you Mr. Godin for your sound advice that is useful for software folks
I have confirmation bias for bad metrics and measurements. We have obsession for measuring things to demonstrate that we are rational and objective humans (which we are not). It's amazing to see how Seth Godin in above post demonstrates "measuring sometihng that is easy to measure is waste".

"As an organization grows and industrializes, it's tempting to simplify things for the troops. Find a goal, make it a number and measure it until it gets better. In most organizations, the thing you measure is the thing that will improve"


Many people blame growth, size to "metrics menace" and say "how can we manage such volume of work if we do not have right metrics". Remember the thing that you measure will be victim of gaming and match fixing - people will change the behaviour to look good in terms of what is being measured. Look at our testing metrics - all easy to stuff to measure (sorry - simply count) - number of test cases, defects (and all dimentions of it), number of requirements (this is really bizzare), defect detection percentage, defect leakage rate, cyclomatic complexity and list is long - mostly all easy stuff to measure (in fact - simply count).

While what our users care is how software works (or does not work) - it is about those emotions (frustration, anger, happyness etc). Since these are important but difficult to measure (in some easily understandable numbers of percentages etc) - we take easy route. Pretend as though these do not matter at all or when confronted, wear "rational" hat and issue "scientific/engineering" statement "anything that cannot be measured - cannot be improved".

"And this department has no incentive to fix this interaction, because 'annoying' is not a metric that the bosses have decided to measure. Someone is busy watching one number, but it's the wrong one."

-- So true for software - our bosses (influenced by high flying software engineering/process consultants) have choosen to turn deaf ear to real "metrics" (that are tough to measure). Thus software developers or testers appear to have no incentive to "listen" and "fix" important issues that matters to users.


Software is developed, tested, used and maintained - in, for and by social enterprise and people are irrational, implusive, greedy and look for instant gratificatoin. Society (a name given to large number people living together) amplifies such indivitual traits.

We, software testers - need to adopt social sciences approach and stop aping practices of "enngineering processes" of a factory assembly line.


- Shrini