If you are new to automated testing, below are some great learning resources. Start by watching some videos to get a general idea of how the tools work. But first....
Which Testing Tool Should I Use?
You are going to be living with this tool for a long time so take the time to understand the differences between the tools. For a bottom line assessment, generally we would say Cypress blazed the trail and fixed many of the problems legacy tools have—but Playwright currently has a better product.
Cypress introduced a concise programming style, a great UI, excellent documentation and vastly shortened the time it takes to debug tests. It also has a very strong community with lots of examples and training courses. On the other hand, the concise programming style can make more complex tests tougher to write and debug. It's also not possible to control multiple browsers or tabs easily (though there are ways around it; see the documentation).
Playwright was released more recently than Cypress, bringing a few more features and maintaining a more traditional programming style. In particular, Playwright makes debugging complex tests easier, tests can be made in multiple languages, controlling multiple tabs and browsers is easy, it's possible to run tests directly from within Visual Studio Code, support is much faster on their issue queue—and it runs significantly faster than Cypress (between 3x and 5x faster). Expect Playwright to continue to grow quickly in market share.
To get a sense of what it's like working in both tools, check out the resources below. NOTE: Some resources below highlight the lack of a GUI debugging tool in Playwright. That was true at the time the videos were made. However, Playwright now has a GUI tool and both tools are advancing quickly.
Check out the video I made that hits the main points:
Should I Choose Cypress or Playwright?
However, you should definitely watch some videos from the section below as well. After all, you may not agree with my assessment.
Cypress vs Playwright
- Should I Choose Cypress or Playwright (Oct. 2024) — If you have time for only one, watch this.
- Cypress and Playwright: A Comparison (Nov. 2023) — If you have time for only two, watch this, too.
- Cypress vs Playwright for tech leaders: cost and risks analysis (July 2024) — but this is good, too! Ok, three of them.
- The benefits Lisa Weilguni's team experienced switching from Cypress to Playwright:
- How We Reduced Testing Time By 70% — by Moving From Cypress to Playwright (Medium article, Oct. 2023)
- Cypress vs Playwright: 70% Faster Automation (Video, Jan. 2024)
- Cypress vs Playwright – Clash of the Titans: Introduction (1), Setup (2) Writing first tests (3) Working with API requests (4) CI/CD integration (5) (Sep. 2022)
- Clash of the Titans: Cypress vs. Playwright Video (Aug. 2022)
- The Debate Between Cypress and Playwright (Gleb Bhamutov, Dec. 2022)
- Cypress vs Playwright: Which is the Best Cross-Browser Testing Tool? (Mar. 2023)
- Cypress vs. Playwright: Let the Code Speak (Jul. 2022)
- Cypress vs Playwright: The Rematch (Sep. 2022)
Drupal-Specific Videos
- Setting up a Comprehensive Automated Testing Regime for Drupal using Cypress and Playwright (Stanford Web Camp, 2023)
- Cypress Testing for Drupal Websites (June, 2022)
- End to end testing with Playwright (DrupalCon 2022)
- Test-driven development with Drupal & Cypress.io (DrupalCon, 2020)
- Make the Robots Do It! Practical Continuous Integration and Automated Testing (BADCamp, 2019)
General Cypress
- Cypress Discord Server
- Selecting Items in Cypress Cheatsheet
- Selecting Items in Cypress (Advanced) Cheatsheet
- Gleb Bahmotov - How We Introduced Automated Web App Testing in A Large Organization (Jan, 2022)
General Playwright
- Playwright Discord Server
- Introduction to Playwright for End-to-End Testing with Debbie O'Brien (April, 2023)
- Get started with end-to-end testing: Playwright (6-part tutorial, October, 2023)
- Understanding Playwright Test Assertions (Aug, 2022)
Selenium Comparisons
- Test Automation: Choosing Between Selenium and Cypress for Your QA Strategy (Jan, 2024)
- Test Automation: Selenium Vs Playwright (Jan, 2024)
Test Design
This article has some good ideas about how to write Playwright tests. Should the Automated Testing Kit be re-written along these guidelines?
Our Playwright testing standards at Houseful (Nov. 2023)
Implementing Page Object Model in Cypress