Showing posts with label qa. Show all posts
Showing posts with label qa. Show all posts

Sunday, 30 August 2020

QA Research and Tackling The Causes of Defects - A CEO's Perspective

I often find it difficult to articulate what testing, bug detection and quality assurance means at the C-suite level. I know for a fact that I am not the only one and the inability to articulate our benefits to the bottom line is a big problem among testers. We know that it reduces cost of rework and increases customer satisfaction (if done properly), however how do you quantify or articulate that to the people at the top? Also, would the CEO of a large company, say a multinational, really understand what tackling bugs and why they happen does not just to the health of products and services but also to the overall health and strategy of the business? Would the CEO understand why it is a priority deserving of major R&D, and be proud to discuss it with investors?

Then I found an example of a CEO who, for want of a better word, "gets it". I watched a recent interview with Richard White, the CEO and founder of the Australian logistics software company WiseTech Global. The part where he talked about quality enhancements (12:00 onwards) as their major R&D factor is impressive.



What made this stand out to me was that when asked about R&D and having the edge on competitors, he spent time talking about the continual work done with his CTO to find out why defects occur and waste occurs in software development. He was proud of their continual work in "squeezing out" the failure points and cleaning up technical debt (something that I have never heard a CEO even mention in an investor interview, and something that is de-prioritized often in favour of working on new features).

To me, the most powerful thing he said was that he saw their investment on the above and the plummeting defect rates as providing a higher "yield" on each dollar spent, using the example of a 32% yearly increase in product updates done with just a marginal increase in staff.

This is a tech company thus software development is the core of their work, however there have been more than a few tech companies that have neglected quality assurance. What this shows is a CEO and technology team who see QA as a major priority to the bottom line and have taken steps to quantify it, allocate R&D resources to drive defect rates down and then be able to present and proudly talk about it on a show aimed at investors.

If a CEO can articulate the value that working on QA and defect resolution and prevention can talk about it so proudly, precisely and articulately, we testers should too.

Tuesday, 5 December 2017

Some Trust in Models! On Simulations, HyperNormalisation and Distorted Reality in Software Teams (Part 1)


Still from Adam Curtis' 2016 documentary Hypernormalisation


Software is all about abstraction. We take an existing or desired process, model it and codify that model into a set of instructions and data that computers can read and follow.

We come up with different processes, methodologies, notional lifecycles, workflows, test strategies, measurements and quality controls to steer our immensely difficult projects to a satisfactory conclusion. For that we get teams of people with different roles and skills to work together, manage the creation and deployment of code with its own complexities and dependencies and implement what (we believe) users want is incredibly hard.

The processes we use to create software are also abstractions. The problems we face are, how much do the abstract requirements, process and methodologies we implement really reflect a desired real world outcome? In the midst of a software project, how do we maintain the link between abstraction and reality? What happens when a software team loses the ability to know about the difference between simply fulfilling the process and getting to a real world product people actually want? More dauntingly, at what point will the team stop caring?


Everything Was Forever Until It Was No More


A stamp featuring Pimenov's "Wedding on a Tomorrow Street", 1973

Anthropology and Sociology provide some interesting allegories that within limits help us to look at the questions above. The Russian academic Alexei Yurchak in his 2006 book "Everything Was Forever Until It Was No More: The Last Soviet Generation" discussed the paradoxical nature of life in the 70s and 80s Soviet Union. People were realising the disconnect between the ideological and propagandistic announcements of a Soviet state that saw itself as successful and immutable ("the end of history" as Marx envisaged) and the increasingly obvious fact that its economy was stagnant, its institutions were failing, events such as the War in Afghanistan were hurting its collective psyche and their quality of life was getting worse by the day. However in the absence of an alternative, whilst they understood something wasn't quite right they remained dissonant and carried on with the pretense that nothing was wrong, deluding themselves into a self-fulfilling prophecy. All the while the national discourse was piling more upon itself and becoming even more repetitive, in unwavering copying and reinforcement of earlier dogma. When the Soviet Union did collapse so quickly and dramatically, its disintegration was shocking to most Soviet citizens who had seen it as eternal. Yurchak coined this condition "Hypernormalisation".

The disconnect between the official narrative and the reality of life in the final decades of the Soviet Union gave rise to artistic protests of a satirical nature, with films such as Andrei Tarkovsky's "Stalker" describing a world that was outwardly similar to ours and could fulfill all our dreams but at a deeper level profoundly different and nightmarish.

Yurchak's book had a profound influence on the English BBC journalist and filmmaker Adam Curtis. His impressive 2016 documentary "HyperNormalisation" expressed the belief that this had been extended to the whole world. In his view, from the 1970s onwards our leaders and media figures had grown tired of struggling to articulate and tackle the complex problems of the real world, resigned themselves to managing the current order and predicting risks and created a "fake world" which trivialised long-existent complex social, economic and political issues into half-baked narratives of "Good vs Evil" with misplaced or contrived enemies. Instead of challenging themselves and the narratives told to them, people turned to virtual worlds in cyberspace that were designed to be free but had powerful hierarchies of their own - harvesting the information and activities of billions of people and and filtering the media people saw to reinforce instead of challenging their opinions.

