diff --git a/blog/testplane-vs-playwright.mdx b/blog/testplane-vs-playwright.mdx new file mode 100644 index 0000000..ea2545f --- /dev/null +++ b/blog/testplane-vs-playwright.mdx @@ -0,0 +1,184 @@ +--- +title: "Testplane vs Playwright: Полное сравнение инструментов для автоматизации тестирования" +description: "Детальное сравнение Testplane и Playwright: преимущества, недостатки и рекомендации по выбору подходящего инструмента для проекта" +slug: testplane-vs-playwright +hide_table_of_contents: false +date: 2025-11-10T17:00 +--- + +import Admonition from "@theme/Admonition"; + +# Testplane vs Playwright: Полное сравнение инструментов для автоматизации тестирования + +И **Testplane**, и **Playwright** — это решения для end-to-end тестирования, но они имеют разные подходы и возможности. В этой статье мы проведём детальное сравнение этих инструментов, чтобы помочь вам сделать правильный выбор. + +## Краткий обзор инструментов + +**Testplane** — это инструмент для автоматизации тестирования веб-приложений, разработанный командой Яндекса. Он активно используется как в крупных, так и в небольших проектах компании и поддерживает широкий спектр браузеров и устройств. + +**Playwright** — инструмент от Microsoft, который быстро завоевал популярность благодаря своей простоте использования и современному подходу к автоматизации. + +## Ключевые различия + +### Поддержка браузеров и мобильных устройств + + + Testplane поддерживает как десктопные браузеры, так и мобильные устройства + + +Одним из ключевых преимуществ Testplane является его универсальность в работе с десктопными браузерами и мобильными устройствами. В отличие от Playwright, который фокусируется на современных десктопных браузерах последних версий, Testplane предоставляет полноценную поддержку как старых, так и новых версий браузеров. +Это важно для компаний, которые работают с пользователями, использующими устаревшие браузеры. Полное сравнение двух подходов можно посмотреть в таблице ниже: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
**Критерий****Testplane****Playwright****Почему это важно**
Источник браузеровОригинальные бинарники от браузерных вендоровКастомные сборкиМаксимальная приближённость к реальным устройствам
Версии браузеровЛюбые — от legacy до новейшихВерсия браузера привязана к версии Playwright + Одновременное покрытие пользователей как на новых, так и на устаревших браузерах +
Мобильные устройстваAndroid и iOS: браузеры + нативные приложенияНетЕдиный стек для десктопа и мобильных устройств
Удаленный гридSelenium Grid/Selenoid/BrowserStack/SauceLabs (любой удаленный грид) + Официально — платный Microsoft Playwright Testing; Удаленный грид — с помощью хака, + без гарантий + Масштабируемость и использование своего грида
ПротоколыCDP; WebDriver (W3C); WebDriver BiDiСобственный кастомный протокол; CDP (Chromium); WebDriver — нетСовместимость с браузерами и гибкость интеграций
+ +### Визуальное тестирование + + + Testplane предлагает продвинутые возможности для визуального тестирования + + +В области визуального (скриншотного) тестирования Testplane демонстрирует явное превосходство над Playwright. +Под капотом инструмент использует собственную библиотеку [looks-same][looks-same] для сравнения скриншотов, которая [быстрее][looks-same-benchmarks] и точнее текущих конкурентов: + +- Ожидание загрузки элементов перед скриншотом, чтобы исключить нестабильность в тесте; +- Отключение анимации на странице; +- Гибкая настройка чувствительности скриншотного тестирования — [tolerance][tolerance], [anti-aliasing tolerance][anti-aliasing-tolerance], игнорирование фиксированного количества пикселей; +- Используется 3 уровня сравнения для оптимизации скорости; +- Разнообразные [виды визуализации различий между скриншотами][report-visual-testing] для удобной отладки, в т.ч. и подсветка мелких диффов; +- Игнорирование элементов на скриншоте при необходимости. + +Testplane предоставляет удобный [интерфейс][reporter] для массового принятия скриншотов, что ускоряет процесс обновления эталонных изображений. +Также, если в проекте пользователя настроен [Storybook][storybook], то Testplane предоставляет [автоматическую генерацию скриншотных тестов][storybook-autotests], что позволяет быстро покрыть визуальными проверками все компоненты проекта **без написания кода**. + +Playwright предлагает лишь базовую поддержку скриншотного тестирования с ограниченными возможностями и менее удобным интерфейсом для работы со скриншотами. Это делает его менее подходящим для проектов, где важно визуальное тестирование. + +### Отчет для работы с тестами + + + У Testplane есть мощный UI для работы с тестами в самых различных сценариях + + +Testplane имеет графический интерфейс, который не просто показывает результаты выполнения ваших тестов, но и предоставляет широкие возможности для работы с ними. + +Этот отчет прекрасно подходит как для локальной работы, так и для использования в CI. Он предлагает единый интерфейс для выполнения различных задач: + +- Запуск тестов непосредственно из UI; +- Отладка с помощью [Time Travel][time-travel] (пошагового воспроизведения тестов); +- Анализ производительности тестов; +- Обновление эталонных изображений при скриншотном тестировании; +- Объединение нескольких отчетов в один; +- Повторное использование результатов из CI. + +Особенно важно, что отчёт Testplane способен эффективно работать с тысячами тестов, не теряя производительности. А система плагинов позволяет кастомизировать отчёты под специфические потребности команды. + +Со всеми возможностями отчета можно ознакомиться в разделе [UI][reporter] сайта https://testplane.io. + +### Взаимодействие с ИИ + + + Testplane MPC помогает ИИ-агентам писать стабильные новые тесты и чинить существующие + + +[Testplane MCP][testplane-mcp] — это инструмент, который позволяет ИИ-агентам погрузиться в контекст того, что происходит в браузере, выполнять действия и создавать или чинить тесты, основываясь на реальном состоянии страницы. +С помощью Testplane MCP пользователи могут не только создавать рабочие и стабильные тесты, но и быстро исправлять уже существующие. Testplane MPC позволяет подключиться к браузеру в ходе выполнения вашего теста, чтобы отладить или изменить его. Это значительно сокращает время, затрачиваемое на исправление нестабильных тестов. +Кроме того, Testplane MCP предоставляет возможность запускать браузер в режиме эмуляции мобильных устройств. Например, можно сказать "Открой страницу example.com с помощью Testplane MCP на iPhone 15" или указать явно какой User Agent нужно указать при создании браузерной сессии. + +### Расширяемость и интеграции + +Testplane предоставляет больше возможностей для кастомизации + +Архитектура Testplane построена с учётом потребностей в кастомизации и интеграции. Богатая [событийная модель](/docs/v8/reference/testplane-events) предоставляет множество точек расширения, позволяя разработчикам внедрять собственную логику на любом этапе выполнения тестов. Это особенно важно для проектов, где требуется интеграция с внутренними системами мониторинга, отчётности и управления качеством. +Также Testplane предоставляет JS API, которое позволяет создавать собственные раннеры, адаптированные под специфические потребности проекта. + +Playwright, несмотря на свою популярность, предлагает меньше точек расширения и требует самостоятельной разработки большинства интеграций. Это увеличивает время на внедрение и поддержку инструмента в корпоративной среде. + +### Масштабирование и производительность + +Testplane проверен на крупных проектах с миллионами тестов + +Архитектура Testplane изначально проектировалась для работы с большими объёмами тестов, что обеспечивает стабильную работу даже при значительном росте тестового покрытия. Это особенно важно для долгосрочных проектов, где количество тестов постоянно увеличивается. +Поддержка удалённого грида браузеров (например, BrowserStack, SauceLabs и т.д.) позволяет эффективно распределять выполнение тестов по множеству машин, обеспечивая быстрое выполнение даже очень больших тестовых наборов. +Также Testplane позволяет масштабировать запуски за счет шардирования, запуская тесты на разных машинах. При этом, в результате пользователю будет предоставлен единый отчет с результатами пройденных тестов. + +Playwright также имеет возможности для масштабирования в виде шардирования из коробки. Масштабирование за счет удаленного грида предоставляется только в виде платного сервиса [Microsoft Playwright Testing][mpt]. + +### Обновления и стабильность + +Testplane обеспечивает высокую стабильность благодаря продуманному подходу к управлению зависимостями. Обновления инструмента полностью отвязаны от обновлений браузеров, что позволяет командам контролировать процесс миграции и избегать неожиданных поломок в CI/CD пайплайнах. Использование стабильных версий браузеров минимизирует количество проблем с переснятием скриншотов, что особенно важно для проектов с большим количеством визуальных тестов. +Такой подход обеспечивает предсказуемость поведения тестов и снижает затраты на поддержку инфраструктуры тестирования. Команды могут планировать обновления браузеров независимо от обновлений самого инструмента тестирования, что даёт больше гибкости в управлении техническим долгом. + +Playwright же связывает обновления инструмента с обновлениями браузеров, что может приводить к неожиданным изменениям в поведении тестов. Это создаёт дополнительную нагрузку на команды разработки, которым приходится чаще пересматривать и обновлять скриншоты, особенно в проектах с активной разработкой интерфейса. + +## Рекомендации по выбору + +### Выбирайте Playwright, если: + +✅ Достаточно тестирования только в самых последних десктопных браузерах\ +✅ Уверены, что не потребуется поддержка старых версий браузеров\ +✅ Не нужно визуальное тестирование + +### Выбирайте Testplane, если: + +✅ Важно визуальное тестирование с удобным отчётом\ +✅ В будущем потребуется масштабирование\ +✅ Важна кастомизация под специфические нужды\ +✅ Необходимо тестирование в широком спектре десктопных браузеров и мобильных устройств\ +✅ Требуется тестирование нативных приложений Android и iOS + +[anti-aliasing-tolerance]: https://testplane.io/docs/v8/config/browsers/#antialiasing_tolerance +[looks-same]: https://github.com/gemini-testing/looks-same +[looks-same-benchmarks]: https://github.com/gemini-testing/looks-same/blob/master/benchmark/results.md +[mpt]: https://learn.microsoft.com/en-us/azure/playwright-testing/ +[report-visual-testing]: https://testplane.io/docs/v8/html-reporter/overview/#superb-visual-testing-capabilities +[reporter]: https://testplane.io/docs/v8/html-reporter/overview/ +[storybook]: https://storybook.js.org +[storybook-autotests]: https://testplane.io/docs/v8/visual-testing/with-storybook/ +[testplane-mcp]: https://testplane.io/ru/docs/v8/testplane-mcp/ +[tolerance]: https://testplane.io/docs/v8/config/browsers/#tolerance +[time-travel]: https://testplane.io/ru/docs/v8/guides/time-travel/ diff --git a/docs/comparison/compare-with-playwright.mdx b/docs/comparison/compare-with-playwright.mdx new file mode 100644 index 0000000..767fdf9 --- /dev/null +++ b/docs/comparison/compare-with-playwright.mdx @@ -0,0 +1,170 @@ +import Admonition from "@theme/Admonition"; + +# Compare Testplane with Playwright + +Both **Testplane** and **Playwright** are end-to-end testing solutions, but they have different approaches and capabilities. In this article, we'll conduct a detailed comparison of these tools to help you make the right choice. + +## Brief Tool Overview + +**Testplane** is a web application test automation tool developed by the Yandex team. It is actively used in both large and small company projects and supports a wide range of browsers and devices. + +**Playwright** is a tool from Microsoft that has quickly gained popularity due to its ease of use and modern approach to automation. + +## Key Differences + +### Browser and Mobile Device Support + +Testplane supports both desktop browsers and mobile devices + +One of Testplane's key advantages is its versatility in working with desktop browsers and mobile devices. Unlike Playwright, which focuses on modern desktop browsers of the latest versions, Testplane provides full support for both old and new browser versions. +This is important for companies that work with users using outdated browsers. A complete comparison of the two approaches can be seen in the table below: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
**Criteria****Testplane****Playwright****Why It Matters**
Browser SourceOriginal binaries from browser vendorsCustom buildsMaximum proximity to real devices
Browser VersionsAny — from legacy to latestBrowser version tied to Playwright versionSimultaneous coverage of users on both new and outdated browsers
Mobile DevicesAndroid and iOS: browsers + native applicationsNoUnified stack for desktop and mobile devices
Remote GridSelenium Grid/Selenoid/BrowserStack/SauceLabs (any remote grid) + Officially — paid Microsoft Playwright Testing; Remote grid — through hacks, without + guarantees + Scalability and using your own grid
ProtocolsCDP; WebDriver (W3C); WebDriver BiDiCustom proprietary protocol; CDP (Chromium); WebDriver — noBrowser compatibility and integration flexibility
+ +### Visual Testing + +Testplane offers advanced visual testing capabilities + +In the area of visual (screenshot) testing, Testplane demonstrates clear superiority over Playwright. +Under the hood, the tool uses its own [looks-same][looks-same] library for screenshot comparison, which is [faster][looks-same-benchmarks] and more accurate than current competitors: + +- Waiting for elements to load before taking screenshots to eliminate test instability; +- Disabling animations on the page; +- Flexible configuration of screenshot testing sensitivity — [tolerance][tolerance], [anti-aliasing tolerance][anti-aliasing-tolerance], ignoring a fixed number of pixels; +- Uses 3 levels of comparison for speed optimization; +- Various [types of visualization of differences between screenshots][report-visual-testing] for convenient debugging, including highlighting small diffs; +- Ignoring elements in screenshots when necessary. + +Testplane provides a convenient [interface][reporter] for bulk screenshot acceptance, which speeds up the process of updating reference images. +Also, if [Storybook][storybook] is configured in the user's project, Testplane provides [automatic generation of screenshot tests][storybook-autotests], which allows you to quickly cover all project components with visual checks **without writing code**. + +Playwright offers only basic screenshot testing support with limited capabilities and a less convenient interface for working with screenshots. This makes it less suitable for projects where visual testing is important. + +### Test Report Interface + + + Testplane has a powerful UI for working with tests in various scenarios + + +Testplane has a graphical interface that not only shows the results of your test execution but also provides extensive capabilities for working with them. + +This report is perfect for both local work and use in CI. It offers a unified interface for performing various tasks: + +- Running tests directly from the UI; +- Debugging with [Time Travel][time-travel] (step-by-step test replay); +- Test performance analysis; +- Updating reference images in screenshot testing; +- Merging multiple reports into one; +- Reusing results from CI. + +It's especially important that Testplane's report can efficiently work with thousands of tests without losing performance. The plugin system allows customizing reports for specific team needs. + +You can explore all report capabilities in the [UI][reporter] section of the https://testplane.io website. + +### AI Integration + + + Testplane MCP helps AI agents write stable new tests and fix existing ones + + +[Testplane MCP][testplane-mcp] is a tool that allows AI agents to immerse themselves in the context of what's happening in the browser, perform actions, and create or fix tests based on the real state of the page. +With Testplane MCP, users can not only create working and stable tests but also quickly fix existing ones. Testplane MCP allows connecting to the browser during your test execution to debug or modify it. This significantly reduces the time spent fixing unstable tests. +Additionally, Testplane MCP provides the ability to run the browser in mobile device emulation mode. For example, you can say "Open example.com page using Testplane MCP on iPhone 15" or explicitly specify which User Agent should be used when creating a browser session. + +### Extensibility and Integrations + +Testplane provides more customization capabilities + +Testplane's architecture is built with customization and integration needs in mind. The rich [event model](/docs/v8/reference/testplane-events) provides numerous extension points, allowing developers to inject their own logic at any stage of test execution. This is especially important for projects that require integration with internal monitoring, reporting, and quality management systems. +Testplane also provides a JS API that allows creating custom runners adapted to specific project needs. + +Playwright, despite its popularity, offers fewer extension points and requires independent development of most integrations. This increases the time for implementation and maintenance of the tool in a corporate environment. + +### Scaling and Performance + +Testplane is proven on large projects with millions of tests + +Testplane's architecture was initially designed to work with large volumes of tests, ensuring stable operation even with significant growth in test coverage. This is especially important for long-term projects where the number of tests constantly increases. +Support for remote browser grids (e.g., BrowserStack, SauceLabs, etc.) allows efficient distribution of test execution across multiple machines, ensuring fast execution even of very large test suites. +Testplane also allows scaling runs through sharding, running tests on different machines. As a result, the user will be provided with a unified report with the results of passed tests. + +Playwright also has scaling capabilities in the form of out-of-the-box sharding. Scaling through remote grid is provided only as a paid service [Microsoft Playwright Testing][mpt]. + +### Updates and Stability + +Testplane ensures high stability through a thoughtful approach to dependency management. Tool updates are completely decoupled from browser updates, allowing teams to control the migration process and avoid unexpected failures in CI/CD pipelines. Using stable browser versions minimizes screenshot retaking issues, which is especially important for projects with many visual tests. +This approach ensures predictable test behavior and reduces testing infrastructure maintenance costs. Teams can plan browser updates independently of the testing tool updates, providing more flexibility in managing technical debt. + +Playwright links tool updates with browser updates, which can lead to unexpected changes in test behavior. This creates additional burden on development teams who have to more frequently review and update screenshots, especially in projects with active interface development. + +## Selection Recommendations + +### Choose Playwright if: + +✅ Testing only in the latest desktop browsers is sufficient\ +✅ You're confident that support for old browser versions won't be needed\ +✅ Visual testing is not required + +### Choose Testplane if: + +✅ Visual testing with convenient reporting is important\ +✅ Future scaling will be required\ +✅ Customization for specific needs is important\ +✅ Testing across a wide range of desktop browsers and mobile devices is necessary\ +✅ Testing of native Android and iOS applications is required + +[anti-aliasing-tolerance]: https://testplane.io/docs/v8/config/browsers/#antialiasing_tolerance +[looks-same]: https://github.com/gemini-testing/looks-same +[looks-same-benchmarks]: https://github.com/gemini-testing/looks-same/blob/master/benchmark/results.md +[mpt]: https://learn.microsoft.com/en-us/azure/playwright-testing/ +[report-visual-testing]: https://testplane.io/docs/v8/html-reporter/overview/#superb-visual-testing-capabilities +[reporter]: https://testplane.io/docs/v8/html-reporter/overview/ +[storybook]: https://storybook.js.org +[storybook-autotests]: https://testplane.io/docs/v8/visual-testing/with-storybook/ +[testplane-mcp]: https://testplane.io/docs/v8/testplane-mcp/ +[tolerance]: https://testplane.io/docs/v8/config/browsers/#tolerance +[time-travel]: https://testplane.io/docs/v8/guides/time-travel/ diff --git a/i18n/en/docusaurus-plugin-content-blog/testplane-vs-playwright.mdx b/i18n/en/docusaurus-plugin-content-blog/testplane-vs-playwright.mdx new file mode 100644 index 0000000..81d502c --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-blog/testplane-vs-playwright.mdx @@ -0,0 +1,178 @@ +--- +title: "Testplane vs Playwright: Complete Comparison of Test Automation Tools" +description: "Detailed comparison of Testplane and Playwright: advantages, disadvantages, and recommendations for choosing the right tool for your project" +slug: testplane-vs-playwright +hide_table_of_contents: false +date: 2025-11-10T17:00 +--- + +import Admonition from "@theme/Admonition"; + +# Testplane vs Playwright: Complete Comparison of Test Automation Tools + +Both **Testplane** and **Playwright** are end-to-end testing solutions, but they have different approaches and capabilities. In this article, we'll conduct a detailed comparison of these tools to help you make the right choice. + +## Brief Tool Overview + +**Testplane** is a web application test automation tool developed by the Yandex team. It is actively used in both large and small company projects and supports a wide range of browsers and devices. + +**Playwright** is a tool from Microsoft that has quickly gained popularity due to its ease of use and modern approach to automation. + +## Key Differences + +### Browser and Mobile Device Support + +Testplane supports both desktop browsers and mobile devices + +One of Testplane's key advantages is its versatility in working with desktop browsers and mobile devices. Unlike Playwright, which focuses on modern desktop browsers of the latest versions, Testplane provides full support for both old and new browser versions. +This is important for companies that work with users using outdated browsers. A complete comparison of the two approaches can be seen in the table below: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
**Criteria****Testplane****Playwright****Why It Matters**
Browser SourceOriginal binaries from browser vendorsCustom buildsMaximum proximity to real devices
Browser VersionsAny — from legacy to latestBrowser version tied to Playwright versionSimultaneous coverage of users on both new and outdated browsers
Mobile DevicesAndroid and iOS: browsers + native applicationsNoUnified stack for desktop and mobile devices
Remote GridSelenium Grid/Selenoid/BrowserStack/SauceLabs (any remote grid) + Officially — paid Microsoft Playwright Testing; Remote grid — through hacks, without + guarantees + Scalability and using your own grid
ProtocolsCDP; WebDriver (W3C); WebDriver BiDiCustom proprietary protocol; CDP (Chromium); WebDriver — noBrowser compatibility and integration flexibility
+ +### Visual Testing + +Testplane offers advanced visual testing capabilities + +In the area of visual (screenshot) testing, Testplane demonstrates clear superiority over Playwright. +Under the hood, the tool uses its own [looks-same][looks-same] library for screenshot comparison, which is [faster][looks-same-benchmarks] and more accurate than current competitors: + +- Waiting for elements to load before taking screenshots to eliminate test instability; +- Disabling animations on the page; +- Flexible configuration of screenshot testing sensitivity — [tolerance][tolerance], [anti-aliasing tolerance][anti-aliasing-tolerance], ignoring a fixed number of pixels; +- Uses 3 levels of comparison for speed optimization; +- Various [types of visualization of differences between screenshots][report-visual-testing] for convenient debugging, including highlighting small diffs; +- Ignoring elements in screenshots when necessary. + +Testplane provides a convenient [interface][reporter] for bulk screenshot acceptance, which speeds up the process of updating reference images. +Also, if [Storybook][storybook] is configured in the user's project, Testplane provides [automatic generation of screenshot tests][storybook-autotests], which allows you to quickly cover all project components with visual checks **without writing code**. + +Playwright offers only basic screenshot testing support with limited capabilities and a less convenient interface for working with screenshots. This makes it less suitable for projects where visual testing is important. + +### Test Report Interface + + + Testplane has a powerful UI for working with tests in various scenarios + + +Testplane has a graphical interface that not only shows the results of your test execution but also provides extensive capabilities for working with them. + +This report is perfect for both local work and use in CI. It offers a unified interface for performing various tasks: + +- Running tests directly from the UI; +- Debugging with [Time Travel][time-travel] (step-by-step test replay); +- Test performance analysis; +- Updating reference images in screenshot testing; +- Merging multiple reports into one; +- Reusing results from CI. + +It's especially important that Testplane's report can efficiently work with thousands of tests without losing performance. The plugin system allows customizing reports for specific team needs. + +You can explore all report capabilities in the [UI][reporter] section of the https://testplane.io website. + +### AI Integration + + + Testplane MCP helps AI agents write stable new tests and fix existing ones + + +[Testplane MCP][testplane-mcp] is a tool that allows AI agents to immerse themselves in the context of what's happening in the browser, perform actions, and create or fix tests based on the real state of the page. +With Testplane MCP, users can not only create working and stable tests but also quickly fix existing ones. Testplane MCP allows connecting to the browser during your test execution to debug or modify it. This significantly reduces the time spent fixing unstable tests. +Additionally, Testplane MCP provides the ability to run the browser in mobile device emulation mode. For example, you can say "Open example.com page using Testplane MCP on iPhone 15" or explicitly specify which User Agent should be used when creating a browser session. + +### Extensibility and Integrations + +Testplane provides more customization capabilities + +Testplane's architecture is built with customization and integration needs in mind. The rich [event model](/docs/v8/reference/testplane-events) provides numerous extension points, allowing developers to inject their own logic at any stage of test execution. This is especially important for projects that require integration with internal monitoring, reporting, and quality management systems. +Testplane also provides a JS API that allows creating custom runners adapted to specific project needs. + +Playwright, despite its popularity, offers fewer extension points and requires independent development of most integrations. This increases the time for implementation and maintenance of the tool in a corporate environment. + +### Scaling and Performance + +Testplane is proven on large projects with millions of tests + +Testplane's architecture was initially designed to work with large volumes of tests, ensuring stable operation even with significant growth in test coverage. This is especially important for long-term projects where the number of tests constantly increases. +Support for remote browser grids (e.g., BrowserStack, SauceLabs, etc.) allows efficient distribution of test execution across multiple machines, ensuring fast execution even of very large test suites. +Testplane also allows scaling runs through sharding, running tests on different machines. As a result, the user will be provided with a unified report with the results of passed tests. + +Playwright also has scaling capabilities in the form of out-of-the-box sharding. Scaling through remote grid is provided only as a paid service [Microsoft Playwright Testing][mpt]. + +### Updates and Stability + +Testplane ensures high stability through a thoughtful approach to dependency management. Tool updates are completely decoupled from browser updates, allowing teams to control the migration process and avoid unexpected failures in CI/CD pipelines. Using stable browser versions minimizes screenshot retaking issues, which is especially important for projects with many visual tests. +This approach ensures predictable test behavior and reduces testing infrastructure maintenance costs. Teams can plan browser updates independently of the testing tool updates, providing more flexibility in managing technical debt. + +Playwright links tool updates with browser updates, which can lead to unexpected changes in test behavior. This creates additional burden on development teams who have to more frequently review and update screenshots, especially in projects with active interface development. + +## Selection Recommendations + +### Choose Playwright if: + +✅ Testing only in the latest desktop browsers is sufficient\ +✅ You're confident that support for old browser versions won't be needed\ +✅ Visual testing is not required + +### Choose Testplane if: + +✅ Visual testing with convenient reporting is important\ +✅ Future scaling will be required\ +✅ Customization for specific needs is important\ +✅ Testing across a wide range of desktop browsers and mobile devices is necessary\ +✅ Testing of native Android and iOS applications is required + +[anti-aliasing-tolerance]: https://testplane.io/docs/v8/config/browsers/#antialiasing_tolerance +[looks-same]: https://github.com/gemini-testing/looks-same +[looks-same-benchmarks]: https://github.com/gemini-testing/looks-same/blob/master/benchmark/results.md +[mpt]: https://learn.microsoft.com/en-us/azure/playwright-testing/ +[report-visual-testing]: https://testplane.io/docs/v8/html-reporter/overview/#superb-visual-testing-capabilities +[reporter]: https://testplane.io/docs/v8/html-reporter/overview/ +[storybook]: https://storybook.js.org +[storybook-autotests]: https://testplane.io/docs/v8/visual-testing/with-storybook/ +[testplane-mcp]: https://testplane.io/docs/v8/testplane-mcp/ +[tolerance]: https://testplane.io/docs/v8/config/browsers/#tolerance +[time-travel]: https://testplane.io/docs/v8/guides/time-travel/ diff --git a/i18n/ru/docusaurus-plugin-content-docs/current.json b/i18n/ru/docusaurus-plugin-content-docs/current.json index 293a62c..56ad4a6 100644 --- a/i18n/ru/docusaurus-plugin-content-docs/current.json +++ b/i18n/ru/docusaurus-plugin-content-docs/current.json @@ -58,5 +58,9 @@ "sidebar.mainSidebar.doc.CLI": { "message": "CLI", "description": "The label for the doc item Command Line in sidebar mainSidebar, linking to the doc command-line/index" + }, + "sidebar.mainSidebar.category.Сomparison": { + "message": "Сравнение", + "description": "The label for category Comparison in sidebar mainSidebar" } } diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/comparison/compare-with-playwright.mdx b/i18n/ru/docusaurus-plugin-content-docs/current/comparison/compare-with-playwright.mdx new file mode 100644 index 0000000..5321ea3 --- /dev/null +++ b/i18n/ru/docusaurus-plugin-content-docs/current/comparison/compare-with-playwright.mdx @@ -0,0 +1,176 @@ +import Admonition from "@theme/Admonition"; + +# Сравнение Testplane с Playwright + +И **Testplane**, и **Playwright** — это решения для end-to-end тестирования, но они имеют разные подходы и возможности. В этой статье мы проведём детальное сравнение этих инструментов, чтобы помочь вам сделать правильный выбор. + +## Краткий обзор инструментов + +**Testplane** — это инструмент для автоматизации тестирования веб-приложений, разработанный командой Яндекса. Он активно используется как в крупных, так и в небольших проектах компании и поддерживает широкий спектр браузеров и устройств. + +**Playwright** — инструмент от Microsoft, который быстро завоевал популярность благодаря своей простоте использования и современному подходу к автоматизации. + +## Ключевые различия + +### Поддержка браузеров и мобильных устройств + + + Testplane поддерживает как десктопные браузеры, так и мобильные устройства + + +Одним из ключевых преимуществ Testplane является его универсальность в работе с десктопными браузерами и мобильными устройствами. В отличие от Playwright, который фокусируется на современных десктопных браузерах последних версий, Testplane предоставляет полноценную поддержку как старых, так и новых версий браузеров. +Это важно для компаний, которые работают с пользователями, использующими устаревшие браузеры. Полное сравнение двух подходов можно посмотреть в таблице ниже: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
**Критерий****Testplane****Playwright****Почему это важно**
Источник браузеровОригинальные бинарники от браузерных вендоровКастомные сборкиМаксимальная приближённость к реальным устройствам
Версии браузеровЛюбые — от legacy до новейшихВерсия браузера привязана к версии Playwright + Одновременное покрытие пользователей как на новых, так и на устаревших браузерах +
Мобильные устройстваAndroid и iOS: браузеры + нативные приложенияНетЕдиный стек для десктопа и мобильных устройств
Удаленный гридSelenium Grid/Selenoid/BrowserStack/SauceLabs (любой удаленный грид) + Официально — платный Microsoft Playwright Testing; Удаленный грид — с помощью хака, + без гарантий + Масштабируемость и использование своего грида
ПротоколыCDP; WebDriver (W3C); WebDriver BiDiСобственный кастомный протокол; CDP (Chromium); WebDriver — нетСовместимость с браузерами и гибкость интеграций
+ +### Визуальное тестирование + + + Testplane предлагает продвинутые возможности для визуального тестирования + + +В области визуального (скриншотного) тестирования Testplane демонстрирует явное превосходство над Playwright. +Под капотом инструмент использует собственную библиотеку [looks-same][looks-same] для сравнения скриншотов, которая [быстрее][looks-same-benchmarks] и точнее текущих конкурентов: + +- Ожидание загрузки элементов перед скриншотом, чтобы исключить нестабильность в тесте; +- Отключение анимации на странице; +- Гибкая настройка чувствительности скриншотного тестирования — [tolerance][tolerance], [anti-aliasing tolerance][anti-aliasing-tolerance], игнорирование фиксированного количества пикселей; +- Используется 3 уровня сравнения для оптимизации скорости; +- Разнообразные [виды визуализации различий между скриншотами][report-visual-testing] для удобной отладки, в т.ч. и подсветка мелких диффов; +- Игнорирование элементов на скриншоте при необходимости. + +Testplane предоставляет удобный [интерфейс][reporter] для массового принятия скриншотов, что ускоряет процесс обновления эталонных изображений. +Также, если в проекте пользователя настроен [Storybook][storybook], то Testplane предоставляет [автоматическую генерацию скриншотных тестов][storybook-autotests], что позволяет быстро покрыть визуальными проверками все компоненты проекта **без написания кода**. + +Playwright предлагает лишь базовую поддержку скриншотного тестирования с ограниченными возможностями и менее удобным интерфейсом для работы со скриншотами. Это делает его менее подходящим для проектов, где важно визуальное тестирование. + +### Отчет для работы с тестами + + + У Testplane есть мощный UI для работы с тестами в самых различных сценариях + + +Testplane имеет графический интерфейс, который не просто показывает результаты выполнения ваших тестов, но и предоставляет широкие возможности для работы с ними. + +Этот отчет прекрасно подходит как для локальной работы, так и для использования в CI. Он предлагает единый интерфейс для выполнения различных задач: + +- Запуск тестов непосредственно из UI; +- Отладка с помощью [Time Travel][time-travel] (пошагового воспроизведения тестов); +- Анализ производительности тестов; +- Обновление эталонных изображений при скриншотном тестировании; +- Объединение нескольких отчетов в один; +- Повторное использование результатов из CI. + +Особенно важно, что отчёт Testplane способен эффективно работать с тысячами тестов, не теряя производительности. А система плагинов позволяет кастомизировать отчёты под специфические потребности команды. + +Со всеми возможностями отчета можно ознакомиться в разделе [UI][reporter] сайта https://testplane.io. + +### Взаимодействие с ИИ + + + Testplane MPC помогает ИИ-агентам писать стабильные новые тесты и чинить существующие + + +[Testplane MCP][testplane-mcp] — это инструмент, который позволяет ИИ-агентам погрузиться в контекст того, что происходит в браузере, выполнять действия и создавать или чинить тесты, основываясь на реальном состоянии страницы. +С помощью Testplane MCP пользователи могут не только создавать рабочие и стабильные тесты, но и быстро исправлять уже существующие. Testplane MPC позволяет подключиться к браузеру в ходе выполнения вашего теста, чтобы отладить или изменить его. Это значительно сокращает время, затрачиваемое на исправление нестабильных тестов. +Кроме того, Testplane MCP предоставляет возможность запускать браузер в режиме эмуляции мобильных устройств. Например, можно сказать "Открой страницу example.com с помощью Testplane MCP на iPhone 15" или указать явно какой User Agent нужно указать при создании браузерной сессии. + +### Расширяемость и интеграции + +Testplane предоставляет больше возможностей для кастомизации + +Архитектура Testplane построена с учётом потребностей в кастомизации и интеграции. Богатая [событийная модель](/docs/v8/reference/testplane-events) предоставляет множество точек расширения, позволяя разработчикам внедрять собственную логику на любом этапе выполнения тестов. Это особенно важно для проектов, где требуется интеграция с внутренними системами мониторинга, отчётности и управления качеством. +Также Testplane предоставляет JS API, которое позволяет создавать собственные раннеры, адаптированные под специфические потребности проекта. + +Playwright, несмотря на свою популярность, предлагает меньше точек расширения и требует самостоятельной разработки большинства интеграций. Это увеличивает время на внедрение и поддержку инструмента в корпоративной среде. + +### Масштабирование и производительность + +Testplane проверен на крупных проектах с миллионами тестов + +Архитектура Testplane изначально проектировалась для работы с большими объёмами тестов, что обеспечивает стабильную работу даже при значительном росте тестового покрытия. Это особенно важно для долгосрочных проектов, где количество тестов постоянно увеличивается. +Поддержка удалённого грида браузеров (например, BrowserStack, SauceLabs и т.д.) позволяет эффективно распределять выполнение тестов по множеству машин, обеспечивая быстрое выполнение даже очень больших тестовых наборов. +Также Testplane позволяет масштабировать запуски за счет шардирования, запуская тесты на разных машинах. При этом, в результате пользователю будет предоставлен единый отчет с результатами пройденных тестов. + +Playwright также имеет возможности для масштабирования в виде шардирования из коробки. Масштабирование за счет удаленного грида предоставляется только в виде платного сервиса [Microsoft Playwright Testing][mpt]. + +### Обновления и стабильность + +Testplane обеспечивает высокую стабильность благодаря продуманному подходу к управлению зависимостями. Обновления инструмента полностью отвязаны от обновлений браузеров, что позволяет командам контролировать процесс миграции и избегать неожиданных поломок в CI/CD пайплайнах. Использование стабильных версий браузеров минимизирует количество проблем с переснятием скриншотов, что особенно важно для проектов с большим количеством визуальных тестов. +Такой подход обеспечивает предсказуемость поведения тестов и снижает затраты на поддержку инфраструктуры тестирования. Команды могут планировать обновления браузеров независимо от обновлений самого инструмента тестирования, что даёт больше гибкости в управлении техническим долгом. + +Playwright же связывает обновления инструмента с обновлениями браузеров, что может приводить к неожиданным изменениям в поведении тестов. Это создаёт дополнительную нагрузку на команды разработки, которым приходится чаще пересматривать и обновлять скриншоты, особенно в проектах с активной разработкой интерфейса. + +## Рекомендации по выбору + +### Выбирайте Playwright, если: + +✅ Достаточно тестирования только в самых последних десктопных браузерах\ +✅ Уверены, что не потребуется поддержка старых версий браузеров\ +✅ Не нужно визуальное тестирование + +### Выбирайте Testplane, если: + +✅ Важно визуальное тестирование с удобным отчётом\ +✅ В будущем потребуется масштабирование\ +✅ Важна кастомизация под специфические нужды\ +✅ Необходимо тестирование в широком спектре десктопных браузеров и мобильных устройств\ +✅ Требуется тестирование нативных приложений Android и iOS + +[anti-aliasing-tolerance]: https://testplane.io/docs/v8/config/browsers/#antialiasing_tolerance +[looks-same]: https://github.com/gemini-testing/looks-same +[looks-same-benchmarks]: https://github.com/gemini-testing/looks-same/blob/master/benchmark/results.md +[mpt]: https://learn.microsoft.com/en-us/azure/playwright-testing/ +[report-visual-testing]: https://testplane.io/docs/v8/html-reporter/overview/#superb-visual-testing-capabilities +[reporter]: https://testplane.io/docs/v8/html-reporter/overview/ +[storybook]: https://storybook.js.org +[storybook-autotests]: https://testplane.io/docs/v8/visual-testing/with-storybook/ +[testplane-mcp]: https://testplane.io/ru/docs/v8/testplane-mcp/ +[tolerance]: https://testplane.io/docs/v8/config/browsers/#tolerance +[time-travel]: https://testplane.io/ru/docs/v8/guides/time-travel/ diff --git a/sidebars.ts b/sidebars.ts index ed01678..be06e68 100644 --- a/sidebars.ts +++ b/sidebars.ts @@ -78,6 +78,12 @@ const sidebars: SidebarsConfig = { label: "Reference", items: [{ type: "autogenerated", dirName: "reference" }], }, + { + type: "category", + label: "Сomparison", + items: [{ type: "autogenerated", dirName: "comparison" }], + link: { type: "doc", id: "comparison/compare-with-playwright" }, + }, ], ui: [ { type: "autogenerated", dirName: "html-reporter" },