Q: When Do We Prefer Manual Testing Over Automated Testing? A: Hmm....
To answer this, we need to question our situation and build a deeper model of our actual aims, options, and capabilities.
Join the DZone community and get the full member experience.Join For Free
i have a simple rule: “i might not automate if i have to create.” however, i have done the opposite. i have automated when others would not, and i have waded in when others would have automated. to answer this question, we need to question our situation and build a deeper model of our actual aims, options, and capabilities.
a: i have a problem providing a simple answer to this question…
and not just because it depends, but also because that’s not the model i use, so i don’t frame the question like that. i don’t think in terms of “manual testing” and “automated testing.”
i think in terms of “testing,” “interacting directly with the system,” “automating predefined tasks, actions, and paths,” “using tools,” etc.
testingif i’m testing, then i ask myself the following questions:
- do tools already exist to help?
- do i have abstractions that cover those areas?
- do i have to create tools?
- do libraries already exist?
don’t automate under these circumstancesso, what about scenarios where you might expect “don’t automate” as my default answer? the following are situations in which i wouldn't suggest automating.
- it's something that we rarely need to do.
- it's something that has to do with usability in terms of look and feel.
- it has to do with experimental features.
- it's something that's still under development and that changes frequently.
experimental features might fit into an existing process, so we might already have a lot of the scaffolding that we need to support minimal and speedy automating, in which case i might automate those.
i have automated features that were changing frequently because we were testing the same path through the application many, many times (every time it changed) and we often found problems (every single release). the effort of testing it by interacting with it was a waste. so, we didn’t interact with it until the automated execution could pass reliably. however, that also depends on what in the implementation changes and how that change impacts the approach chosen to automate it.
what’s the real question?if i have to create stuff to help me automate as part of my process, then i’m likely to weigh up the cost of automating versus just getting on and interacting with it.
are the assumptions behind the scenarios true?
- scenario: it's something that we rarely need to do.
- assumption: we'd spend a lot of time automating something that we would rarely use.
perhaps we rarely execute it because of the time and energy involved in setting up the environment and data rather than the tooling. perhaps we need to automate more to allow us to test it more frequently.
- scenario: it has to do with experimental features.
- assumption: we write code to automate it that we throw away.
- scenario: it's something that's still under development and that changes frequently.
- assumption: automating a scenario always takes longer than interacting with it and maintenance in the face of change takes too long.
scenarios have more nuances in the real worldvery often, we discuss these questions as hypothetical scenarios. if we do, we need to drill into that scenario in more detail in order to come up with our answer. one of the main benefits of the exercise of "hypothetically…" is the asking of questions and fleshing out of a model to better explore the scenario.
i have automated when other people said i should not, and it saved time. i have interacted manually using tools when others said we should automate, and we found problems we would never have found if we had taken the automation path so early. i have also manually engaged in stress and performance testing.
Published at DZone with permission of Alan Richardson, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.