Consequently people either grew to be dissonant of the "fake" perception-managed world and the real world, accepted the narrative as fact and opted into solipsism and self-focused activities or used the internet to create huge protests and revolutions. Those who retreated became susceptible to agents who were skilled in maintaining confusion and instability - the film uses the examples of then-candidate Donald Trump and Vladimir Putin's strategist Vladislav Surkov - turned politics and news into bewildering theatre such that facts and truth no longer became politically relevant and rumours and chaos reigned. This left them much more open towards the status quo (as in Putin's Russia) or demagoguery (as in the 2016 US Elections).

For those who revolted, in the absence of a compelling alternative direction of society these revolutions failed tragically and spectacularly, such as the protests in Egypt that were hijacked by the Muslim Brotherhood, eventually to be deposed by the military, or the Syrian Civil War that led to the rise of ISIS.


The Road to Disneyland. Simulation and Simulacra.


Pluto, Dale and Daffy Duck on a firetruck, Disneyland Anaheim, 2010

Both of the narratives above borrow from postmodernism, particularly semiotics (the study of communication with and assigning meanings to symbols and signs). The French sociologist Jean Baudrillard in his controversial 1981 treatise "Simulacra and Simulation" described the process where human culture progressively replaces our direct experience of reality with a series of signs and symbols (which he refers to as "simulations") - copies and representations of the real world with a seductive quality.

Over time the simulation is tweaked and copied to the point where it deviates from the original to the point where it is a (in his words) an "evil appearance—it is of the order of maleficence". This continues to the point where any relationship with the original reality is semantic and arbitrary at best.

The end point of this, which he calls a "simulacrum", is a simulation or copy that has been abstracted to the point where it has no relationship to an original at all - only to other signs that may themselves be simulacra. Our life experience of the simulacrum, not being based on any grounded physical object, is not even acknowledged or cared to be based on reality - yet it becomes a “truth" in its own right. This artificial existence is known as "Hyperreality".

The most common example stated, referred to by Baudrillard and Italian philosopher Umberto Eco, is Disneyland. The facades of Main Street with its allusion to an idealised past create a facade that appeals to our imaginations and desires. The Big Thunder Mountain ride is an exciting allusion to old mining rail tracks in a cowboy setting. Nevertheless, Main Street as a real street never existed and mining rail tracks of bygone times were not anything remotely like Big Thunder Mountain. Of course, Disneyland is so seductive that none of this matters. We engage with the fantasy world as if it were real. This is the definition of the Hyperreal.

Other stated examples of simulacra include historical fallacies that have been promoted widespread as facts, artificial substitutes for human interaction such as sex dolls and AI chatbots, films with digitally created CGI characters and backgrounds and "structured" reality TV shows.

A Postmodern Perspective on Software Delivery


I came across the work of Baudrillard along with Adam Curtis' "HyperNormalisation" at about the same time in 2016, after about nine years of working as a tester. Whilst drawing conclusions from ideas from sociology and anthropology applied to software teams without thought is a flawed and dangerous activity, I believe that they provide a lens through which our inability to deal with the inherent contradictions behind key concepts in software engineering can result in software teams falling into flawed and misused practices - and why even if they are suspected to be flawed and misused, teams fall into dissonance and fail to act right up to product catastrophe.

For this I offer perspectives on four concepts critical to software engineering and testing - quality, measurement, requirements and methodology/process.


Quality - Relative at Best, Simulacrum at Worst


The usual aim of a software team is to deliver a "quality product", however Quality is a vague and shifting target. Gerald Weinberg, seen as the "Godfather of Agile", wrote in his 2012 blog article "Agile and the Definition of Quality" on the "Relativity of Quality' - "what is adequate quality to one person may be inadequate quality to another." He states the following -

"If you examine various definitions of quality, you will always find this relativity. You may have to examine with care, though, for the relativity is often hidden, or at best, implicit.

Take for example Crosby's definition:

"Quality is meeting requirements."

Unless your requirements come directly from heaven (as some developers seem to think), a more precise statement would be:

"Quality is meeting some person's requirements."

For each different person, the same product will generally have different "quality," "

He list various statements defining quality from the point of view of specific project stakeholders.


"

a. "Zero defects is high quality."

1. to a user such as a surgeon whose work would be disturbed by those defects

2. to a manager who would be criticized for those defects


b. "Lots of features is high quality."

1. to users whose work can use those features–if they know about them

2. to marketers who believe that features sell products


c. "Elegant coding is high quality."

1. to developers who place a high value on the opinions of their peers

2. to professors of computer science who enjoy elegance

"

etc...


