Getting Started with Playwright
They are pleased to introduce Microsoft Playwright Testing, a new service that makes it simple to perform Playwright tests at scale. For contemporary online applications, Playwright, a rapidly expanding open-source platform, allows trustworthy end-to-end testing and automation. Microsoft Playwright Testing is a fully managed service that makes advantage of the cloud to let you execute Playwright tests in several operating system-browser combinations at once with substantially better parallelization. This enables quicker test runs with more scenario coverage, which speeds up feature delivery without compromising on quality.
Quicker access to test suite results
Your web app experiences will continue to function as expected as the project develops if Playwright tests are included to your continuous integration (CI) strategy. However, as the program becomes more complicated, so does the size of the test suite needed to do thorough testing across a variety of operating systems and browsers. This results in lengthier test suite completion times, which might delay the release of your feature.
Already under pressure to swiftly roll out app updates are development teams. It is standard practice for development teams to run just a limited fraction of tests in order to avoid lengthy wait periods for test completion. In a worst case situation, a team can decide to run tests sporadically, such as once or twice a week in an integration environment rather than after each pull request. This method could make it more difficult to identify the root of problems, postpone finding them, and have a negative impact on the development team’s total output.
Your tests run in distinct, parallel worker processes using the @playwright/test runner, and each process launches a separate browser. The time required to perform the whole test suite may be decreased by increasing the number of parallel workers. Using the command line, you may modify the number of employees.
npx playwright test –workers=4
However, you are limited by the number of central processing unit (CPU) cores on your local system or CI agent machine whether you run tests locally or in your CI pipeline. The gradual addition of additional workers will eventually cause resource contention, which will slow down each worker and cause test flakiness.You may significantly expand the number of employees at cloud-scale by utilizing the Microsoft Playwright Testing service. While the resource-intensive browser instances now operate in the cloud, the worker processes managed by @playwright/test are still running locally.
Across all operating systems and browser combinations, consistent test results
The size of the test suite isn’t just influenced by the complexity of the app. Modern online applications must function seamlessly across a wide range of browsers, devices, and operating systems. The time it takes to execute your test suite grows as you test against all of these factors. Utilizing the scalable parallelism offered by the service, Microsoft Playwright Testing allows you to run these tests concurrently across all current rendering engines. This contains mobile emulation of Google Chrome for Android and Mobile Safari, as well as Chromium, WebKit, and Firefox for Windows, Linux, and mobile.
Additionally, regardless of whether tests are executed from your CI pipeline or a development workstation, the service-managed browsers provide consistent and dependable results for both functional and visual regression testing. The experience for each user, regardless of browser or operating system, is optimized thanks to our thorough cross-compatibility testing, which helps guarantee your web app offers consistent speed and functionality across all platforms.
No need to modify test code
Starting Microsoft Playwright Testing is simple if you already use Playwright! No modifications to the test code already in place are necessary since the service is designed to interact smoothly with your Playwright test suite. You may link your test suite to the service and take use of cloud-powered parallel testing to its fullest extent in just a few simple steps. Additionally, the service works with many versions of Playwright and upgrades with each new Playwright release, guaranteeing that your tests are performed using the most recent browsers and technological advancements and maintaining the robustness, security, and usability of your app. With the stress of overseeing a complicated test infrastructure gone, you can concentrate on rigorous application testing.