A Starter’s Handbook to Automation
Mitchell Thomas
Nov 27, 20245 min read
Now, you might be thinking, “Ah, yet another blog about Automation! How is this going to be different?”
I’m not going to tell you this is the one-stop shop to solve all your automation problems. However, I can assure you that this will be an easy-to-grasp high-level guide for anybody looking from outside into the vast, exciting world of Automation and trying to get their projects off the ground.
This handbook will share some key pointers that my talented QA colleagues at Truecaller and I learned during our journey of automation from zero to one!
Right off the block, let's get the 2 main buzzwords defined.
- Automation: in the most basic sense, it is the process of performing a test using software rather than manual effort.
- Framework: Framework defines the structure and organization of a test automation project.
9 Steps to Getting Your Automation Project Started
1. Do You Need Automation?
This involves identifying any tedious tasks that are performed repeatedly, like regression testing, and deciding if they can be automated. It's also important to identify the most crucial tests that should be conducted regularly to ensure that the software meets the required quality standards. By identifying these areas, you can determine which parts of the testing process can be streamlined and made more efficient through automation.
Tip: Try to avoid working on automating areas of the product that you know are prone to change in the next few weeks. Assess its effort-to-reach ratio.
2. Tooling Is Key!
Once you have identified the areas that require automation, choosing the right tools to automate them is vital. Several good tools for QA automation are available on the market, and each has its pros and cons.
Here are some pointers to keep in mind while considering the tool for your needs:
- Functionality: Ensure it has the features you need for testing, like web automation for web apps.
- Ease of use: Look for a user-friendly interface to create, execute tests, and get clear reports.
- Integration: Check if it integrates with other tools you're using, such as test management, bug tracking, and CI tools.
- Language support: Verify it supports your team's preferred programming languages, like Python.
- Record and Play: If your team does not currently have the skillset to code using conventional scripting languages, a record-and-play tool might be the way to go. You could even use a tool whose syntax is straightforward to create tests and flows. These tools have their own set of cons, but they might work well for a few use cases.
- Maintenance and Support: Choose a tool with good documentation, regular updates, and helpful support to keep tests up-to-date and quickly resolve issues.
- Cost: Evaluate pricing and consider free trials or community editions with limited features to start.
3. Find a Framework That Works For You
A good framework provides a structured approach to automating the testing process by providing a set of rules and guidelines for developing, executing, and maintaining automated test scripts. It ensures consistency, reduces the time taken to create and maintain tests, and facilitates scaling.
Think of it like building a house, but you're using code and logic instead of bricks and mortar. It's important to get this step right, otherwise, you'll end up with a house of cards that falls apart in the slightest breeze.
Some widely used ones are data-driven testing, keyword-driven testing, Behavior-driven development (BDD), Test-driven development(TDD), Modular framework, and Hybrid testing framework.
4. What to Automate?
It is crucial to identify the test cases that need to be automated and prioritize them based on their significance and impact on the software's overall quality.
It is better always to start automating business critical test cases. The ROI is usually high on these.
Parallelly, try to automate the most stable and repetitive flows, which will help reduce manual effort and regression testing time.
5. Let's Get to The Fun Part!
Moving on to the most exciting part: writing the test scripts. Think of it as a choose-your-own-adventure book, but instead of flipping pages, you're simulating user actions. And don't forget to create test data - no one likes a test that just covers the happy flow.
While scripting, remember to follow standard coding best practices, keep the data and scripts separate to ensure scalability and ease of maintenance, use reusable methods to keep the code base under check, update all the relevant libraries to the most recent stable versions, and think smartly about handling exceptions in the flows.
Once the test scripts are written, it's time to execute them. This is where you sit back and let the machines do their thing while you catch up on your favorite TV show (may I suggest "Ted Lasso"?).
6. Reporting, Logging and Accountability
Finally, it's time to generate test reports. This is like getting a report card for your software - you'll either get an A+ or an "F for Effort". But don't worry, there's always room for improvement.
In addition to reporting, there is a strong need to have logging in place to narrow down the successes/failures quickly. This also helps with accountability and quicker turnaround time in terms of fixing failures.
7. Scaling Up
The ever-evolving tech landscape demands nothing less than a scalable automation framework! Picture this: as your application spreads its digital wings and takes flight, your automation should spread its wings too, gracefully adapting to the changing terrain. Keep your finger on the pulse, constantly assessing and broadening your test coverage to embrace the latest features, functionalities, and platforms.
But hey, let's not stop there. Why settle for a mundane test execution when you can turbocharge it with parallel execution and distributed testing? It's like upgrading from a bicycle to a rocket ship – the same destination but with far more style and speed. Embrace the future, my friend, and watch your testing efficiency soar!
8. Automate Your Automation
Let's talk CI/CD – the superhero duo of automation! Imagine your automation framework and CI/CD pipelines joining forces, like Batman and Robin fighting crime together. By automating the build, test, and deployment processes, you're basically setting up a crime-fighting headquarters where issues get spotted quicker than you can say 'bam!'
Continuous testing becomes your trusty sidekick, always on the lookout for trouble. With this dynamic duo, you'll nip issues in the bud faster than a speeding bullet, making development lifecycles smoother than a well-oiled machine. So, suit up because, with CI/CD and automation, you'll be fighting bugs in style!
9. Document the Framework
Once the whole framework is up and running, detailed documentation is vital. This helps you onboard your teammates and expand the number of contributors to the project.
Good documentation should also have insights into why certain tools and approaches have been adopted for posterity.
What’s Next
So, there you have it - setting up a QA automation framework is like building a robot army to do your bidding. Okay, maybe not that extreme, but you get the picture. With the right tools and approach, you can have a robust QA automation framework that ensures the quality of your software, leaving you free to enjoy that well deserved downtime to help you reboot for the next challenge!
Mitchell Thomas
Nov 27, 20245 min read