His ultimate definition of Quality - that it is "Value to Some Person" - has consequences to agile teams. He states that the definition of quality is "political and emotional" and thus leads to decisions on whose opinions count most. Also these decisions can be less than rational and are hidden from public view.

It is my assertion that in cases where not enough thought has been given to grappling with the contradictions above, a team’s conception of “Quality” has little in relation on the reality of the product (to the extent that the reality can be defined or measured) or the aims of the project. Quality as a symbol or concept becomes nothing more than the biased opinion or dogma of some powerful manager or stakeholder or a vague guess of the desires of some abstract “target market”. However in the perceived absence of anything better, the team acts as if it were the truth. It becomes a simulacrum.

The effect of this is we have started to give up the belief that we can make a “quality" product. James Bach, in his 2009 blog article “Quality is Dead #1", paints a despairing picture -

“A pleasing level of quality for end users has become too hard to achieve while demand for it has simultaneously evaporated and penalties for not achieving are weak…. When I say quality is dead, I don't mean that it’s dying, or that it’s under threat. What I mean is that we have collectively - and rationally - ceased to expect that software normally works well, even under normal conditions. Furthermore there is little any one user can do about it.”

Bach asserts that the result of this disillusion with the possibility of quality is that management have given up and moved towards the lowest common denominator approach - dispensing of good test teams and moving to cheaper and less capable offshoring teams.

“Top management can’t know what they are giving up or what they are getting. They simply want to spend less on testing. When testing becomes just a symbolic ritual, any method of testing will work, as long as it looks impressive to ignorant people and doesn’t cost too much.”

This “going through the motions” while publicly acting as if quality is being improved, as I see it, is a type of mini-hypernormalisation.

The Question of Measurement


Measuring an attribute that does not lend itself to precise and agreed definition and arises from human feelings and politics is evidently problematic and will lead to inconsistent and tenuous results. Rich Rogers, in his 2017 book "Changing Times: Quality for Humans in a Digital Age" writes -

"If stories and feelings tell us more about human responses than cold facts, dates and numbers, this might provide a clue as to why software development teams, and the organisations they work with, sometimes struggle with the question of quality."

"In this field, refuge is often sought in numbers.... By setting numeric quality targets - sometimes called exit criteria - a desired state can be agreed upon: a point at which the product is deemed good enough for whatever follows, including whether it is ready to be released to customers. The numbers act as a comforting security blanket, creating a sense of control. Even if the picture they paint is troubling, at least the provide a means of seeing that picture."

However as Rich Rogers continues to explain, this is an abstraction that while comforting, is limited and prone to mislead. Crude metrics such as counting of passed test cases and defects assume an equivalence between test cases that isn't likely to exist. They also hide the types of investigation and testing outside of these test cases along with defects that were resolved without the need to record.

"Quality is not measurable in the way cost or time might be measured... There is no such unit of measurement for quality."

He makes the case that metrics still have a role to play in discussions about patterns and potential issues. Reports are only useful in triggering those discussions - about what the metrics tell and do not tell.


The Illusion of Requirements


What about requirements? If one takes a list of use cases, desired functionalities and acceptance criteria - and the product contains all of these working to some agreed order - does that mean we have a quality product?

I believe that this is also tenuous at best and a comforting fantasy at worst. Requirements follow the same rules as "quality" defined by Weinberg. They depend on the judgement, political power and knowledge of the person who defined them - as filtered through project stakeholders, business analysts and the printed page.

The person who conceived the requirements, we have to assume, has a correct knowledge of the problem to be solved. Anyone with experience of software development will know of circumstances where that is a bad assumption. They may arise from a high level abstraction of an existing business process, ignorant of the day to day challenges and tacit knowledge of those implementing the process. The person who stated the requirements may be a high level manager without any experience of ever implementing the process, a slave to the reports of subordinates.

The illusion doesn't end there. Various test case management tools allow use cases and acceptance criteria to be linked to one or more test cases, generating requirements traceability. This is also flawed for the same reason that test case metrics are flawed. They make presumptions that quality in a requirement can be neatly expressed by X test cases passed in an associated matrix, or an hour's session based exploratory testing revealing no defects. This is very wrong as any tester with experience will tell you.

Methodologies and Primacy of the Process


In response to the above, there have been created many different approaches to a software development project along with practices within them. Even within Agile we have XP, Kanban, TDD, BDD, Continuous Integration, Scrum, SAFe, DevOps… Even within testing we have competing schools and methodologies. These are all simulations of how teams work in practice - very rarely do teams follow a prescribed methodology to the letter. How one team defines “agile” can have only a tenuous relationship to another even within the same company.

The danger is that the process is deemed to matter at the expense of the outcome, or implemented to provide benefits to the adherents without respect to the project. For new adherents, as Rich Rogers points out -

