The video demonstrates how to perform end-to-end testing of a Spring Boot application using Playwright integrated with GitHub Copilot within Visual Studio Code, showcasing setup, backend verification, and real-time browser-driven user interaction tests. It highlights the seamless workflow enabled by Playwright’s Model Context Protocol, ensuring both backend functionality and user experience are thoroughly validated through automated browser tests.
The video demonstrates how to perform end-to-end testing for a Spring Boot application using Playwright integrated with GitHub Copilot, all within Visual Studio Code. It begins by setting up the necessary environment, including installing the Java Development Kit, Java extension packs, and the Spring Boot extension pack. To enable browser-based testing, the Playwright MCP extension is installed and trusted, allowing Copilot to control a real browser for testing the to-do app.
Next, the video reviews the structure of the web page, highlighting the use of stable test IDs on key elements such as the input field, add button, rows, and delete buttons. These IDs ensure precise targeting of controls without relying on visual styling. Before proceeding with browser-driven tests, the existing unit and integration tests are run through the testing view in Visual Studio Code to confirm that the backend services and Spring Web Flow are functioning correctly.
With the backend verified, the Spring Boot application is launched from the Spring Boot dashboard, making the app live on port 8080. The Playwright tools are confirmed to be active within Copilot’s agent mode, enabling Copilot to interact with the live application through a real browser. The video then shows how Copilot is prompted to perform a series of user-like actions: opening the app, verifying the page title, adding a to-do item, toggling its completion checkbox, deleting the item, and verifying that it has been removed.
The testing process is observed in real-time as Copilot executes the commands in the Playwright-controlled browser. After the test run, the video reviews the detailed trace of actions and assertions made by Playwright, confirming that each step was successfully completed and validated. This comprehensive approach ensures that the application not only passes backend tests but also behaves correctly from a user’s perspective in the browser.
Finally, the video concludes by shutting down the Spring Boot application while keeping Playwright installed for future testing sessions. It emphasizes the seamless integration of Playwright with GitHub Copilot via the Model Context Protocol, all managed within Visual Studio Code. This setup provides developers with confidence in both the code quality and the user experience, inviting viewers to consider what browser workflows they might want Copilot to test in their own applications.