-
Notifications
You must be signed in to change notification settings - Fork 37
Cypress <> Playwright Comparison #6
Description
So these are just quick thoughts on the benefits we get from Cypress, and where Playwright might be able to bridge the gap. Some of these might be things better supported on Playwright itself and not the runner (like proxy config).
These are things that Cypress has that I'm not sure Playwright does yet (correct me if I'm wrong):
-
A headed in-browser test runner UI - developers can watch and debug tests in real time, this is also hooked up to a "watch" mode that picks up code changes. This may be the largest benefit we receive from Cypress in terms of developer experience. The UI test runner allows you to interact with the DOM and pause the test on any steps. (video eg). This UI also surfaces the test failure messages in recorded videos.
-
Config options to run tests against any base URL -- we point Cypress at any host by changing an env variable
CYPRESS_BASE_URL. -
On the same note as the previous ^, ability to propagate any environment variables into browser tests. Cypress uses a convention where any env var prefixed with
CYPRESS_can be discovered and used by tests. https://docs.cypress.io/guides/guides/environment-variables.html#Setting -
Ability to listen mock and stub routes and API responses https://docs.cypress.io/api/commands/route.html#Syntax
-
Option to output recorded video of the test runs -- seems like you heard this one already Record a video for tests #5
-
Proxy configuration for in browser tests https://docs.cypress.io/guides/references/proxy-configuration.html#Set-a-proxy-on-Linux-or-macOS
There's probably more that I'm forgetting, but those are the big ones I can think of.