"The techniques and tools used in carrying out the work can seem exciting, and there is no shortage of new ideas and skills to learn. The desire to be at the forefront of change, or at the very least to demonstrate awareness and familiarity with current methods, can be a powerful motivator in this field. Adoption of new techniques, training in how to use new tools and acquisition of knowledge and skills related to new ideas, or possibly a desire to enhance a resume."

One area where the hype and impetus to learn is already causing an effect is in test automation. The drive to automate more (if not all) tests, and its effects on tester recruitment, causes testers to devote project and personal time to learning automation tools and programming - and to implement them without experience or real forethought. I know from my own experience the waste and effects of poorly implementing an automation strategy based surreptitiously on a desire to learn a new skill in a commercial context.

Another danger is that processes are defined at the company level and not the team level. Because they were believed to work before, we enforce processes and methodologies on other projects in an effort to "standardise". This may make sense at a management, resource allocation and control level, however projects with ill-considered, enforced processes risk great failure.


Leaky Abstractions in a Complex World


If we understand the flaws in defining quality, measurement and requirements, and our methodologies are idealisations, why do so many teams still persist in making critical project decisions based on their flawed understanding of them? Is it purely ignorance or something else?

Rich Rogers makes the point that metrics, however flawed, act as a comforting security blanket, providing some basis for decision making. We may not be measuring the right thing but we are measuring SOMETHING that may or may not be close to quality.

In the same way, requirements may be incomplete, flawed or at the extreme end utterly irrelevant to the problem we wish to solve, however they do exist. One can use them for contracts, resourcing, planning, development, testing and delivery. In agile methodologies we can continually add changes until (we hope) the end product approaches something the user or stakeholders might want.

In any case these, along with working definitions of quality, are all models of the "real" state of a project or product. For better or for worse they are vital in reducing a development project from something almost ineffable to something that can be planned or achieved. I treat them as "simulations" as defined by Baudrillard. Because of this, they are greatly seductive.

What matters is their relationship to the real state of the product and the development process.


Hyperreality and the Failing Team


My conjecture is that in projects that are dysfunctional or fail to provide what we call a quality outcome, these simulations are so far removed as to be devoid of reality. In the same way that Disneyland is a simulacrum, so are these.

However, simulacra are greatly seductive simply because they are easier than embracing the difficult to manage real world they pretend to describe. Hyperreality is not real but its sway on team certainly is. Also, changing approaches and mindsets within teams and at the company level, especially without either the privilege of management support or a clear narrative of a better solution and how to get there, rates from difficult to impossible. The closer to the project deadline, after so much has been invested and with the probably painful consequences of a late or failed delivery, the less the team will be willing to experiment and the more the team is likely to act is if nothing is wrong. Status reports show green, problems are ignored, process and the simulacra are gospel - and then the Soviet Union collapses.

Nevertheless, as with the final decades of the Soviet Union, it is probable that a few team members at some level know that something was wrong with the system even if they could not articulate the problem and don't see an alternative. They may follow "best practice" to the letter, see great test coverage as defined by the flawed metrics above, defects resolved, requirements ticked off but their stakeholders still complain, or their clients find defects that are tangential to or don't make sense based on the requirements they worked with. Everything is said to be running smoothly but everyone and everything is stressed. This is what I regard as HyperNormalisation - hyperreality with a subtle chink in the armour.

In companies that are greatly hierarchical, have established and immutable processes and teams with egos and dominant personalities reliant on the status quo it is likely that the unnerved team members above, especially if not at senior level, will keep quiet. They may decide that "Nobody got fired for just doing their job", or patiently wait for the end of the project. They may ask to be moved to another project or if the stress becomes an issue take sick leave. They may go through the motions of work without committing fully to it. These are a protest of a sort, but all they do is accelerate the eventual collapse and slump in quality.

The unfortunate truth is that without some shock that forces the team to reflect on its assumptions and processes, most teams trapped in a seductive but vicious hyperreality are not likely to be self aware enough to change until the project suffers dramatically or collapses entirely.


Epilogue


In this text I have covered concepts of hypernormalisation, simulacra and simulation and hyperreality and suggested them as analogies to look at four key concepts in software engineering - quality, measurement and requirements and methodology/process - and their impact on software projects. I have asserted that our inability to understand that these are ultimately seductive simulations with varying levels of relationship to the real world, and the difficulties of teams to reconcile these, cause great risk of projects deluding themselves into poor products and failure.

In Part 2, to be completed shortly, I look at applying these concepts to the IT industry and our tech culture as a whole, and look into various ways suggested to prevent or rescue teams from seductive self delusion. In the meantime, I would be grateful for your comments and considerations.


Sunday, 8 October 2017

On Testing Technocrats



The agile manifesto, written in 2001, states as one of its aims -

 "Individuals and interactions over processes and tools"

It is hard to imagine how in an agile team, where stakeholders, product managers, developers, testers, BAs and other groups work so closely together and much knowledge is tacit and undocumented, the above aim could possibly be ignored.

