This post is part 2 of my āautotestsā series.
First part is How do I Encourage my Manager to Support Automated Tests?
This article is not about the technical details on how exactly to write autotests, but rather about the approach one could take to ensure the autotests initiative is not rejected.
Once you've persuaded your manager to support automated testing, you need to plan it right ā the acceptance of the initiative doesnāt guarantee unlimited probation time.
Remember, step into the managerās shoes: once having yielded to someoneās plan, they still nurture the doubts and hesitations. Provided there are no noticeable (and by noticeable I mean measurable) results, those hesitations and doubts will cherish.
Letās see what we can do with numbers.
It's a widely accepted consensus that automatic tests (and TDD) benefit the software development process in the following ways:
Thereās a consensus in the software development area thatmeasuring qualityĀ is a bad idea, so I wouldnāt recommend going that route.
Itās also impossible to measureĀ team moraleĀ with numbers, so this route is useless too.
We can show only two measurable things:Ā onboarding costĀ (time) andĀ time to market.
However,Ā onboarding costsĀ will reduce noticeably only after some time while we want to show immediate results.
So we are left with showing howĀ time to marketĀ is reduced.
TTM comprises the time taken to pass all the steps required to develop and deliver certain functionality to the client.
The manual QA stage usually takes significant time: a feature awaits for the QA team to pick it up, and then the testing itself is done.
Also, the manual QA stage implies massive delays in a case when the feature is returned to development due to defects.
The reason for the delay is that when the feature is passed to QA, the developer usually picks a new feature to work on, and when the tested feature is passed back to development, it has to wait again.
If the developer picks the returned feature straight away, context switch costs apply.
Iāve mentioned studies on context switching costs in myĀ code review limits to applicabilityĀ article:
There are multiple publications on how multitasking and switching contexts are ineffective:
- The myth of multitasking, Nass, 2013
- Multitasking: Switching costs (american psychological association)
- Executive Control of Cognitive Processes in Task Switching ā Joshua S. Rubinstein, David E. Meyer, Jeffrey E. Evans
- Reconfiguration of task-set: is it easier to switch to the weaker task?
- Executive Control of Cognitive Processes in Task Switching
Thereās good scientific evidence that itās more effective to work on one single task at a time with as few context switches as possible.
This proves that to reduce time to market (and show immediate results in this initiative), manual QA phase should be reduced as:
- automatic tests run as soon as the developer runs them (0 waiting time)
- automatic tests run quickly (much lower testing time) and therefore provide almost instant feedback, meaning that there will be no context switching cost.
Where to start
As we want to show our manager some immediate benefits, obvious idea would be to start with automating something that would show immediate results.
Iād advise automating tasks that have significant āmanual testingā time.
Every task tracker can show you the time a task spends in the ātestingā phase, and if you use a test management system, you can get even more information.
Hereās what I have in myĀ QaseĀ TMS:
As you can see, the obvious choice here would be to start automating āauthorisationā first as it takes 9 minutes to be tested manually every release.
These 9 minutes yieldĀ 8 hours a yearĀ spent directly on manual testing of this particular feature if we have one release per week.
As soon as we automate this check, we can show our manager that TTM is reduced by 9 minutes for each task. This will inevitably gain us more trust.
The more trust you have, the more you can do whatĀ you know is right, potentially something which cannot be āmeasuredā or is not quantifiable.
DemingĀ calls āmanaging only whatās quantifiableā one of theĀ 7 deadly diseases of management:
- Management by use only of visible figures, with little or no consideration of figures that are unknown or unknowable.
But Iāve rarely seen managers knowing of this, hence this whole approach of showing results and gaining trust to do something thatās truly right.
So, to summarise:
- you persuaded your manager to support autotests
- you constantly show them immediate results
- you gain trust to be able (and have resources) to develop proper testing strategy
- you start doing whatās right
To proceed with the proper testing strategy, first check FowlerāsĀ document.