Time is the one thing of which everyone gets the same amount. Whether we are the CEO of a company or we are the intern, we all have 1440 minutes in a day. I've often heard testers talk about how they don't have enough time to test, and that can certainly happen when deadlines are imposed without input from everyone on the team. I've written a blog post about time management techniques for testers, but today I'm going to tackle the question:
Is it worth my time to automate this task?
Sometimes we are tempted to create a little tool for everything, just because we can. I usually see this happen with developers more than testers, but I do see it with some testers who love to code. However, writing code does not always save us time. When considering whether to do a task manually or to write automation for it, ask yourself these four questions:
1. Will I need to do this task again?
Recently my team was migrating files from one system to another system. I ran the migration tool manually and did manual checking that the files had migrated properly. I didn't write any automation for this, because I knew that I was never going to need to test it again.
Contrast this with a tester from another team who is continually asked to check the UI on a page when his team makes updates. He got really tired of doing this again and again, so he created a script that will take screenshots and compare the old and new versions of the page. Now he can run the check with the push of a button.
2. How much time does this task take me, and how much time will it take me to write the code?
Periodically my team's test data gets refreshed, and that means that the information we have for our test users sometimes gets changed. When this happens, it takes about eight hours to manually update all the users. It took me a few hours to create a SQL script that would update the users automatically, but it was totally worth my time, because now I save eight hours of work whenever the data is refreshed.
But there have been other times where I've needed to set up some data for testing, and a developer has offered to write a little script to do it for me. Since I can usually set up the data faster than they can create the script, I decline the offer.
3. How much time will it take to maintain the automation I'm writing?
At a previous job, I was testing email delivery and I wanted to write an automated test that would show that the email had actually arrived in the Gmail test account. The trouble was that there could be up to a ten minute delay for the email to appear. I spent a lot of time adjusting the automated test to wait longer, to have retries, and so on, until finally I realized it was just faster for me to take that assertion out of the test, and manually check the email account from time to time.
However, my team's automated API smoke tests take very little time to maintain, because the API endpoints change so infrequently that the tests rarely need to change. The first API smoke test I set up took a few days; but once we had a working model it became very easy to set up tests for our other APIs.
4. Does the tool I'm creating already exist?
At a previous company, the web team was porting over many customers' websites from one provider to another. I was asked to create a tool that would crawl through the sites and locate all the pages, and then crawl through the migrated site to make sure all the pages had been ported over. It was really fun to create this tool, and I learned a lot about coding in the process. However, I discovered after I made the tool that web-crawling software already exists!
But in that particular month I did have the time to create the tool, and the things I learned helped me with my other test automation. So sometimes it may be worth "reinventing the wheel" if it will help you or your team.
The Bottom Line: Are you saving or wasting time?
All of these questions come down to one major consideration, and that is whether your task is saving or wasting time. If you are a person who enjoys coding, you may be tempted to write a fun new script for every task you need to do; but this might not always save you time. Similarly, if you don't enjoy coding, you might insist on doing repetitive tasks manually; but using a simple tool could save you a ton of time. Always consider the time-saving result of your activities!
BIG NEWS! My LinkedIn Learning course on Postman is now live! This course is an introduction to creating API requests and assertions with...
This week, we'll be talking about adding assertions to our Postman requests. In last week's post , we discussed what various API re...
As software becomes increasingly complex, more and more companies are turning to APIs as a way to organize and manage their application'...
The concept of measuring quality can be a hot-button topic for many software testers. This is because metrics can be used poorly; we've...