Software is ultimately used by people to implement solutions to problems people suffer from. It is created by people. The use cases and requirements that developers implement and testers test against are created by someone to reflect someone's (or some people's) wishes and needs. Testers test to find issues that we hope will never be discovered by people whose problems the software under test is built to solve.

...Which makes me annoyed about the idea that development/test teams can automate everything. The problems that bad software can cause for people are many and varied and the numbers and kinds of ways that a non-trivial application may fail are far greater, often more subjective than we can possibly plan for in advance. Requirements and specifications have subtle holes and areas of tacit knowledge that risk creating a product that does a wonderful job of something people don't actually want.

I am a big fan of test automation in its rightful place. As a regression tool it frees the tester from hours of tedious and often unfruitful checks to concentrate on those areas that require more exploration, analysis and thinking. It provides stubs and mocks so that the developer and tester can continue their work without the full integrated system being ready or available. It creates reams of test data of whatever attribute is necessary so that we can continue our work without laborious setup. It helps us perform checks with multitudes of simulated users to discern areas of poor performance. For all of the above however it doesn't replace the thinking mind of a competent test analyst. The kind who is adept at putting him or herself in the frame of the user, with all the complexities this involves.

But some of us feel that we can automate all of this away for 100% test coverage by automation, or that some future AI will make all non-automated test approaches redundant (not convinced that this will ever happen). I wonder, is it all about cost-cutting? The bottom line?

Or is there a type of person who thinks that the ambiguous and complex can be completely reduced to a set of checks and algorithms? That the human dimension, the outlook that human beings provide, can be abstracted away by technology? That what people see as quality can be reduced to a set of Yes and No answers. We hit the button, stand back and like the great tech sausage factory, we pump something in, our list of deviations comes out. Rinse and repeat with a few fixes and we get quality at the end...

I call these types the testing technocrats. By reducing our work to purely algorithms and checks to be done by machines - and quashing the thinking factor - they reduce the wishes and concerns of the users of our products to exactly that.

All in the hope of getting releases out faster, saving a bit of money and not to have to deal with the complex findings that a thinking human tester provides. This has been called out as wrong many times but often to deaf ears.

Test automation is an amazing thing that lets us achieve great efficiencies. It is not a replacement for the thinking human element. As testers we should be taking every effort to continue argue against those who believe it is.

Monday, 7 August 2017

On the Need to Test for Beauty and Elegance

I have spent the last month off work, visiting parts of the UK, Paris and Seoul with my wife. During this time I have spent much time engaged in visiting museums and historic sights and strangely enough pondering over my half-formed and admittedly likely flawed ideas regarding what beauty and elegance is.

What IT products would end up in a museum or art gallery in 100 years time? Computers that didn'ty look great but represented an impressive landmark in CS such as Tom Kilburn's Baby? Beautiful and stylish Apple iMacs and iPads? More "functional" but equally noteworthy VIC 20s and Atari STs? What about software? Computer games such as the Tomb Raider and Destiny series are beautiful to look at and very fun to play but the much more mundane Microsoft Office has been more important to people in a wide range of areas. Can one genre be seen as "art" and elevated to the Louvre one day, sharing a wing with the Botticellis and the Venus de Milo, and the other deemed more fitting for industrial museums such as the venerable Museum of Science and Industry in Manchester - sharing a wing with the steam engines and 19th Century cotton weavers? Is this a poor distinction to make and should all software be treated equally?

Sandro Botticelli: Madonna and Child with St. John the Baptist, c. 1470–1475, Louvre (CC: Wikipedia)
Replica of Tom Kilburn's Manchester Small Scale Experimental Machine, nicknamed "Baby". The world's first stored program computer. (CC: Wikipedia)



How many development teams see their end product as aesthetically pleasing and write this into their requirements? Who is the best judge of something so abstract and intangible - a UI expert, key users, the testers or the manager? In the middle and latter stages of a project, when the deadline is upon us and the resource restraints come thick and fast, how much of aesthetic quality sacrificed to reach the goal? How often do testers actually raise an issue that a design or its implementation is ugly or inelegant?

I have worked with some (what I regarded as) damn ugly and inelegant software in some past projects, yet I admit that rarely have I put up my hand and stated that some feature was just not stylish or pretty enough. I have improved on this recently. In my experience the all too common wisdom in teams has been that it was "what was agreed in the spec" or "what the client wants" or "what the designers/devs came up with and it is too late to change it". In terms of aesthetics, I have simply tended to focus on useability and how closely the user interface matches the design. In this respect I should have done better and fought against the perceived wisdom - in some cases nothing more than excuses for inaction.

However useability is not the same as elegance and "matching the design" is not the same as beauty. All software aimed to be used by people will be judged by its aesthetic qualities and elegance. We want software that elates the heart as well as satisfies the need. Testers have a critical role to play in achieving this.

