Marlene Mhangami: Playwright for Functionality Testing

Marlene Mhangami from Microsoft and GitHub discusses leveraging Playwright and AI agents for effective functionality testing, emphasizing clean code and behavior-driven development.

Marlene Mhangami presenting 'Beyond Code Coverage: Functionality Testing with Playwright'
Image credit: AI Engineer· AI Engineer
Visual TL;DR
Code Volume SurgeDriver
From the articleShe highlighted the increasing volume of code being created, citing GitHub's Octoverse report which showed over a billion commits in 2020 and projected growth to 14 billion by 2025.
Code Coverage InsufficientDriver
From the article 3 mentionsMhangami began by setting the stage, emphasizing that while code coverage is a common metric, it doesn't guarantee that software functions as expected from a user's perspective.
Functionality Testing NeedContext
robust strategies are crucial given increasing development volume
From the article 3 mentionsThis surge in development underscores the need for robust testing strategies.
Playwright & AI AgentsCore
Marlene Mhangami's focus for effective testing
From the article 7 mentionsThe demo showcased how an AI agent could be used to interact with the Playwright CLI to generate and run tests based on feature requests.
Clean Code PracticesContext
emphasized for better testability and maintainability
From the articleMhangami presented a case study that illustrated how unchecked AI adoption, without a focus on clean code, could lead to increased entropy and a decrease in code quality, despite a rise in pull requests.
Behavior-Driven DevelopmentContext
integrated approach for aligning tests with user needs
From the article 5 mentionsA key theme of the presentation was the impact of engineering environments on AI-assisted development.
AI for ProductivityEffect
leveraging AI agents to enhance developer workflows
From the article 3 mentionsMhangami presented a slide that suggested a strong correlation between a clean engineering environment and increased AI productivity gains.
Effective Functionality TestingOutcome
achieved through Playwright and AI integration
From the article 2 mentionsThe presentation underscored the growing synergy between AI and software development, particularly in ensuring the quality and functionality of applications through effective testing strategies with tools like Playwright.
Contents(4)

Marlene Mhangami, a Senior Developer Advocate at both Microsoft and GitHub, recently delivered a presentation titled "Beyond Code Coverage: Functionality Testing with Playwright." Mhangami, who works within the Core AI group focusing on developer productivity, shared insights into how AI can be integrated into software development workflows, particularly in the realm of testing.

Marlene Mhangami: Playwright for Functionality Testing - AI Engineer
Marlene Mhangami: Playwright for Functionality Testing, AI Engineer

The Role of Functionality Testing

Mhangami began by setting the stage, emphasizing that while code coverage is a common metric, it doesn't guarantee that software functions as expected from a user's perspective. She highlighted the increasing volume of code being created, citing GitHub's Octoverse report which showed over a billion commits in 2020 and projected growth to 14 billion by 2025. This surge in development underscores the need for robust testing strategies.

A key theme of the presentation was the impact of engineering environments on AI-assisted development. Mhangami presented a slide that suggested a strong correlation between a clean engineering environment and increased AI productivity gains. She explained that AI thrives in environments with good test coverage, modularity, and well-written code, allowing it to more effectively assist developers in completing tasks and improving software quality.

AI's Impact on Developer Productivity

The presentation explored the question of whether AI truly makes developers more productive. Mhangami presented a case study that illustrated how unchecked AI adoption, without a focus on clean code, could lead to increased entropy and a decrease in code quality, despite a rise in pull requests. This highlighted the importance of a structured approach to integrating AI tools.

Conversely, she suggested that when AI is used effectively within a clean, well-maintained codebase, it can amplify productivity. This involves leveraging AI for tasks like generating tests, writing code, and even refactoring. Mhangami touched upon the concept of Test-Driven Development (TDD), explaining the typical Red-Green-Refactor loop and noting that AI can assist in each stage, from generating initial failing tests to refactoring code to meet requirements.

Playwright for Functionality Testing

Mhangami then introduced Playwright, an open-source testing framework developed by Microsoft. She described Playwright as a tool that automates end-to-end testing in the browser by simulating user interactions. Playwright supports multiple programming languages, including Python, TypeScript, and C#, and can run tests in both headed and headless modes. The demo showcased how an AI agent could be used to interact with the Playwright CLI to generate and run tests based on feature requests.

The demonstration involved a scenario where an AI agent, provided with a feature request email, was able to identify the necessary tests, write Playwright scripts to execute them, and report on their success. This illustrated the potential for AI to significantly speed up the test writing process and ensure that features function as intended.

Best Practices for AI-assisted testing

Mhangami concluded by offering best practices for developers looking to leverage AI in their testing workflows:

  • Add screenshots to Pull Requests (PRs): This provides visual context for code changes and test results.
  • Use headless mode for multi-tasking: Headless mode allows for running tests in the background without opening a browser window, enabling more efficient parallel execution.
  • Commit before running the 'Healer': This implies a workflow where code is committed before using AI tools to fix or refactor it, ensuring a stable baseline.
  • Generate tests one feature at a time: This approach helps maintain focus and manage complexity when working with AI-generated tests.

The presentation underscored the growing synergy between AI and software development, particularly in ensuring the quality and functionality of applications through effective testing strategies with tools like Playwright.

© 2026 StartupHub.ai. All rights reserved. You may not republish this article in full without a license. Search engines and AI research tools may crawl and summarize for reference. Bulk reproduction or model training requires a license. See our terms.
Daniel Singer

Written by

Daniel Singer

Editor, StartupHub.ai

Daniel Singer is the editor of StartupHub.ai, a technology expert and thought leader on AI and its applications across sectors, from fintech and healthcare to developer tooling and consumer software. He writes and tests the tools covered here thoroughly and regularly, and built StartupHub.ai to give founders, operators and buyers a clearer read on what they are actually being sold.