Member-only story

Featured

🤖“Fix with AI” Button in Playwright Reports

Step-by-Step Guide to Fixing Bugs with AI in Playwright

Shivam Bharadwaj
Syntest
6 min readJan 17, 2025

AI Fix in Test Report

End-to-end tests are essential for ensuring the reliability of your application, but they can also be a source of frustration. Even small changes to the user interface can cause tests to fail, leading developers and QA teams to spend hours troubleshooting.

In this blog post, I’ll show you how to harness the power of AI tools like ChatGPT or Copilot to automatically fix Playwright tests. You’ll learn how to create an AI prompt for any test that fails and attach it to your HTML report. This way, you can easily copy and paste the prompt into AI tools for quick suggestions on fixing the test. Join me to streamline your testing process and improve application reliability!

Let’s dive in!

If you are behind the Medium paywall and can’t read this article, click here this publication is open to everyone.

Plan

The solution comes down to three simple steps:

1. Identify when a Playwright test fails.

2. Create an AI prompt with all the necessary context:

  • The error message
  • A snippet of the test code
  • An ARIA snapshot of the page

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Syntest
Syntest

Published in Syntest

Syntest, a publication dedicated to exploring the dynamic world of Software Testing, Quality Assurance (QA), Test Automation, and the integration of Generative AI in these fields. Our goal is to provide readers with cutting-edge insights, practical techniques, and innovations

Shivam Bharadwaj
Shivam Bharadwaj

Written by Shivam Bharadwaj

Senior SDET | Passionate For Software Quality | Automation | Love sharing insights | https://www.linkedin.com/in/meetshivambharadwaj

No responses yet

What are your thoughts?

Recommended from Medium

Lists

See more recommendations