The focus (especially in agile development) on inclusion of features above all else - done in a rushed fashion without care for aesthetics - detracts from the elegance (where simplicity is a large part) and beauty of the eventual product. Even after production deployment, we create environments where the final has new challenges to cope with - be they oversized and dynamic ad content that change the layout of web pages or overly complicated and badly designed later-introduced game levels and characters - that give a poor impression to our users.

This can also be caused by testers being brought in at the development (and later) stages of the project - after requirements and design are "locked down". The current trend towards "shift-left" may resolve this. Another cause for certain projects heavy focus on meeting the letter of requirements over thinking about what is best for the users - which takes leadership from the stakeholders and project management down to  resolve but for which testers must be willing to ask the difficult questions to achieve.

Regarding who is best to judge what is beautiful or elegant or what even these terms mean in IT, I have no definitive answer and put the question out to the community. There are web and UI design standards which can help but they do not solve the problem. At one level, product walkthroughs and the inclusion of management and user views at every iteration can at least provide opinion and consensus (where all are allowed to speak with equal merit), however even in these cases the focus can tend towards what is functionally sufficient and not the aesthetics.

I implore all of us working in development teams to challenge views about design and look and feel as early as possible in the lifecycle. Testers should ask hard questions about the aesthetic qualities of the product, however without acceptance from stakeholders, management, business analysts, designers and developers nothing will change. Clearly there are many examples of stunning and elegant products created that people like as well as use (Apple is a case in point), so good practice does exist. We all need to find and follow it.

Sunday, 19 February 2017

On Vegan Cooking and What Testers can Learn from it

This admittedly odd idea for a blog came from an irreverent Twitter discussion between testers Jean Ann Harrison (@JA_Harrison), Mike Talks (@TestSheepNZ), Gem Hill (@Gem_Hill) and I that touched on vegan cookbooks and cooking, binding agents, testing conferences and random twitter followers! The idea came up that there could be some concept X that works in vegan cooking and yet could be readily applied to good software testing practice - and that someone should submit a testing conference abstract on this!

I haven't yet accepted the challenge to write a conference abstract, however as a tester, occasional blogger on eccentric testing topics and vegan I did offer to think hard about this and blog some ideas. This is my attempt at a testing article using vegan cooking as a metaphor. This blog post could crash and burn a horrible vegan death, taking my reputation with it, however fortune favours the brave and all that....

I have been a vegetarian since 2006 and a vegan since late 2012. I have never been comfortable with the idea that animals are there for our exploitation and consumption, and took the vegetarian and eventually vegan path for moral reasons. I am disappointed that it hasn't changed my waistline much - a combination of the large number of vegan confectionaries out there and my lack of  willpower - therefore I cannot vouch for it as a weight loss plan!

I spent some time thinking about this tonight while cooking dinner. Note that cooking and software testing are obviously very different activities and therefore the concepts I outline are somewhat nebulous, general and already well known, however that does not detract from their importance. Most cooking concepts listed below apply to some degree to other restricted diets and non-vegan cuisine as well.
My Dinner - Vegetable, Basil and Mock Chicken broth with rice.

1) Constraints Abound. Get Used to Going Off-Script and Exploring.


There is no national cuisine that fully lends itself to veganism (except maybe Vietnamese and some Middle Eastern cuisine). Vegan recipes and cookbooks are typically developed by either taking existing recipes and exploring suitable plant-based replacements for animal-based ingredients or developing from scratch.

This in itself is not perfect. Take baking for example. Baking usually uses egg as a binding agent and milk and butter to provide flavour, structure and texture. There are alternatives to these - binding agents such as ground flaxseed and mashed banana and nut and soy milks and margarines - however these are not a seamless replacement and can alter the taste, texture and preparation of food.

Another example is meat itself. A plethora of soy, seitan, mushroom, gluten and konjac-based meat replacements exist (SE Asian and Indian supermarkets are best for these although most supermarkets stock some brands), however they have their own properties, are not quite the same in flavour or texture and not to everybody's taste. For recent adherents to vegetarianism who are fond of the taste of meat (as I was), this can be troubling.

What this has resulted in is a great culture of exploration and experimentation. Lots of cookbooks were developed by taking an existing cuisine or set of recipes and add radical ingredients, not obvious at first glace, gained from iterative trial, error and creative adjustment. The recipe is just the starting point. We take vegetables, herbs, legumes and other ingredients and add them until we get the satisfaction we want. It can be long and laborious over many meals but it is a lot of fun and when it works the results are dramatic! As an example, the cookbook "Appetite for Reduction" by vegan chef Isa Chandra Moskowitz contains recipes from such combinations as red wine, kalamata olives and tempeh and garlic dressing made from tahini, nutritional yeast flakes and miso - and they taste amazing!

Our well-thumbed cookbooks.


In the world of testing it is well known that exploratory testing methods are more effective at finding defects than adherence to traditional scripted test documentation - I also find them more interesting and motivating - and yet so many testers still draw up test cases with detailed steps in advance and execute them narrowly and slavishly. This also requires the existence of such items as a complete, static requirements specification - which is most often unlikely to exist in all but highly structured waterfall projects. The key attributes of a tester (in my opinion) are curiosity about the software under test, a critical eye, passion for quality, persistence and creativity - so feel free to deviate from the path, come up with new test ideas and go for it!

