Will AI Take Your Job as a QA? Well... Sort Of?

Navigating the AI Revolution in QA: Embrace Change, Elevate Your Role, and Thrive in the New Era of Software Testing
Written by
Ben Fellows
Published on
August 12, 2024

It seems like today, you can't spend more than 5 minutes on LinkedIn without some doomsday post about how AI is going to make QA obsolete. Will AI take your job as a QA? The answer is, well, sort of šŸ¤·ā€ā™‚ļø. But before you start updating your resume, let's take a closer look.

AI is going to make highly effective professionals exponentially more effective and cut down significantly on team size. This is inherently both an opportunity and a threat, depending on which side of the equation you're on.

The opportunity is for those who embrace the final 20%. What I mean by that is that, currently, AI is great at doing 80% of a task. Getting code 80% right. Getting 80% of the acceptance criteria, but it is still absolutely reliant on someone doing the last 20% to provide context.

The closest example I can come up with for the existential crisis happening today is it is like what math faced when the calculator became mainstream. The calculator made a massive portion of math obsolete in a ton of industries that didn't need anything beyond what a calculator could do, such as basic accounting, bookkeeping, and even some engineering tasks. Will it completely alter how we approach things like generating code, content, etc.? Absolutely.

It's also worth mentioning that this isn't limited to just QA - the same effect is going to be felt across software development as a whole. So, let's split this discussion into two parts: the impact of AI tools today and some pontifications for the future.

In this article, I'm going to lay out 3 examples of how AI is doing the 80% and then at the end talk about what might be coming next. Lastly, just remember this Einstein quote: "Computers are incredibly fast, accurate, and stupid. Human beings are incredibly slow, inaccurate, and brilliant. Together they are powerful beyond imagination."

#1 Data Generation

Data generation has largely been one of the headaches that slows down QA. Data is absolutely key to QA as it represents the state of the system. This has been completely revolutionized with tools like OpenAI's API.Ā 

Why? Because these tools are capable of reading SQL models, determining interdependent relationships, and then generating factories that are capable of creating hundreds, if not thousands, of combinations of that data to be tested.Ā 

It is certainly not perfect, but that is why you need the human. A single human today can test the system under more conditions than a team of 5 writing the code could over the course of days.

Let's say you have this example SQLĀ model.


You can drop this model into ChatGPT with the prompt:Ā "Create a data factory for TasksĀ that IĀ can use to help seed my test data during my testing".

In this example, we use Node.js to create a data factory that seeds test data into the Tasks table of a PostgreSQL database. The script leverages the faker library to generate realistic fake data, including task names, descriptions, due dates, statuses, and priorities. It also assigns tasks to random projects and users, simulating a real-world scenario. The pg library is used to connect to the PostgreSQL database and execute SQL insert queries. The script allows you to customize the number of tasks generated and ensures that each task is populated with varied and plausible data, making it ideal for testing and development environments.

Is it perfect?Ā No. Did it take 10 seconds to get you 80%Ā of they way there. Yes.

#2 Test Plans, Write-Ups, Etc.

Writing clear and concise test plans, test cases, and other QA documentation can be time-consuming. However, AI can help streamline this process by generating high-quality drafts based on requirements, user stories, or even existing test artifacts.

For instance, given a set of acceptance criteria, AI can generate a comprehensive test plan outline:

While the AI-generated test plan might not be perfect, it provides a solid foundation that can be refined and expanded upon by a human QA professional.

Is it perfect?Ā No. Did it take 10 seconds to get you 80%Ā of they way there. Yes.

#3 Unit Tests/Integration Tests

Software, in general, should already be at a much more stable state when it gets to the hands of QA because developers should be having AI generate unit/integration tests for their code. AI is actually fantastic at doing this.

Here's a complex example of AI-generated unit tests for a TypeScript function:

In this example, the AI has generated unit tests that cover various scenarios, including calculating the total price with and without a discount and handling invalid discount percentages. The tests ensure that the calculateTotalPrice function behaves as expected and handles edge cases properly.

Is it perfect?Ā No. Did it take 10 seconds to get you 80%Ā of they way there. Yes.

Looking Towards the Future

As AI continues to advance, its impact on QA teams will become even more profound. Here are two key areas where we can expect to see significant changes:

1. AI Taking Guesses at Intention

One of the most exciting developments in AI is its growing ability to understand and predict human intentions. In the context of software testing, this means that AI systems will become increasingly adept at inferring the desired behavior of an application based on requirements, user stories, and other forms of documentation.

For example, imagine an AI tool that can analyze a set of acceptance criteria and generate a comprehensive test plan, complete with test cases, edge scenarios, and potential pitfalls to watch out for. By understanding the underlying intentions behind the requirements, the AI can create a more thorough and effective testing strategy than a human might come up with on their own.

This ability to guess at intention will not only save time and effort but also help catch potential issues early in the development process. QA professionals will be able to focus their efforts on reviewing and refining the AI-generated test plans, rather than starting from scratch.

2. AI Interacting with Browsers without Code

Another game-changing development is the potential for AI to interact directly with web browsers without the need for traditional automation code. This could revolutionize the way we approach UI testing and significantly reduce the maintenance burden associated with traditional test automation frameworks.

Picture this: instead of writing complex Selenium or Playwright scripts to navigate through a web application, a QA professional simply describes the desired actions in plain language. The AI system then uses a combination of computer vision and natural language processing to identify UI elements, interact with them, and validate the results.

OpenAI has already demonstrated the ability to identify bugs from screenshots, so it's not hard to imagine a future where AI can fully automate the UI testing process. This would not only save countless hours of development time but also make it easier for non-technical team members to contribute to the testing effort.

Final Thought

As AI continues to evolve and become more sophisticated, it's clear that its impact on the QA profession will be profound. When AI reaches the point where it can test software independently without human intervention, it will likely be smart enough to build software as well. At that stage, it won't just be QA roles that are affected, but all developer roles.

However, this is not a cause for despair, but rather an opportunity for QA professionals to adapt and evolve. By embracing AI and learning to work alongside it, we can harness its power to create better, more reliable software faster than ever before. The key is to focus on providing the critical human context and judgment that AI systems still lack.

In conclusion, while AI may lead to smaller QA teams in the future, it also presents a tremendous opportunity for those who are willing to embrace change and stay ahead of the curve. By adapting to this new reality and continually updating our skills, we can ensure that QA remains a vital and thriving profession in the age of artificial intelligence.

If you're ready to let us handle your test automation, explore more about what we offer here.

Free Quality Training
Enhance your software quality for free with our QA training and evaluation. Sign up now to boost your team's skills and product excellence!
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.