Skip to main content

AI-Assisted Testing: DOs and DON'Ts

AI-generated summary of my talk for those who prefer a written format

Updated 7 min readMarkdown
AI-Assisted Testing: DOs and DON'Ts
⚠
Yes, I had AI generate this for me. If you want to watch the original talk, go here. I did add some small revisions but the lion’s share of this was written by AI to save me some time rehashing a 25-minute talk. You can find the slides here if you want to see those.

At DevFest WI 2025, I gave a talk titled "AI-Assisted Testing: DOs and DON'Ts" where I shared some of my experiences and insights on using AI in software testing. This blog post is a first-person recap of that talk, covering where I've found AI truly shines and where it can actually be more of a hindrance.

The Stages of AI Acceptance

My journey with AI started with a bit of a roller coaster of emotions, a common journey I've found many people experience. It began with denial, where I saw AI as a passing fad and mostly inaccurate. That quickly turned into anger as it seemed to outperform humans in some areas. Next came bargaining, as I began to recognize its potential for automation. I even had a brief period of hopelessness where I questioned my job security.

Fortunately, I finally reached a stage of acceptance. I now have a much more tempered understanding of AI's limitations and biases. I've learned that while AI can speed up certain tasks, humans remain crucial for others, especially those that require creativity and intuition, like testing.


AI in Testing: The DOs

I like to differentiate between "testing" (which is more about critical analysis) and "test automation" (which involves predefined instructions). For general testing, I've found AI to be surprisingly effective in a few key scenarios:

  • Dependency Upgrades: AI is excellent at analyzing change logs and release notes from dependency upgrades. It can pull context from code differences to generate reliable test plans, helping to identify potential breaking changes and even spot human blind spots. I often use AI to create markdown-formatted checklists that make it easy for me to track my progress and share it with my team.

  • Screenshot Analysis: I've found AI to be really adept at analyzing images. I primarily use it for copy checks and grammar mistakes, but it also has great potential for checking color contrast and other visual accessibility issues.

💡
After the talk, someone approached me to ask for clarification on the a11y testing use case (color contrast). They were concerned I was advocating for a black-box approach where AI determines the color contrast score without you knowing how it determined that score. That’s not what I was advocating for, so let me explain what I actually meant so there’s no confusion. I meant that you would want to ask the AI first what colors it’s looking at, and then to run those hex codes through a color contrast checker (or ask AI to determine if the hex codes pass WCAG standards). The part where you want a “human in the loop” is verifying the hex codes actually represent the colors shown on the page before checking them against WCAG standards. AI might interpret the colors incorrectly.
  • Friendly Messages for Non-Technical Audiences: After completing a test plan, I can use AI to transform complex testing information into a simplified message for non-technical stakeholders.

AI in Testing: The DON'Ts

Despite its benefits, I advise caution in certain testing applications:

  • New Features: While AI can offer a starting point, relying on it to test new features is risky. New features require business context, user knowledge, and team plans that AI simply doesn't have. It's best to use its output as a cautious starting point and be highly critical of it.

  • Writing Bug Reports: I've found that training an AI to write comprehensive bug reports often takes more time than just doing it manually.

  • Deciding if Something is a Bug: AI platforms might claim to identify bugs, but they lack an understanding of your specific business, users, or team's intent. This critical decision should always involve human team members.

  • Fixing Bugs as a Tester: It can be tempting to let AI fix bugs, but it can lead to prolonged debugging sessions or poorly implemented solutions that end up wasting a lot of developer review time.


AI in Test Automation: The DOs

For test automation, AI is valuable in several areas:

  • Test Framework Architecture: I've used "rules files" (like Cursor's concept) to teach AI about our bespoke test framework. This helps it stay "on the rails" and improves its output, similar to training a new employee.

  • Unit Test & API Test Generation: AI truly excels here because the blueprints (codebase definitions) are readily available, making the output deterministic and predictable.

  • Custom CI Pipelines & Reporting: Continuous Integration (CI) systems are well-documented, with tons of data available for AI to learn from. This makes it easy for AI to generate custom CI pipelines or create custom reporters, like a Slack reporter. I was able to quickly spin up an entire Playwright framework with GitHub Actions from scratch, which I think empowers junior developers who might be afraid to touch pipelines.

  • Automating "Smart Apps": I've even used AI to automate tasks in applications that were previously difficult to automate reliably, such as using AI to answer foreign language questions in Duolingo to effectively automate lessons.


AI in Test Automation: The DON'Ts

There are also areas where AI falls short in test automation:

  • Generating End-to-End Test Code: This is more challenging due to the need for browser access and complex test data setup. While tools exist, I've found it can be faster to write these tests manually, especially for non-static sites.
💡
Mere days after I gave my talk, Playwright came out with the Playwright MCP Bridge Chrome extension. I think this will address any concerns I had about the difficulty of setting up Cursor for success when “vibe-coding” E2E tests with Playwright. Highly recommend giving it a try if you haven’t heard of it yet.
  • Deciding Where to Add Test IDs: If prompted, AI tends to add test IDs to every single element, which clutters the code with unused identifiers. Even when AI doesn’t add test ids everywhere, it might add one at the wrong nesting level, or on the wrong HTML tag. Often placing a test id requires discretion and there is not always 1 correct option, but there is 1 “better” option. AI isn’t great at knowing which element that is. It's better to manually select where these are truly needed.

  • Letting AI Make Choices (Especially Pass/Fail): Allowing AI to decide if a test passes or fails creates a "black box" where you don't know the reasoning. Human oversight is crucial for understanding test outcomes.


General Advice on AI Adoption

I concluded my talk with some practical advice for anyone looking to embrace AI:

  • Don't Over-Worry About Being Left Behind: The hype can be immense, but AI hasn't been around as long as it seems. A few months of dedicated professional development can help you catch up quickly.

  • You Don't Need a Million Tools: I primarily use Cursor for my work. While niche solutions will emerge, for general UI and app development, integrated development environments (IDEs) with AI chat capabilities are often all you need.

  • AI Lacks Common Sense: Remember, AI is a "token predictor," not truly intelligent. It can contradict itself and is not a replacement for critical thought.

  • Don't Force AI Where It Doesn't Fit: It's tempting to use every new shiny tool, but sometimes AI will make your life harder, taking longer than a manual approach. It's important to recognize when to just use traditional methods.

The journey with AI is just beginning. By understanding its true capabilities and limitations, we can implement it effectively and continue to evolve our professional skills. I encourage everyone to take on an AI challenge—try a new tool, use AI for a task you've avoided, or even try to use it for something you don’t think it will succeed at (if only to question your own assumptions and explore a little). The only way to truly understand it is to use it.

About the author

No comments yet. Be the first to comment.