2) Keep Your Environment Protected, Clean and Maintained (Preferably by You)


My wife and I live with my meat-eating father. We use the same fridge and kitchen. We take steps to protect our environment.

Having uncooked meats and unpackaged herbs, fruits and vegetables (especially to be used in raw salads) in the same fridge is a sanitary nightmare. Contaminated blood from the meats could make us all sick from food poisoning. We deal with this by ensuring that all meats are in sealed plastic containers on a different (lower) shelf to uncovered vegetables.

Also my wife and I are no longer fond of any lingering taste or smell of animal products in our cooking - and sometimes even the best cleaning doesn't get rid of these from cookware. We therefore bought my father his own pots and pans to use and allocated separate kitchen cupboards for him, something that has worked very well.

Our test environments, data and harnesses must similarly be protected and looked after. They should be easily reverted to a pre-test execution state. Although not perfect this helps to provide assurance that the defects we find are product defects and not caused by some external application, unwittingly corrupted data set or misconfiguration of settings. This also allows us to quickly remove test data and final states from an earlier test and re-execute a regression or defect retesting suite quickly and efficiently. I would also recommend that these be maintained by the testing team.

Modern Continuous Integration tools such as Docker, VM tools such as VirtualBox and Vagrant and automated database restores and migration serve to make the above simple and efficient. There are no excuses for having a sloppily maintained, uncontrolled test environment.

3) Have a Variety of Good Tools at Your Disposal. Know When, Where and How to Use Them.


Every decent cook, vegan or not, invests in a set of sharp, durable knives and good non-stick pans. I would also include a good wok. I'm a pretty mediocre cook at best and I still need them...

I do a lot of Asian stir-fry cooking. I like my carrots, capsicum and zucchini cut into strips or julienned and my herbs finely chopped up. My wife likes her eggplant finely cubed. To do this properly, especially with carrots and eggplant, we need sharp, durable knives and choppers of different sizes. These are expensive and need to be regularly sharpened. Similarly among meat eaters, every lover of steak swears by a good set of serrated steak knives.

Sliced bok choy, capsicum and basil with julienned carrot.


Similarly, we have a wide and disparate range of flavourings, herbs and condiments in our kitchen. These include apple cider and balsamic vinegars, kecap manis, soy sauce, miso, various powdered herbs such as basil, chinese five spice and oregano, dukkah and nanami togarashi. They provide a wonderful inclusion to the flavours in our cuisine, however used wrongly they can ruin a meal. I don't always instinctively know the best dishes to use them in (I have a predilection to sweet soy sauce, kecap manis, and use it in enough places for my wife to wonder if I am secretly pregnant...) but I do see it as a priority to learn.

A selection of our condiments

There are many tools available to the tester, from data creation through test planning execution, environment management and setup to automation. Everybody has an opinion of where and when to use them and the internet and books are full of guidance, however the decision of what, when and how to use a tool or tool suite depends entirely on the local context and must be decided by you. We do not have infinite time or budget or expertise available to us and the wrong tooling decisions uncorrected too late can ruin a project.

An example of wild claims and abuse of tools is test automation - far too often seen as a panacea or substitute for the hard graft of testing. Get HP ALM or Selenium Webdriver in, automate everything, we don't need manual testers anymore! Similarly write enough unit tests get 100% unit test coverage and we will never have a quality issue ever again! How often have we heard such complete rubbish?? It is me and the kecap manis again!

So many tools are available at low cost (or free, open source). There is also lots of good information on the internet on examples of how and where to use them. Take advantage of it and get the right tools for your project.

4) We Are (Mostly) Friendly, Come and Meet Us!


When I became a vegan in 2012 I struggled greatly despite my previous experience as a lacto-ovo-vegetarian. Veganism is a much broader and different set of values, not just in terms of how to follow a plant-based diet but also avoiding wool and silk, leather shoes, household cleaning and men's grooming products that contained animal products - even my choice of beer when I am in the pub on social events. It is very hard to do on one's own.

Luckily there are great online and in-person vegan support groups out there. Most large cities contain at least one vegetarian / vegan meetup (here in Sydney, Australia both Vegan Australia NSW chapter and Kym Staton's Sydney Vegan Club run great events) and I find that in almost all cases people are willing to offer advice and relate their experiences to newcomers. Online there are great initiatives (paid and free) such as Animals Australia Unleashed, Colleen Patrick-Goudreau's 30 Day Vegan Challenge and any number of Facebook groups and forums where people can find information and talk with others. Sadly not every group is friendly to newcomers however there is enough support and friendship out there to every person to find a niche.

Similarly, new testers and those without the ability to connect and chat in their workplaces have opportunities. So many cities nowadays have a Testers Meetup via meetup.com, usually running free or low cost talks and events. As an example the Sydney Testers Meetup, for which I am the social media officer has over 2000 members and almost all of its events are free and after work hours. Online Slack channels for testing such as http://testersio.slack.com and the Ministry of Testing Slack are busy with people discussing testing practice and offering tips. Most of the testing thought leaders are also active on Twitter and Linkedin and easy to find. Join up - we were all new once and happy to connect!

Monday, 23 January 2017

On the Joys of Sleep (Tester Edition)

Tonight in the part of Sydney, Australia I live in it is 11pm at night and 26°C with 65% humidity. Last night I couldn't sleep well and tonight is likely to be worse. The aircon isn't making much difference and in any case is bloody noisy. Some random alarm just went off outside. Instead of visiting the land of Nod I am up and feel a bit rubbish. I am no stranger to insomnia at the best of times but this takes the biscuit. What a better time for an impromptu testing rant blog?

Of course performance in every job short of professional sleep deprivation test subject is diminished by sleep deprivation, however I find that the particular skills required to do testing properly are shattered by a sleep deprived brain. Doing manual and exploratory testing, I struggle to concentrate for any length of time at all without good sleep and my productivity nosedives. I find myself nodding off at meetings (same if I have a big lunch), or at the very least listless. My ability to communicate to other testers or management or choose the right words to say or write is diminished to the point where people start wondering if I have mysteriously forgotten how to speak English - not good if you are a consultant and expected to be sharp and knowledgeable all the time. Meetings and conferences are interrupted by my incessant yawning. I act like a moody brat. And so on...

Think of the things that we do on a daily basis that require us to be mentally on top of our game. We need to be focused and observant for long periods, creating in coming up with new test scenarios, precise in our plans, defect logging and status reports, analytical in our study of requirements, able to communicate precisely and tactfully with management, technical staff and  stakeholders in providing the data they need to make go no-go and project decisions.

And yet the demands of IT, the pressure of overloaded agile development cycles and crammed final testing periods in waterfall, the need to test production deployments out of hours, the delays we get due to development overruns and tough, large defect retest backlogs, non-negotiable release deadlines - in some stints I have had resulting in working many lates, one or two all-nighters in a row and giving up weekends - are such that we are often made to push ourselves to the limit without suitable rest. The effect and disruption this causes on our family lives and health and the stress this causes mean that we are even less likely to have a good night's sleep. The cycle perpetuates. While it is true that jobs need to be done and deadlines need to be met, the culture of expecting productivity from people who are heading for spectacular burnout and mental exhaustion does nothing for the success of our projects. Of course my insomnia tonight has nothing to do with the above, however I see it as motivation to write about a much wider problem in the industry.

Why is this so unusual, it happens in other fields? Project managers, developers, business analysts, CIOs also have it. That is true and I have every sympathy, however being the author of a testing blog I have the licence to write uniquely from a tester perspective. I do believe that the particular nature of testing as a role imposes demands that even a small amount of mental exhaustion make difficult to achieve.

It is hard to speak up about it. How many of us, often contract testers and consultants working on client sites are able to challenge the processes, workload and deadlines of management? We don't want to "let the side down" or appear weak to our bosses and colleagues, we want to be seen to be team players and professionals. Maybe we fear the next round of offshoring and redundancies - even the cancellation of our visas and deportation if tied to our employer. The stakes are high and to speak out takes guts and persuasion. Luckily I work for excellent managers on an easier project and am able to voice my opinion about timelines and resourcing, but my experience in IT has told me that these things are a privilege not widely shared and projects have a momentum of their own that can slide into stress and trouble if not managed well.

So what is required? More considerate industry practices? Better timelines and test estimation by test leads? Testers to be more assertive? More caring and proactive management? Better scoping? A testers union maybe? I don't have the answers but would love to hear your thoughts.

In the meantime, I will try to hit the sack. It's hot and I don't fancy my chances but we shall see. Goodnight ;-)

Thursday, 12 January 2017

Dubious but Still Fairly Common Reasons to Implement Test Automation

1) The budget is low and the boss says we have to lower tester headcount by any means possible...

2) Our agile cycles are so loaded with work and release deadlines so short that we can't actually fit manual testing in the schedule...

3) I'd secretly love to be a developer and doing lots of test automation is the best way I can learn programming in office hours...

4) (somewhat linked to 3) I read somewhere that manual testing is dead and if I don't become a test automation guru overnight I'll be unemployable, sad and poor forever...

5) The CIO/Test Manager was recently seduced into spending $20k QTP/Test Complete by a salesperson. The company QA standard is now to automate everything in existence and get our money's worth out of the licence fee.

6) I never actually liked the whole manual and exploratory testing pahlaver and can now get super high test coverage without ever manually testing anything again!

7) Test Automation is the way of the future and will solve all problems, regardless of what they are!

I have probably missed some others...